ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.02k stars 57 forks source link

Signature in status line doesn't seem to work in bare config. What is missing? #230

Closed ghost closed 1 year ago

ghost commented 1 year ago

I was going to replace echodoc.vim plugin using lsp_signature.nvim. I followed exactly as documentation says, and yet It doesn't work. (this is the minimal config (init.lua)). (check out echoDoc function) I think it's missing somethings out of the documentation because I have pasted the code inside LunarVim config file and it does work..

ray-x commented 1 year ago

You can take a look of my statusline setup here: https://github.com/ray-x/nvim/blob/85b37a62fb26702897be94ca156e099caa3ffa61/lua/modules/ui/eviline.lua#L98-L108

ghost commented 1 year ago

replaced my code with yours. still doesn't work. Other features work

ghost commented 1 year ago

installed bare treesitter using packer as well: no results

ghost commented 1 year ago

tried to :lua print(require("lsp_signature").status_line(100).label), still no result

ray-x commented 1 year ago

well, maybe we try this: 1) your lsp is up and running, LspInfo 2) you park your cusror inside a function, e.g. funcname(arg1, arg2, arg3) you park your cursor on r of arg1 3) lua print(require("lsp_signature").status_line(100).label) what is the result?

ghost commented 1 year ago

 Language client log: /home/matteo/.local/state/nvim/lsp.log
 Detected filetype:   python

 1 client(s) attached to this buffer: 

 Client: pyright (id: 1, pid: nil, bufnr: [1])
    filetypes:       python
    autostart:       true
    root directory:  Running in single file mode.
    cmd:             pyright-langserver --stdio

 Configured servers list: clangd, pyright, sumneko_lua

lua print(require("lsp_signature").status_line(100).label) gave me no result

ghost commented 1 year ago

I tried to run the command even on LunarVim; :LspInfo gave me the same result but sumneko_lua and clang weren't in Configured servers list (due to lazy loading or better config maybe) I'm running on Fedora's spin i3, I kindly ask you to "reproduce" my environment on Virtual Box for example. As I already said, I followed the doc, therefore something is missing from there. Ty very much!

ghost commented 1 year ago

I made it! I just had to update "updatetime" value to 0.3 sec. Now it works like a charm! for anyone interested, just checkout my "echoDoc" branch (https://github.com/0x0DEADBEE/dotfiles/tree/echoDoc) (I followed this https://stackoverflow.com/questions/41416072/change-the-hold-time-of-the-cursor)

ray-x commented 1 year ago

what was your setup of update time? Mine is 1sec.

ghost commented 1 year ago

it was 3 sec. I set 0.3 sec

ray-x commented 1 year ago

ok, 3s is a bit too long. That might be why you do not see the updated info.