Fork me on GitHub
Ory Band08:04:46

Hi, I'm getting this error message when nvim go-to-definition on any external library function which i'm (requireing.

Error executing vim.schedule lua callback: /snap/nvim/2797/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1097: Cursor position outside buffer
stack traceback:
        [C]: in function 'nvim_win_set_cursor'
        /snap/nvim/2797/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1097: in function 'jump_to_location'
        ...nvim/lazy/telescope.nvim/lua/telescope/builtin/__lsp.lua:175: in function 'handler'
        /snap/nvim/2797/usr/share/nvim/runtime/lua/vim/lsp.lua:1383: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
trying to go to file under cursor returns:
E447: Can't find file "log/configure-logger" in path
But getting that fn's documentations works, just not jumping to the def. clojure-lsp information (i don't see anything useful in logs):
✓ clojure-lsp clojure_lsp
      A Language Server for Clojure(script). Taking a Cursive-like approach of statically analyzing code.
      installed version 2023.04.19-12.43.29  ; <-- though this also happened with a version from March as well
      languages         Clojure, ClojureScript 
      categories        LSP                    
      executables       clojure-lsp            


That looks like a nvim issue, maybe #C0DF8R51A could help better if so, to confirm it's not a server issue you could check <;-&gt;server> logs and server logs and check there is nothing weird there

🙏 2

If I update/introduce a dependency, is lsp-restart-workspace the only way to have the change picked up? The initial project discovery always takes a few seconds (monorepo, of sorts)


yep, there were discussions to automatically analyze the new deps but it's a considerable work, restart LSP is usually fast enough and reliable


Yeah I can imagine it would be, thanks anyway! 😄

👍 2