You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
link 1 [section]
link 2 [section]
link 3 [section][section]: asdf
if I open it in Kakoune there'll be a code lens sign in the last line.
If I move to that line and try to run it via :lsp-code-lens that doesn't work.
Perhaps this is because the arguments field is omitted?
Even if I interpret missing arguments as [], performing the code lens gives no results.
I suspect we need to pass the position as arguments
LSP: DEBG To server marksman: {"jsonrpc":"2.0","method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///home/johannes/git/kakoune-lsp/t/test.md"}},"id":1}
LSP: DEBG From server marksman: {"jsonrpc":"2.0","id":1,"result":[{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":15}},"command":{"title":"3 references","command":"marksman.findReferences"}}]}
LSP: DEBG To server marksman: {"jsonrpc":"2.0","method":"workspace/executeCommand","params":{"arguments":[],"command":"marksman.findReferences"},"id":10}
LSP: DEBG From server marksman: {"jsonrpc":"2.0","id":10,"result":0}
If I try in Neovim, I don't get a code lens at all, not sure why.
The text was updated successfully, but these errors were encountered:
krobelus
added a commit
to kakoune-lsp/kakoune-lsp
that referenced
this issue
Oct 17, 2024
marksman sends a workspace/executeCommand without arguments,
which seems to be allowed by LSP.
Let's interpret it as empty array.
The code lens still doesn't actually seem to do anything, see
artempyanykh/marksman#337
Thanks for asking @krobelus! There are 2 parts to the answer:
The findReferences command is supposed to trigger editor's 'show references' dialog. Since this part is editor-specific, generating arguments is currently gated by an experimental flag. The implementation is nothing fancy though. This works as most LSP clients just ignore commands without arguments.
The lens itself is supposed to provide a visual 'at-a-glance' indication of usage. Even without the command arguments this is good enough and the user (if needed) can trigger 'find references' themselves.
Are you looking to make findReferences command work with kakoune-lsp?
P.S. I'm not sure why you don't get the lens in nvim. What's your setup?
Given this markdown file
if I open it in Kakoune there'll be a code lens sign in the last line.
If I move to that line and try to run it via
:lsp-code-lens
that doesn't work.Perhaps this is because the
arguments
field is omitted?Even if I interpret missing arguments as
[]
, performing the code lens gives no results.I suspect we need to pass the position as arguments
If I try in Neovim, I don't get a code lens at all, not sure why.
The text was updated successfully, but these errors were encountered: