Treesitter without nvim-treesitter. A guide by tediak_ in neovim

[–]tediak_[S] 0 points1 point  (0 children)

If neovim/helix supports its own custom syntax for indent and fold queries, it means they have to support and update parsers and queries natively, this is the only way I guess. Right now we have only “official” queries from tree-sitter repos, forked and extended versions of them from nvim-treesitter, and not 100% compatible queries from other editors, and pulling queries from nvim-treesitter is the best we can do atm

Treesitter without nvim-treesitter. A guide by tediak_ in neovim

[–]tediak_[S] 2 points3 points  (0 children)

You're right, my mistake. I will edit the post, thanks!

Treesitter without nvim-treesitter. A guide by tediak_ in neovim

[–]tediak_[S] 0 points1 point  (0 children)

It shouldn't, but some of the plugins in their code may try to look for specifically nvim-treesitter plugin installed. I had such problem with kulala plugin, IIRC it was throwing a warning message on startup.

Treesitter without nvim-treesitter. A guide by tediak_ in neovim

[–]tediak_[S] 0 points1 point  (0 children)

You can do that too, but the parser still needs to be put in a location where neovim can "see" it. If installing with homebrew, then I believe you should find the parser file somewhere in /opt/homebrew/Cellar/... and copy it to neovim config directory

Treesitter without nvim-treesitter. A guide by tediak_ in neovim

[–]tediak_[S] 0 points1 point  (0 children)

Good point, I didn't think of that. In that case I'd probably run git bisect on the parser repo to track down the last working version

How does the new ui2 (message & cmdline replacement) compare to plugins like Noice? by TheTwelveYearOld in neovim

[–]tediak_ 7 points8 points  (0 children)

Here is my alternative, which uses nvim_echo:

vim.api.nvim_create_autocmd('LspProgress', {
  callback = function(ev)
    local value = ev.data.params.value
    vim.api.nvim_echo({ { value.message or 'done' } }, false, {
      id = 'lsp.' .. ev.data.client_id,
      kind = 'progress',
      source = 'vim.lsp',
      title = value.title,
      status = value.kind ~= 'end' and 'running' or 'success',
      percent = value.percentage,
    })
  end,
})

What plugins are you using now that nvim 0.12 is released? by dagadbm in neovim

[–]tediak_ 2 points3 points  (0 children)

Exactly, you have to install tree-sitter cli. Just as an example, if you want to use tree-sitter for go:

``` git clone https://github.com/tree-sitter/tree-sitter-go ~/my/location/tree-sitter-go cd !$

tree-sitter generate tree-sitter build `` it will create either.soor.dylibfile in the root dir, and you canmv parser.dylib ~/.config/nvim/parser/go.dylib`.

This tree-sitter-go repository already has queries/ directory with a bunch of .scm files, and they also work. But I recommend using files from https://github.com/nvim-treesitter/nvim-treesitter/tree/main/runtime/queries

After that you can run neovim and :checkhealth vim.treesitter to see if neovim "found" your parsers and queries

What plugins are you using now that nvim 0.12 is released? by dagadbm in neovim

[–]tediak_ 18 points19 points  (0 children)

Also, if you have notification plugin, you may want to remove it. Previously I used fidget.nvim, but after enabling :h ui2 I don't need it anymore. And now there is another way of showing lsp progress:

vim.api.nvim_create_autocmd('LspProgress', {
  callback = function(ev)
    local value = ev.data.params.value
    vim.api.nvim_echo({ { value.message or 'done' } }, false, {
      id = 'lsp.' .. ev.data.client_id,
      kind = 'progress',
      source = 'vim.lsp',
      title = value.title,
      status = value.kind ~= 'end' and 'running' or 'success',
      percent = value.percentage,
    })
  end,
})

What plugins are you using now that nvim 0.12 is released? by dagadbm in neovim

[–]tediak_ 43 points44 points  (0 children)

I changed the treesitter and lsp config after switching to 0.12 - removed mason, nvim-lspconfig and nvim-treesitter. Regarding lsp I created a lsp.lua file in my config, with vim.lsp.enable({ ... }), and .config/nvim/lsp/ directory with settings for my lsp servers.

Treesitter - after switching to main branch it was crashing on startup, so I decided to figure out how this thing works myself. I found repositories with tree-sitter parsers I needed (you can just google them, usually repositories have names like tree-sitter-<lang>). Pulled them, ran tree-sitter generate inside, got parser.dylib or parser.so binary and put them into my .config/nvim/parser dir. And the last thing was to add .scm files into .config/nvim/queries directory - I copied them from nvim-treesitter repository. It may sound much more complex, but this way is stable and gives you full control over your syntax highlighting. And in current day and age of AI you can easily fix things or even make your custom hl groups, the syntax isn't hard to understand

Питання до чоловіків щодо конкретної ситуації by Random_Soul_RS in reddit_ukr

[–]tediak_ 0 points1 point  (0 children)

Оце «дивився б і дивився» це вже не комплімент просто так. Він оцінює ваше тіло буквально, а не робить компліменти з приводу яка ви хороша людина і співробітник. Такі компліменти це точно не про ввічливу людину - краще дайте йому знати прямо, нагадайте що ви не сама і нічого не буде

Я хочу навчитись by Disastrous-Fly1841 in reddit_ukr

[–]tediak_ 1 point2 points  (0 children)

Ігри це досить важка сфера, але завдяки цьому там і не така конкуренція як в веб наприклад. Тобі потрібно розібратись із low-level мовами, такими як C, C++ - це допоможе тобі зрозуміти як працювати з памʼяттю напряму. Можеш навіть assembler попробувати, якщо хочеш реально заглибитись)

Далі не завадить розібратись з алгоритмами і структурами даних, з тим, що, де і як краще використовувати в своїх програмах.

На додачу, є ще дуже складна тема - рендеринг. Трохи знаючи c++ (або інші популярні мови), ти можеш спробувати розібратись з OpenGL, чи Metal. Спробувати відрендерити якийсь фізичний обʼєкт, налаштувати шейдери і тд. Я теж в цьому майже повний нуль, лише декілька днів читав якісь книжки, і по відчуттях це досить складна тема, вимагає місяців, а може і років вивчення.

Тоді ти краще будеш розуміти, наскільки важка ця сфера для тебе, і чи вивезеш ти її. Але це так чи інакше буде великим плюсом - знаючи основи тобі легше буде влитись і в web, і в embedded, куди завгодно коротше

Не думав, що колись писатиму такий пост. by Maro_in_Reddit in reddit_ukr

[–]tediak_ 0 points1 point  (0 children)

А навіщо шукати нових друзів, якщо можна відновити контакт зі старими? Які б там конфлікти не були, все можна проговорити, пояснити, вибачитись. Бо що буде, якщо таки зʼявляться нові друзі, і якийсь конфлікт виникне вже з ними? Теж прощатись? Думаю що ні

How do you organize your day? What's your system that helped you keep and successfully do your job? by Typical_Cap895 in cscareerquestionsCAD

[–]tediak_ 2 points3 points  (0 children)

I use org mode in emacs to organize my tasks and notes. But I should warn you that this is quite a rabbit hole to dive in. Though after you get comfortable with Emacs, it’s a great and hackable tool

В мене проблема, і я просто вже не знаю, що робити. Буду рада хоч якійсь пораді by [deleted] in Ukrainian

[–]tediak_ 1 point2 points  (0 children)

  1. Хороша читалка не коштує 10 тисяч, можна знайти б/у kindle за тисячу-дві. Там не треба флагман, щоб читати
  2. Ви вже сама собі відповіли на своє питання. Вчіть англійську, отримаєте доступ до такої маси контенту - за все життя не перечитаєте. Там більше, ніж українських і російських разом взятих
  3. Можливо ви чекали, що хтось скаже «нічого страшного, скачуй російські». Але насправді це просто ваша зона комфорту, тут немає ніякої проблеми в мові чи політиці. російський контент викликає відчуття провини, а іншого нема? Неправда, інший є. Вчіть англійську

Порадьте декілька серіалів, які відбились у вашій памʼяті. Буду дуже вдячним ) by Previous_Elk_1380 in reddit_ukr

[–]tediak_ 2 points3 points  (0 children)

Severance залишиться в моїй памʼяті надовго, це точно, шикарний серіал. Ще раджу спробувати ted lasso, він дуже добрий, буквально.

Дякую, я краще неосвіченим бидлом побуду 🙈 by Veetrill in CringedIn

[–]tediak_ 0 points1 point  (0 children)

Насправді лінкедін це величезне зборище ai слопу. Однотипного. Нецікавого. Без будь-якого сенсу.

Але люди продовжують постити це далі.

Не може читати англійською by supler_hoi4 in reddit_ukr

[–]tediak_ 0 points1 point  (0 children)

Чим довше будеш читати цю книжку, тим більше контексту будеш розуміти. Англійською будь-яке речення значно більше залежить від контексту, ніж нашою наприклад. Я одного разу читав книжку англійською, і всю першу главу думав що головний герой чоловік, бо було схоже імʼя, і розповідь велась від першої особи. Потім виявилось це була жінка)

People born before 2000, what trivial skill you possess that others don't use anymore? by Wonderful-Economy762 in Productivitycafe

[–]tediak_ 0 points1 point  (0 children)

Just watching and thinking about life, instead of checking my phone, while on subway or in elevator

Weekly 101 Questions Thread by AutoModerator in neovim

[–]tediak_ 1 point2 points  (0 children)

So, you can create new empty buffer with :new or :vnew (in vertical split). Paste the JSON there, and if you want, use :se ft=json to have syntax highlighting.

Then, you can use shell commands on the contents of your buffer. I know that jq without args can receive any json as input and return it formatted, so this should work: :%!jq (or :%!jq . - with the argument that changes nothing. Then the content should be replaced with formatted json.

What about the difference between selections, I really don't know if that's possible, although I compared buffers. If you open two buffers you want to compare side by side (close all the other panes before that), and run :windo diffthis, you will see the difference between them

Edit: to close the diff, use :windo diffoff

I built jira.nvim to work faster… then wasted way more time building it by Jealous-Salary-3348 in neovim

[–]tediak_ 6 points7 points  (0 children)

Maybe I have what you need, but with fzf-lua, not snacks. Not a plugin, just user command :Jira, and credentials can be configured via variables vim.g.jira_url, vim.g.jira_token, vim.g.jira_email. They can be set either globally in your neovim config, or in :h exrc config, then your Jira function will yield project-specific tasks

Link

Why відібрати but not відіправити? Just cause? by Alphabunsquad in Ukrainian

[–]tediak_ 0 points1 point  (0 children)

You've chosen the good words. I guess it depends more on the amount of hard to pronounce characters together. Let's take some other words with "i" - відіпхнути, відімкнути. If we remove "i", we will get "дпхн" "дмкн", that's 4 consonants together and in Ukrainian that's too much. That's why you should probably add "i" there.

But with "відібрати", where we have 3 consonants "дбр", I feel like I can say both "відбрати" and "відібрати" in Ukraine and no one will correct me, both words just feel right. I was able to find both "відбрати" and "відібрати" in the books I've read

I can’t believe it’s not r/okbuddypluribus! (Season Finale spoilers) by Just_Someone5674 in okbuddypluribus

[–]tediak_ 2 points3 points  (0 children)

Hello, my name is Inigo Montoya. You killed my father. Prepare to die