Skip to main content

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
1 vote
1 answer
16 views

Unable to set custom colors for LSP errors

I have a custom color scheme and I've provided colors for LSPDiagnostics and Errors, but none of them are working. As seen, errors should be red, but the errors I see are yellowish in color Tried a ...
Riptide's user avatar
  • 153
0 votes
0 answers
37 views

LuaSnip VScode snippets for Apex not showing

In Neovim I tried adding my own VSCode style snippets for Apex programming language to LuaSnip and I can't get it to work. This is my packer.lua file: vim.cmd [[packadd packer.nvim]] return require('...
Makary's user avatar
  • 1
0 votes
0 answers
76 views

arduino-language-server is not attached to buffer with nvim-lspconfig

I'm trying to use arduino-language-server in order in my neovim configuration. I'm using NVIM v0.11.0-dev-164+g3a1515bfe (latest nightly version), and use nvim-lspconfig, and mason to set up my lsp. ...
Curs3W4ll's user avatar
0 votes
2 answers
25 views

How to get default Generic Keywords autocomplete functionality when LSP is in use?

I used to rely heavily on the default autocompletion provided by the Ctrl + n keys in the insert mode. But when I started to use NeoVim and its LSP functionality, the keys started to provide a ...
d.k's user avatar
  • 696
0 votes
1 answer
19 views

How do I pass on the "max-len" configuration parameter to ESLint?

How do I tell eslint in my neovim config to limit line lengths? I think this is the max-len parameter, but where do I put it in the config? Here's my eslint config: eslint = { on_attach = ...
quant's user avatar
  • 105
2 votes
1 answer
118 views

Neovim: Is there any way to silence lsp/diagnostics messages by regex?

Jumping to the solution, I know, apologies. Context: I work on a large Django code base where mypy is too slow to be usable, so I use pyright, which is fast enough but can't handle some of the Django ...
hwjp's user avatar
  • 121
1 vote
0 answers
18 views

NeoVim Groovylsp [closed]

Is groovylsp available on Windows? I use with mason and mason-lspconfig and groovyls, but I don't get autocompletion.
Ikropka's user avatar
  • 11
0 votes
0 answers
26 views

Is it possible to run LSP diagnostics across the whole worksapce?

My LSP config works perfectly for the current buffer, but sometimes I just want to check the whole project and find all problems. I know that folke/trouble.nvim could show workspace diagnostics, but ...
user3091821's user avatar
0 votes
0 answers
32 views

pylsp + vim.lsp.buf.format not working

