mathworks / MATLAB-language-server

MIT License
82 stars 10 forks source link

matlab-languager-server cannot support lsp functions in neovim #35

Open Jaehaks opened 6 months ago

Jaehaks commented 6 months ago

Describe the bug matlab-languager-server cannot support lsp functions except for linting in neovim. it detect syntax error every time when I save the file, but other functions (syntax highlighting, hovering, go to definition , etc..) do not work. My configuration is right?

When I call vim.lsp.buf.hove() , I got error like [ textDocument/hover is not supported by any of the servers registerd ]

To Reproduce 1) nvim-lspconfig.lua image image

2) lsp-zero.lua image

3) mason.lua image

4) nvim-cmp.lua image

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Useful Information

Additional context Add any other context about the problem here.

rkmiec commented 3 weeks ago

vim.lsp.buf.hover() method is not supported by this language server. There are other methods that you can check, such as vim.lsp.buf.definition() even though it doesn't always show the correct line in the file. LSP is not responsible for your syntax highlighting in neovim - it is probably done by treesitter.

Once you call vim.lsp.buf.definition() do you get any error? If not, can you paste last few lines of your lsp log (you can open it with :LspLog command in neovim).