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
0 votes
0 answers
19 views

How do I get the vscoq client and the vscoq lsp to work with Neovim?

I am trying to use the Neovim client vscoq.nvim which uses the vscoq lsp. I have currently installed the vscoq lsp globally and am using it with VSCode, but I'd like to use it with Neovim. I use Lazy ...
Madara's user avatar
  • 101
1 vote
1 answer
23 views

Neovim syntax highlighting from STDIN

I am trying to get Neovim to auto-detect the filetype/syntax when piping text into nvim. Example: docker inspect 1234 | nvim Outputs JSON as follows: [ { "Id": "...
Zach B.'s user avatar
  • 135
0 votes
0 answers
9 views

Is it possible to create a keymapping that imports the only choice for an undefined word, otherwise shows a list?

In IntelliJ IDEA, hitting Option+Enter over an undefined term would import the only choice if there was only one, otherwise would bring up a list of choices. Currently using LSP and Telescope, I have ...
Andrew Cheong's user avatar
0 votes
0 answers
27 views

builtin lsp completion not working

Using neovim 0.11 I wanted to use the built in completion feature, here's my configuration to use it when the lsp is being used: vim.api.nvim_create_autocmd("LspAttach", { group = ...
bebenzer's user avatar
0 votes
0 answers
12 views

Which client is used from vim.lsp.formatexpr() when multiple clients attached in a buffer on Neovim?

Now nvim-lspconfig sets 'formatexpr' to v:lua.vim.lsp.formatexpr(). But the help for that function says that supports only a single client. formatexpr({opts}) *vim....
kyoh86's user avatar
  • 1
0 votes
0 answers
24 views

not able to accept LSP response

I started using lsp-zero for my neovim but i am not able to accept the responses that it gives. I am able to see the suggestions, definitions, etc perfectly. I am able to use up down arrow to move ...
Anirudh Gupta's user avatar
0 votes
1 answer
30 views

Does the nvim-jdtls support method or field in addition to class for lsp_workspace_symbol?

I noticed that when I use :Telescope lsp_workspace_symbol query=xxx I only get results of type class, in other words it only find classes with that xxx in the name, but not methods, fields, ...
RubenLaguna's user avatar
0 votes
1 answer
31 views

Is there a way to adjust the file maxSize for the intelephense lspconfig

at my job we have a php file that is over 1mb in size. Intelephense won't run on it. Is there a way for me adjust the settings to increase the maxSize that it takes? I'm currently trying the following....
Ryan's user avatar
  • 1
2 votes
1 answer
126 views

Why am I missing the LSP mappings gra, grn, grr and CTRL-S that neovim LSP is supposed to create automatically?

According to the documentation on `:h lsp-quickstart : Some keymaps are created unconditionally when Nvim starts: grn is mapped in Normal mode to vim.lsp.buf.rename() gra is mapped in Normal and ...
RubenLaguna's user avatar
0 votes
1 answer
46 views

Get attached lsp server name

I am trying to show on lualine the current attached LSP server name. I don't want to install plugins in order to do this so I am searching for a way to do it with the Neovim API. I've read the docs ...
Nias26's user avatar
  • 13
0 votes
1 answer
49 views

Why doesn’t Neovim highlight or lint my arduino code?

I have kickstarter installed. I used Mason to install the arduino LSP implementation. The arduino CLI is installed along with the standard arduino IDE, clangd, and treesitter. Im using a lilygo gsm ...
myblackhatch's user avatar
0 votes
1 answer
57 views

How to remove the snippet items from clangd in suggestion list of nvim-cmp?

I disable snippet support of clangd with following configuration. capabilities = { textDocument = { completion = { completionItem = { snippetSupport = false, ...
cpcopy's user avatar
  • 1
1 vote
0 answers
101 views

Angular Language server crashes when working on an `nx` project with `nx serve`

The Angular language server in nvim crashes after each automatic rebuild/reload of nx serve. It crashes with Program does not contain "<PROJECT_PATH>/apps/org/src/app/app.component....
Thomas's user avatar
  • 119
1 vote
1 answer
57 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
59 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
220 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
47 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
  • 724
0 votes
1 answer
36 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
418 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
30 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
2 votes
2 answers
174 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
74 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
1k 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
26 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
425 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
  • 509
0 votes
0 answers
61 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
39 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
24 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
113 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
439 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
26 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
65 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
147 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
122 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
72 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
44 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,186
0 votes
0 answers
64 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
400 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
31 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
1k 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
4k 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,483
0 votes
0 answers
1k 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
1k 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
329 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
1 vote
0 answers
3k 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
1 answer
124 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
4k 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
805 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
1k 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
70 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