Closed kmoschcau closed 5 months ago
I like how you format your functions!
Never thought of using the multi line escape char there before. I rarely use \
or SyntaxNode.type.escape_sequence
in fish, and am unsure how it effects the current feature set. I'll work on improving that before the next release.
It looks like, from the nvim lsp.log, that your client shows that it received a proper response message for the function
hover.
Which part is not working for you?
As for the --description
flag, I am aware of the hover result not being provided to functions. Due to the way tree-sitter-fish structures it's syntax tree, --flag
hover documentation is only avaliable to command
nodes currently. I don't think adding an edge case for supporting the function_definition
case shouldn't be too difficult though.
Once, I get a better working demo of signature support completed, the hover handler will be reworked to support creating more types of documentaion.
For anyone interested in helping implement the signatureHandler features for a
function
will include:
--argument-names
popups for signature during autocomplete--description "value"
using "value" for describing the function- possibly other relevant flags requested
The logs, are a little misleading in the current state.
The logs, typically are only used to show what parameters a function retrieved.
The docCache
not found message, just means that there wasn't an already stored description available for the function foo
, before it searches for what type of result to build.
I like how you format your functions!
Thanks. I think it's just more readable that way.
My concern was only that there was no hover for --description
and other flag type options. If that's already a known problem in general, we can close this issue.
Describe the bug When hovering on options for the
function
keyword, there is no result returned.To Reproduce Write this in a fish file:
Then hover over
--description
and observe that there is no hover result.Expected behavior There should be a hover result as with other command and keyword options.
Screenshots N/A
Please complete the following information:
Additional context Here are excerpts of fish-lsp's
logs.txt
and of nvim'slsp.log
. They both reflect first a hover onfunction
and then on--description
.fish-lsp logs.txt
``` { "handler": "onHover", "params": [ { "position": { "line": 0, "character": 0 }, "textDocument": { "uri": "file:///home/kmoschcau/.config/fish/functions/ll.fish" } } ] } {"date":"6/5/2024, 10:33:44 AM","message":"docCache found true"} { "handler": "onHover", "params": [ { "position": { "line": 1, "character": 4 }, "textDocument": { "uri": "file:///home/kmoschcau/.config/fish/functions/ll.fish" } } ] } {"date":"6/5/2024, 10:33:49 AM","message":"docCache found true"} ```nvim lsp.log
``` [DEBUG][2024-06-05 10:33:44] ...m/lsp/client.lua:678 "LSP[fish_lsp]" "client.request" 2 "textDocument/hover" { position = { character = 0, line = 0 }, textDocument = { uri = "file:///home/kmoschcau/.config/fish/functions/ll.fish" }}