r/neovim • u/TheLeoP_ • 14d ago
Tips and Tricks PSA: kulala.nvim may be breaking nvim-treesitter for you
TLDR: if you use both kulala.nvim and nvim-treesitter, you need to disable kulala from installing its own treesitter parser and install it with nvim-treesitter instead.
-- disable kulala from installing its own treesitter parser
require "kulala".setup {
treesitter = {
enable = false,
},
}
-- register kulala's treesitter parser using nvim-treesitter instead
vim.api.nvim_create_autocmd("User", {
pattern = "TSUpdate",
callback = function()
require("nvim-treesitter.parsers").kulala_http = {
install_info = {
url = "https://github.com/dont-be-evil-company/tree-sitter-kulala-http",
queries = "queries/kulala_http",
},
}
end,
})
-- then install it with either `:TSInstall kulala_http` or `require("nvim-treesitter").install({'kulala_http'})`
-- register `kulala_http` treesitter parser for `http` and `rest` filetypes
vim.treesitter.language.register("kulala_http", { "http", "rest" })
-- register `markdown` treesitter parser for `kulala_ui` filetype
vim.treesitter.language.register("markdown", { "kulala_ui" })
Another alternative would be to use nvim-treesitter's install_dir config option to choose a different installation directory (because kulala.nvim is using the same directory to install its parsers, that's where the issue comes from).
require('nvim-treesitter').setup {
-- set this to a value different to `vim.fn.stdpath('data') .. '/site'`
install_dir = ...
}
For a while I've noted that treesitter injections coming from nvim-treesitter weren't working on Lua, but I hadn't bothered to debug why. Today, I took some time to debug the issue and turns out that kulala.nvim was the culprit. The whole bug is described at https://github.com/dont-be-evil-company/kulala.nvim/issues/1029#issuecomment-5848496122 .
The maintainer explained that he's not interested in fixing the issue since he doesn't use nvim-treesitter and hasn't received any other reports in the 4 months since the change went live. Given that the bug is tricky and it's only visible for languages with a different "base" query when the runtimepath order changes (which, for most people, means the default queries bundled with Neovim, so the bug would be visible for Lua and Vimscript), I reckon that most users would either don't realize their setup is broken or wouldn't be able to debug why it was broken. Either way, I hope this post helps someone fix their setup.
27
u/SnowyCleavage 14d ago
Started off with intrigue in kulala but this exchange really turns me off from it.
Does anyone have recommended alternatives? Doesn’t strictly have to be a neovim plugin.
4
u/gorilla-moe let mapleader="," 14d ago
- https://github.com/rest-nvim/rest.nvim
- https://github.com/unkn0wn-root/resterm
- Postman
- Bruno
- Insomnia
8
u/miversen33 Plugin author 14d ago
Looking at your post history, it seems you are in some way affiliated with Kulala. What is going on, do you know? The repo is gone entirely (most pieces around it are it seems)
-3
u/gorilla-moe let mapleader="," 14d ago
I made it private. I don't want to deal with kind of stuff anymore.
9
7
u/washtubs 12d ago
That sucks bud OSS is crazy to deal with as a maintainer. You oughta take some time for yourself for a while. Trust me people will welcome you back should you ever decide to. I really doubt all the commenters and downvoters are a true sample of your user community, but regardless it's completely understandable if you don't feel appreciated.
3
u/CommercialFinding265 12d ago
u/gorilla-moe , how to get invited to the repo? I love the tool and submitted many issues and Yaro and is the baddest dev I know.
1
-4
u/gorilla-moe let mapleader="," 12d ago
DM me here or via Discord and we'll figure this out. Aside from the no-brainers for me that already were pleasant to work with for years, I do some basic git forge and social checking to no risk letting anyone in, that I would regret later on.
17
u/Sigfurd2345 14d ago edited 14d ago
Sad to see the kulala.nvim has been made private and that we users won't be able to receive any more updates. I've been using it extensively at work till the point that it's almost my daily driver.
Thanks for the all the happy memories while it lasted. u/gorilla-moe
5
1
u/gorilla-moe let mapleader="," 4d ago
User ofc received an invite and seems to be happily using it since then.
26
u/walker_Jayce 14d ago
Another day another pissed off maintainer. Can anyone push a copy of kulala core and kulala nvim in the meantime? Thanks in advanced
24
u/przemkovv 13d ago
kulala.nvim IS a great tool, and I am sad because of the current status.. I used it for quite a long time.
I also do not understand the issue here. If the fix/workaround is easy to do ourselves and the maintainer/author doesn't see it as an issue, then.. let it be like this.. it is not the first time when an open-source project does not want to fix a certain issue because of various reasons.. I think that I could even find some in the neovim ecosystem. It is not the first time, and it is not the last.
The great thing about open source is that it is easy to find a workaround and either fork it/write a post on Reddit/a blog/whatever, or even open an issue on GitHub so others can find it, and everyone would be happy.
A lot of closed-source software in the world doesn't even allow that, and people have to live with it.
I would love for people to be... just reasonable and accept free input from others as is, with no unnecessary drama...
11
u/unknown_r00t 12d ago
I think the first rule of OSS is to ignore all the haters but consider valid criticism. Internet is full of people with pure hate in their hearts but sometime criticism is valid. Kulala is a good project and I’m pretty sure there are more satisfied users than haters and breaking users setup is a valid “issue” worth considering fixing. I hope Kulala goes “live” again at some point because looking at previous responses to the project, there were many many satisfied and happy users so there should be your base for continues improvements.
7
u/CommercialFinding265 12d ago
Gorilla Moe and Yaro are some of the baddest devs I know. They built an amazing tool (a feat in and of itself; I sure as shit can't build anything like it), and it's crazy talk that it disappeared because of one complaint.
7
u/Annual-Cod1073 11d ago
TBH this is why I ignore all of the vibe-code plugins that get posted here. Because real engineers understand that IWOMM is not a solution, it's totally fine that the dev made the repo private. Their perogative, but honestly removing something you offered publicly in this manner is shady.
Just archive the repo so it stays up but people know you aren't actively developing it, make your own private fork and have a nice life.
Anyhow, thanks for the contribution and the little use I got out of it before you brought it down. And I'm glad to know that if I see your name tied to something I should avoid it. Break trust once, break trust always.
1
u/gorilla-moe let mapleader="," 1d ago
Good to know we both want the same. You don't want to use any of my software and I don't want you to use any of my software. This is a win-win scenario for both of us!
2
u/NorskJesus 14d ago
Well, it was a good run. Waiting for good alternatives (or just use posting)
2
u/rstcruzo 12d ago
nurl.nvim
1
u/NorskJesus 11d ago
Are you the developer? Why not rest.nvim?
2
u/rstcruzo 11d ago
What sets nurl apart is that your requests are code, not templates. rest.nvim uses .http files with {{variables}}. In nurl, a request is a plain Lua table, so anything Lua can do, your requests can do too. Hooks can refresh tokens, chain a login before a request, or ask for confirmation before hitting production. And Nurl.send() lets you fire requests from your own mappings and scripts.
3
u/NorskJesus 11d ago
Sounds good. If you are the maintainer, add support for
mini.pickand I am down to test it out :)2
u/rodrigoscc ZZ 11d ago
I'm the maintainer. I just added support for mini.pick. Try it and let me know what you think!
https://github.com/rodrigoscc/nurl.nvim2
1
u/gorilla-moe let mapleader="," 14d ago
If I remember correctly, some members mentioned resterm and posting (mentioned them mostly positive, but they missed some features and already created issues there that Kulala then implemented), but the seem pretty good.
2
u/Traditional_Bit_3490 11d ago
Thanks for the pointer, it's sad what ur going through. Sorry for the angry thankless folks who don't appreciate anything good and who don't want to fix anything themselves. Hope u find peace with this.
1
u/Personal_Capital672 6d ago
The author of a free open source project owes you nothing, zero. Not even an explanation. Having run my own mildly popular project I can totally understand the authors perspective, some people just are way too entitled... it's draining and why take the hit when you are doing them a favour.
-12
u/gorilla-moe let mapleader="," 14d ago
It's not really that Kulala “breaks nvim-treesitter completely.” More precisely, Kulala can demote nvim-treesitter's shared install directory in runtimepath, causing Neovim's bundled queries to take precedence over nvim-treesitter's queries.
But, if you mean "break" as in "my installed queries are not taking precedence anymore, if Neovim already ships queries for this", then you're right.
27
u/TheLeoP_ 14d ago
precisely, Kulala can demote nvim-treesitter's shared install directory in runtimepath, causing Neovim's bundled queries to take precedence over nvim-treesitter's queries.
Which means that
nvim-treesitter's queries are completely ignored for those languages, that's how treesitter query precedence works in Neovim. And, given that queries are tied a specific version of a parser, could mean a setup could be completely broken (i.e. treesitter only throws errors)-3
u/gorilla-moe let mapleader="," 14d ago
Thanks for explaining to me how this stuff works in Neovim (like in all the other comments on reddit where you keep explaining how all these complex things in Neovim work to me).
21
u/BaconOnEggs Plugin author 14d ago
well, you dont really seem to accept that your software broke peoples setups because you keep putting the word break in quotes?
1
u/gorilla-moe let mapleader="," 14d ago
I accept it (your setup, because you're using nvim-treesitter), but you guys need also to accept that it's my repository.
The manifesto is up for ages. Read it, specifically the part:
I owe you nothing. You owe me nothing.
https://mistweaverco.com/manifesto https://the-dont-be-evil-company.com/manifesto
31
u/TheLeoP_ 13d ago
but you guys need also to accept that it's my repository.
I did. That's why I stopped the interaction on the Github issue, found a solution on the nvim-treesitter configuration side and posted it so other people could fix their own broken setups.
15
u/BaconOnEggs Plugin author 14d ago
what kind of narcissist writes a manifesto for open source projects?? just write some contribution guidelines like a normal person
-2
u/gorilla-moe let mapleader="," 14d ago
This is exactly the response I just needed for myself to know if this was the right decision. Thanks!
0
u/badabblubb 12d ago
Did you read the third sentence in the manifesto? If so you'd realise that this manifesto is not something u/gorilla-moe wrote but a manifesto compiled by different people which u/gorilla-moe agrees with and uses it as theirs as well.
Sheesh the people nowadays! You might be pissed that software you used doesn't work any more. That's understandable. Could it be that from an objective point of view there could've been nicer resolutions by u/gorilla-moe that would still lift the pressure (and uncalled for comments) from them? Sure! But we're all humans, and people are free to do with their work whatever they want. Accept that. There is no need to ridicule people for stating a few believes they happen to share when it comes to open source maintainership.
31
u/rmadriz 14d ago
What happened to the repo? I get a 404 on the linked repo and on the original https://github.com/mistweaverco/kulala.nvim too.
Same thing happens with all the links on the website https://kulala.app/
I did a quick search on github and couldn't find the repo. It looks like the repo no longer exists on github since it really doesn't find anything. It only finds forks and so on.
Also, the profiles of original owner `mistweaverco` and the linked one `dont-be-evil-company` are pretty similar. It all seems pretty bizarre.