This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-26
Channels
- # announcements (7)
- # babashka (6)
- # beginners (41)
- # clara (27)
- # clerk (2)
- # cljs-dev (6)
- # clojure (121)
- # clojure-europe (31)
- # clojure-nl (2)
- # clojure-norway (98)
- # clojure-uk (12)
- # clojuredesign-podcast (7)
- # conjure (5)
- # cursive (22)
- # holy-lambda (22)
- # hoplon (9)
- # hyperfiddle (19)
- # leiningen (9)
- # malli (4)
- # music (1)
- # nbb (6)
- # off-topic (10)
- # podcasts-discuss (1)
- # polylith (4)
- # re-frame (2)
- # reitit (2)
- # releases (1)
- # sci (1)
- # shadow-cljs (59)
- # sql (9)
- # vim (41)
- # xtdb (23)
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 :thinking_face:
I don't know, but looks like this vim.schedule doesn't understand zipfile which is what we use for dependencies
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 :thinking_face:
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 :thinking_face: 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.
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.
having not used mason, not sure why there are 2 clojure_lsps
If you do :LspInfo
on the clojure file, how many are attached to the buffer?
well feels like some autocommnd is doing something more somewhere
do you also have clojure lsp installed by yourself? if yes, what happens when you remove that?
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
nice, all gut feelings on this one 😛
@U4GEXTNGZ 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