When I use nvim and LSP to jump to a definition of Clojure core function then it wants to jump into a zipfile.
And then I get an error that says that it can't run vim.schedule callback for "zipfile:*/*".
I use nvim and deps.edn for my project.
What does it mean?
Screenshot (my cursor is on the re-find and I run vim.lsp.buf.definition LSP command):
If I jump the first time (buffer isn't in memory) then It does open the buffer on the first line. If buffer is already loaded then it jumps into the proper line of the function definition. In both cases the syntax highlighting is not present. Screenshot when jumping the first time:
If I run :filetype detect then the highlighting gets enabled for the zipfile clj buffer. But this should run by default and also the jump should be correct from the start 🤔
I don't know, but looks like this vim.schedule doesn't understand zipfile which is what we use for dependencies
maybe #vim could help
This is #vim ;D But thanks for replying 😉 I suspected that LSP has nothing to do with it so I decided not to post in LSP 🤔
ops, thought was LSP, sorry :)
yeah. makes sense
I wish we could drop zipfile for nvim... clojure-lsp only supports for nvim users but IMO it brings more issues than solutions
maybe you could try:
.lsp/config.edn
{:dependency-scheme "jar"}
and see what happensBut I get the jump. The editor jumps into the file already. It's just that autocommands don't execute for the file in the zipfile, I think 🤔 I'll try your proposal but I don't expect much.
since we will be changing the scheme to jarfile, maybe that could play well with vi.schedule or so you know
yeah it's probably that. ah, I thought we just setting the dependency-scheme to jar would be enough but it seems we need more changes to make nvim understand that for find-definition works
Additional thing that I found and didn't share.
If I jump into the zipfile twice then it jumps into the line properly (using no config as in the beginning).
And if I execute :filetype detect then it also enables LSP and all highlighting.
I created this: https://github.com/neovim/neovim/issues/25786
FYI pretty sure it's got to do with my polylith monorepo setup which has multiple deps.edn files
Hey Timo! Did you make any further changes on top of kickstart? something like install some more linter plugins like nvim-lint/null-ls or something?
and does this only happen with clojure files?
I can not think of anything like null-ls that I added. It only happens with clojure files.
I installed with mason
having not used mason, not sure why there are 2 clojure_lsps
in python it looks good
yeah, looks like in mason there are two messages as well
If you do :LspInfo on the clojure file, how many are attached to the buffer?
actually two 😕
well feels like some autocommnd is doing something more somewhere
alright, thanks mate. will be going through my stuff again
do you also have clojure lsp installed by yourself? if yes, what happens when you remove that?
I already removed it and it seems like no changes
gut feeling is the nvim-lspconfig is launching it and mason is doing it again maybe? not sure.
interesting, when commenting out https://github.com/TimoKramer/dotfiles/blob/stow/nvim/.config/nvim/lua/kickstart/plugins/clojure.lua it works fine. something is triggering a second start of lsp
not sure if these could be the thing: https://github.com/TimoKramer/dotfiles/blob/stow/nvim/.config/nvim/lua/kickstart/plugins/clojure.lua#L24-L25
not sure if they are needed, maybe causing the extra buffers and lsp
yeah, looks good now
thank you once again:)
nice, all gut feelings on this one 😛
haha
🎉
@timok im doing similar things as you in my https://github.com/lispyclouds/dotfiles/blob/main/nvim/lua/plugins/lisp.lua#L7 too but without any of the requires. does the thing i want it to; not sure why the requires are needed? also i have a augroup for the autocmd which makes sure it cleans up the older autocmds with new buffers. maybe that makes any difference? like Olical said on the issue, something weird is happening