Questions tagged [lsp]

Language Server Protocol is used between an editor or IDE (such as Vim or NeoVim) and a language server (such as clangd or many others) that provides language features like auto complete, go to definition, find all references etc.

Filter by
Sorted by
Tagged with
0 votes
1 answer
144 views

How to setup intelephense with neovim + lua?

I have 2 neovims, one with coc, and another with lua. In neovim with coc, intelephense works. I am working with wordpress, and i need intelephense. Nvim coc setup. plugins.vim Plug 'yaegassy/coc-...
user avatar
  • 15
0 votes
0 answers
29 views

HTML Lsp missing format shortcut

I'm having a problem in Neovim with Lsp formatting in Html files. :checkhealth is Ok :LspInfo is Ok, html is attached I have a shortcut for formatting, buf_set_keymap("n", '<space>fo', ...
user avatar
0 votes
1 answer
24 views

How can i use Enter to select item from popup menu?

I am using UltiSnippets let g:UltiSnipsExpandTrigger='<None>' let g:UltiSnipsJumpForwardTrigger = '<tab>' let g:UltiSnipsJumpBackwardTrigger = '<S-b>' let g:coc_snippet_next = '<...
user avatar
  • 15
0 votes
2 answers
798 views

How to configure neovim to properly format python code?

I have neovim 0.8.0 installed. I have neovim/nvim-lspconfig plugin installed. I have installed pyright language server on my system (pip install pyright) I have configured neovim to use the pyright ...
user avatar
  • 307
0 votes
1 answer
218 views

How do I close a hover'ed window with LSP information, Escape does not work?

Whenever I open a hover window with my LSP plugin, :lua vim.lsp.buf.hover() I get a floating window hovered over text, but then I can not close it? I've tried ESC and the like. How do you close these ...
user avatar
0 votes
1 answer
107 views

neovim lsp configuration

I'm a begginer in vim/neovim world. I understand that lsp is for autocompletion, auto import, signature info, etc... So I have installed coc.nvim. But I have some question about the concept : if I ...
user avatar
  • 101
0 votes
0 answers
366 views

How to install sumneko_lua

I'm a Mac user with complete lua config. I have tried installing sumneko_lua in Neovim 0.6.1 several times but without success. Frustration led me to open this question. I have also read and tried to ...
user avatar
  • 113
0 votes
1 answer
363 views

keymap for LSP code formatting in visual mode

In neovim I would like to set a keybinding -- via lua config -- to use LSP to format the visual selection when I type \qf. Using this setting, I can format the whole buffer from normal mode: vim.api....
user avatar
  • 101
0 votes
0 answers
74 views

Enable icons for nvim-lsp

How to enable icons inside autocomplete window for nvim-lsp plugin? Now my autocomplete windows looks like this: But want make something like that:
user avatar
0 votes
0 answers
23 views

Finding a way to remove right brackets of the lsp completion

Is there any way to remove the > in .h>? As the gif above, it duplicates the one in the #include <> snippet. Both completion seems to be provided by the lsp. environment Neovim v0.6.1 ddc....
user avatar
  • 1
1 vote
0 answers
237 views

Reformatting with neovim LSP and clangd adds double carriage return (^M) on line breaks

I am using neovim (0.6) and its built-in LSP with clangd-12 for C++. When reformatting a file that uses DOS-style line endings, it for some reason uses a double carriage return, resulting in one ^M ...
user avatar
  • 141
0 votes
1 answer
618 views

Neovim 0.5+ setup as Rust IDE

So I am trying to set up neovim 0.5+ as a rust IDE. I am following this guide. Except, as shown in the guide, there is not completion even after doing <c-x><c-o>. I have kept the config in ...
user avatar
0 votes
0 answers
168 views

Can I go to the implementation in the c project with lsp?

I'm separating the functions from main.c to func1.c func2.c, then I'm using util.h to store the prototype (all name of all functions). PROBLEM when I try to go to implementation, lsp leading me into ...
user avatar
1 vote
0 answers
536 views

LspConfig code action does not work