require'lspconfig'.pylsp.setup { settings = { pylsp = { plugins = { autopep8 = {enabled = false}, black = {enabled = true}, ...
mankind86's user avatar
1 vote
0 answers
505 views

How to solve [lspconfig] Cannot access configuration

I am just starting to learn Neovim so I downloaded LazyVim after watching some youtube videos and I followed those steps but now it is showing this error message after I undid the comment on ...
Crystal Shrestha's user avatar
0 votes
0 answers
17 views

Prevent some lsp from creating commands

Ocamllsp spawns new commands like OCamlSwitchNewWin, overriding some of mine. How to prevent such ? local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = vim....
Carbone_13's user avatar
1 vote
2 answers
141 views

init.lua - Remove default mapping recursively

I want to use the i_CTRL-G mapping to abort the current cmp selection, but i_CTRL-G is already used by neovim. I tried to delete the mapping with this: vim.keymap.del('i', '<C-g>') But it just ...
Bog's user avatar
  • 489
0 votes
0 answers
34 views

How can implement deno organize imports like vscode in neovim with nvim-lsp

How can i implement a command on denols that organize imports like vscode does? I use nvim-lsp example for typescript: local function organize_imports() local params = { command = "...
Igor Brasileiro's user avatar
0 votes
0 answers
26 views

Auto importing issue from installed npm packages in neovim (only in js not ts)

I mainly use Neovim for my MERN stack work and it's been a few days, I have noticed that from some of the installed npm packages of my project, I wasn't able to auto-import the functions or components....
Nitesh's user avatar
  • 1
0 votes
0 answers
19 views

Get Stuck When Opening a file with thousands of lines by LSP-enabled Vim on Windows MSYS2

I am trying to recreate the Vim environment on Windows MSYS2 with my Linux Vim settings. But I found that when the LSP (prabirshrestha/vim-lsp) is turned on, sometimes the file gets stuck when opening ...
aRedR's user avatar
  • 1
0 votes
0 answers
54 views

nvim-lspconfig cannot go to definition to jdk or external library

I'm using Kickstart.nvim config with enabled jdtls LSP server for java but I have problem with go to function definition. vim.lsp.buf.definition() command (to jump to the definition) works for all the ...
Damian S.'s user avatar
1 vote
1 answer
124 views

Pyright LSP, leading spaces appears as "&nbsp;" in hover

I am using pyright LSP with the neovim (0.10.0-dev), and am seeing any leading spaces in docstrings replaced by &nbsp;. For example, see the attached image: As far as I can tell it seems very ...
Tom's user avatar
  • 11
0 votes
0 answers
19 views

Is there a Neovim plugin that can parse a .vscode directory and set up the LSP client accordingly?

I cloned a project off GitHub recently which comes with a VSCode configuration for telling clangd where all the headers are, providing run configurations etc. Is there an existing plugin I can ...
wallefan's user avatar
  • 171
0 votes
0 answers
53 views

How do I make use of LSP Code Action extensions?

I've been using neovim and lspconfig for quite some time. Today I noticed that some LSP servers have some sort of extensions, like extract variables and add constructor to the class, which lspconfig ...
Jay's user avatar
  • 1
1 vote
0 answers
99 views

Neovim only underline LSP diagnostics that are part of a line

I only want an LSP diagnostic to have an underline if the underline covers only part of the non-whitespace text of a line. I have a column of diagnostic signs so a full line being underlined gives no ...
KangarooChief's user avatar
0 votes
1 answer
79 views

Omnifunc doesn't trigger after a few uses

I use omnifunc with the neovim built in LSP functionality and this is my configuration. local lspconfig = require("lspconfig") vim.opt.completeopt = { "longest", "menuone"...
YJH16120's user avatar
  • 135
0 votes
2 answers
69 views

Creation of a short document description for programming languages in a pop-up window like vscode?

How can we have a short summary about documents of programming languages (Python and Javascript is important for me) or frameworks in Neovim? I want to see a short description of APIs and keywords in ...
mohamadi_arch's user avatar
0 votes
0 answers
27 views

Can you trigger a specific lsp code action programmicaly?

Doing the equivalent of :lua vim.lsp.buf.code_action() And pressing a key. I tried some variants like :lua vim.lsp.buf.code_action() :sleep 5 :call feedkeys('4','t') doesn't seem to work.
eyal karni's user avatar
  • 1,136
0 votes
0 answers
46 views

How to make lua_ls provide completion for luasnip methods?

I am using luasnip in Neovim and I'm having problems getting lua_ls to provide information about the functions. local ls = require("luasnip") local s = ls.snippet Basically, I want when ...
darkfrobozz's user avatar
1 vote
1 answer
248 views

How to enable Qt completion with clangd in Neovim?

I use nvim-cmp. I have installed the clangd with Mason, and configured it with `lsp-config.nvim as: local capabilities = require('cmp_nvim_lsp').default_capabilities() lspconfig.clangd.setup { ...
Vladyslav Rehan's user avatar
0 votes
0 answers
28 views

How to add specific module in ways that lspconfig can recognise it?

I have a project that is structured something like this --project_name |- bin/main.py |- some_module |- file_a.py |- file_b.py |- ... |- .vscode/launch.json import sys from some_module....
Sito's user avatar
  • 121
2 votes
2 answers
705 views

Run pyright in single file mode and some questions

I have pyright set up as an lsp in neovim and my configuration is like this: lspconfig.pyright.setup({ on_attach = on_attach, capabilities = capabilities, root_dir = function(fname) local ...
f4T1H21's user avatar
  • 23
0 votes
1 answer
2k views

How do you toggle inlay hints?

Previously, vim.lsp.inlay_hint.enable() used to toggle inlay hints. However, this functionality has been removed and now vim.lsp.inlay_hint.enable() just enables inlay hints. How can I toggle inlay ...
Evan Carroll's user avatar
  • 1,404
0 votes
0 answers
741 views

How do I make the bashls language server work with nvim-lspconfig?

bashls is not working. I have multiple working servers with nvim-lspconfig yet I can't figure out how to make the bashls server work at any capacity. I've tried this ... other lsps ... ...
Quadro Developer's user avatar
1 vote
1 answer
809 views

How to configure tsserver with nvim lspconfig?

I'm trying to configure tsserver via neovim lspconfig. Currently I am trying to enable logging to verbose mode: lspconfig.tsserver.setup { on_attach = on_attach, capabilities = capabilities, ...
faileon's user avatar
  • 11
1 vote
0 answers
244 views

How to have automatic function parameter hint popup in NeoVim ( LunarVim ) with pyright LSP?

Greetings NeoVim version: NVIM v0.9.5. I have recently installed NeoVim, with LunarVim configuration on top. My LSP is Pyright. Everything about the LSP and configuration is great, but everytime I'...
KhodeNima's user avatar
  • 131
0 votes
0 answers
2k views

How to use OmniSharp C# LSP with Mason in nvim properly?

I have installed the fomlowing plugins: mason.nvim mason-lspconfig.nvim nvim-lspconfig nvim-cmp cmp-nvim-lsp (I may have forgeotten to include something, but in any way I can use LSP with this setup ...
Vladyslav Rehan's user avatar
0 votes
0 answers
91 views

Display LSP suggestions for TypeScript TSConfig files with Neovim & nvim-lspconfig using jsonls

I'm using Neovim with the nvim-lspconfig plugin and for some projects, it would be great to have the TypeScript suggestions for JSON files such as TSConfig, but even though I'm not working with them ...
Amin NAIRI's user avatar
0 votes
1 answer
3k views

How to setup up LSP for C/C++ in Vim? [closed]

I would like: auto complete, navigation, refactoring using LSP in Vim not in Neovim. I would like some guide and example to setup .vimrc Can I find one?
Jumogehn's user avatar
  • 165
0 votes
1 answer
612 views

How to configure pylsp installed by Mason with lsp-zero for nvim?

I want to disable a specific error/warning - E203. This is my lsp.lua where I tried to add ignore config according to this doc from lsp-zero git local lsp = require("lsp-zero") lsp.preset(&...
hdw3's user avatar
  • 101
0 votes
1 answer
994 views

Autocomplete and suggestions don't work

My autocomplete is not working. First, let me say that I'm a noob using lazyvim but I'm so enthusiastic about it and I'm trying to learn. Trying to code in any language I don't get any language ...
Newbie_user's user avatar
2 votes
1 answer
65 views

Navigate to the URL provided by a COC LSP exention's diagnostic output

The diagnostic popup for some of the COC LSP extensions include a URL to get more information about a particular error. For example, coc-sh shows this (invoked through a mapping that calls <Plug&...
Pak's user avatar
  • 1,124
0 votes
1 answer
4k views

Simplest setup for nvim and rust and system rust-analyzer

All the tutorials that I found to use nvim with rust-analyzer either suggest using Packer (which is unmaintained since August), vim plugin managers (I really want to avoid anything vimscript, it's ...
Olivetree's user avatar
  • 103
0 votes
0 answers
31 views

Neovim :Explore weird behaviour

I'm new to neovim. I've been using the :Explore command to go to netrw, but when this happens the color scheme becomes inverted and my lsp starts trying to process the netrw buffer. This gets fixed ...
Parker D's user avatar
0 votes
1 answer
2k views

Getting Failed to run `config` for nvim-lspconfig error when installing gopls

I'm trying to refresh all my old school vim setup to lsp based ones. As part of this effort I'm going to use lazy.nvim as the plugin manager. I was able to get everything working until the part where ...
mohi666's user avatar
  • 101
2 votes
2 answers
796 views

Docker-Compose LSP will not attach to buffer nor automatically start

With the current default configuration of the "docker_compose_language_service" LSP, it will not start, nor attach after being started to the current buffer. When taking a look at the ...
CoffeeCrash's user avatar
1 vote
1 answer
965 views

How do I configure plugins in AstroNvim?

I'm using AstroNvim. I've cloned the template based repo to ~/.config/nvim/lua/user. How do I configure clangd, for example, to use LLVM code style instead of Google's or to use 4 spaces tab ...
AnonNothing's user avatar
0 votes
0 answers
110 views

How to disable semantic tokens for telescope?

I had semantic tokens automatically applied by my LSP, but I was able to disable it using this code: callback = function(args) local client = vim.lsp.get_client_by_id(args.data.client_id) ...
abbood's user avatar
  • 743
0 votes
0 answers
196 views

How to disable tsserver check on JS file

I am a newbie to neovim, so please bear with me. I am using Mason to configure my LSP servers. For Javascript I use tsserver. However I am getting error/hint 'Could not find declaration file for ...
Petr Bělecký's user avatar
1 vote
1 answer
1k views

How to disable lsp server syntax highlighting?

I found out that my lsp servers is somehow adding this ugly highlighting to my code (this happened after I updated my Homebrew for some reason), here are before and after pics: Here is my lsp server ...
abbood's user avatar
  • 743
0 votes
0 answers
412 views

goto definition

I'd like to have a shortcut ('gD', say) to go to the definition using vim.lsp.buf.definition; however, in a new tab (if this is not open yet), or in the tab already open.
Alois Pichler's user avatar
0 votes
1 answer
1k views

Error when configuring lspconfig with mason

I'm trying to set up autocompletion, fixing, etc. for lua files in Neovim. I started by trying to follow the instructions from this video: https://www.youtube.com/watch?v=lpQMeFph1RE&t=188s ...
quant's user avatar
  • 105
1 vote
0 answers
810 views

TypeScript LSP Not Reading tsconfig.json

I am almost certain that I have a mistake in my Neovim configuration... The Neovim ~/.config/nvim directory I'm using is: https://github.com/andrewgregorywright/nvim-config/tree/main I've created an ...
Andrew's user avatar
  • 111
0 votes
0 answers
69 views

Nvim-lspconfig sorting diagnostics floating windows

Is there a way to raise floating windows by their type in nvim-lspconfig? Like in this situation I would like to see the documentation window above the errors window. Many thanks in advance.
Thomas's user avatar
  • 1
2 votes
0 answers
65 views

Error setting up julia language server in Neovim

When I try to use julials I get the following prompt: Client quit with exit code 1 and signal 0 These are the lsp log [ERROR][2023-09-24 23:12:43] .../vim/lsp/rpc.lua:677 "rpc" "/...
kay's user avatar
  • 61