I have problems with LspConfig when extracting a method to a new file. When executing the following command buf_set_keymap("n","<space>ca","<cmd> lua vim.lsp.buf....
user avatar
1 vote
0 answers
740 views

Neovim nvim-jdtls Error Client 1 quit with exit code 13 and signal 0

i tried setting up my neovim with the nvim-jdtls plugin (https://github.com/mfussenegger/nvim-jdtls) But I always get a Client 1 quit with exit code 13 and signal 0 Error Message. I followed the ...
user avatar
1 vote
1 answer
746 views

Neovim LSP with Go

I am trying to set up my Neovim (nightly - latest) with Go (the programming language). However, it doesn't seem to be working, most likely because I'm missing something. I'm not sure what though. ...
user avatar
  • 179
1 vote
1 answer
483 views

Completion sources not recognized by nvim-cmp

I recently transitioned from LanguageClient-neovim to built-in lsp support and completion using omnifunc. However I was enticed by the promise of auto-imports and completion snippets including ...
user avatar
0 votes
1 answer
513 views

rust-analyzer not working in NeoVim on Windows 10

I'm trying to get rust-analyzer working in Neovim, but with no luck so far. I've downloaded the rust-analyzer binary (rust-analyzer-x86_64-pc-windows-msvc.gz) from the rust-analyzer releases page and ...
user avatar
0 votes
0 answers
101 views

neovim lsp client jump to implementation in another project

Nvim info NVIM v0.5.1 Build type: Release LuaJIT 2.1.0-beta3 Also using nvim-lspconfig, and tsserver Filesystem dir structure |--home |--project-A |--src |-- |--/* ...
user avatar
0 votes
1 answer
80 views

Make LanguageServer aware of requirements without activating virtual environment (Python)

I have a typical python project structure: ├── requirements.txt └── src.py where requirements.txt is holding the requirements of my project, and src.py has my code. In my minimal example, they look ...
user avatar
-1 votes
1 answer
627 views

Error while configuring nvim cmp

I am trying to configure nvim-cmp (https://github.com/hrsh7th/nvim-cmp), by adding the following lines to ~/.config/nvim/lua/lsp-config.lua. After this, when I start nvim, I get an error as shown in ...
user avatar
0 votes
1 answer
165 views

Typescript add missing import on cursor?

I'm working on a TypeScript-React project using neovim, because I love it. I want a feature: when my cursor is on a name that has not been imported, I can press some key-combination to choose which ...
user avatar
  • 761
0 votes
0 answers
89 views

How do I enable completion prompts in Neovim + LSP?

I am using Neovim 0.6.0 nightly (I also have the nvim-lspconfig and hrsh7th/nvim-cmp plugins installed) and have a few different LSP servers which do seem to be working (I have tested them by simply ...
user avatar
  • 373
0 votes
1 answer
189 views

How to setup vim to use clangd on a Visual C++ project (msbuild, cl.exe)

How do you setup clangd as an lsp when using a project not built with clang? It's giving really basic lint errors like unknown type name 'uint8_t' because it's failing to process my precompiled ...
user avatar
  • 495
1 vote
1 answer
693 views

Configuring coc.nvim coc-solargraph with standardrb for RSpec files

I am trying to configure coc.nvim for my vim 8.2. I mapped my formatting to leader-d with: nnoremap <Leader>d :call CocAction('format') <CR> which works fine for ruby filetype. However, ...
user avatar
  • 121
0 votes
0 answers
461 views

neovim lsp icons are not appearing in color

I am configuring native lsp of neovim. I have installed neovim-lsp and neovim-lspconfig plugins using vimplug. I have also installed hrsh7th/nvim-compe for auto completion suggestions. Functionally ...
user avatar
0 votes
1 answer
308 views

How to set the diagnostic level for neovim lsp

By default the lsp has set the diagnosticLevel to Hints, i wanna set this to information level. I tried looking at various places but couldn't find much. I am using LunarVim config if that gives extra ...
user avatar
  • 1
4 votes
2 answers
619 views

Is there a way to write a file and skip the autocmd on write?

My .vimrc has, autocmd FileType rust autocmd BufWritePre <buffer> call LanguageClient#textDocument_formatting_sync() This works great, unless my LanguageClient crashes. Then I can't write the ...
user avatar
1 vote
0 answers
648 views

NeoVim latest version autocompletion opens and closes immediately

I am new to Vim and NeoVim, I setup the latest NeoVim on MAC using brew install nvim --head. I setup the latest verison for the lsp suppport. I installed the CoC plugin and the CoC-go plugin for auto-...
user avatar
  • 141
0 votes
1 answer
257 views

What is the term of feature used by on-the-fly checkers?

Here are two screenshots, with vim and neovim, both with configured language server protocol and showing same file: Neovim: Vim: I want to configure neovim to have same style as vim -- I do not like ...
user avatar
  • 121
1 vote
0 answers
288 views

Retrieving declaration not supported for filetype

I am currently using vim-lsp for bash. As in https://github.com/bash-lsp/bash-language-server#vim I have added in my ~/.vimrc the followings : if executable('bash-language-server') au User lsp_setup ...
user avatar
  • 111
1 vote
1 answer
410 views

Vim LSP: change keybindings only if there is a LS attached to buffer

I do maintain there mappings in mv $vimrc: augroup LSP | au! autocmd FileType go,json,yaml nnoremap <silent> <buffer> <c-]> <cmd>lua vim.lsp.buf.declaration()<CR> autocmd ...
user avatar
  • 353
2 votes
1 answer
686 views

View full (non-truncated) diagnostic error

I am using coc.nvim to get "intellisense" on my project. The diagnostic warnings & errors are great. However, sometimes those error messages are quite long, but the coc diagnostics ...
user avatar
  • 121
7 votes
0 answers
181 views

How does NeoVim's native LSP client compare with plug-ins that implement that protocol?

NeoVim v0.5 will include a native LSP (Language Server Protocol) implementation. See Greg Hurrell (wincent)'s Screencast #87: Neovim's built-in LSP client covering it. How does it compare with ...
user avatar
  • 25.8k