128 questions
1
vote
0
answers
107
views
Inlay hints not appearing with nvim-lspconfig
I'm using nvim-lspconfig and inlay lines are not showing up for any rust file I'm editing.
Here's the config located in .config/nvim/lua/plugins/lsp-config.lua
{
"neovim/nvim-lspconfig",
...
0
votes
1
answer
302
views
dartls error as Neovim LSP server for a Flutter project
I am using Lazyvim, a Neovim distro as an editor for my Flutter project in Windows. I installed flutter-tools.nvim and installed dcm using mason.
The setup is ok, but I am having trouble with the go ...
0
votes
0
answers
90
views
config "tofu_ls" not found. Ensure it is listed in `config.md` or added as a custom server. Why am I getting this even though its is present in config
This is my lsp config for nvim,
return {
"neovim/nvim-lspconfig",
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
branch = "master",
...
1
vote
0
answers
42
views
Why DenoLS is removing all blank lines? Code unreadable (NeoVim + AstroNVim)
I don't know why, but seems that denoLS is removing all blank lines, no matter what, from my Deno scripts, which is making the code very cramped and, is a very annoying behaviour of the formatter.
Why?...
3
votes
1
answer
4k
views
Setting up handlers for mason-lspconfig in Neovim with luasnip returns a nil value
I received a nil value when attempting to override the mason-lspconfig handlers in my configuration using the following code.
There was a similar issue and solution raised on GitHub at nvim-luasnip, ...
1
vote
1
answer
100
views
NeoVim nvim-cmp - crashes when typing "$" in CSS/SCSS files
After installing "nvim-autopairs" which generates matching closing tags for functions/css etc, I am getting this error.
Now I have Lazy Package Manager installed, which installed nvim-...
1
vote
1
answer
317
views
clangd doesn't find standard libs, throws error in line #include <vector> stating "file not found"
I'm using nvim 0.11.1 in a lsp config, and got clangd installed via mason.
The project I'm working on uses the picoSDK, and clangd works inside nvim.
The problem is, that it can't seem to find the lib ...
1
vote
1
answer
37
views
Failing to get pontusk/cmp-sass-variables to work in NVIM Kickstart with Lazy package-manager
Problem: no completions of SCSS variables like $color-red in all files. I tried autocompletes in variables.scss file itsself. In other SCSS files like general.scss which includes the variables.scss ...
0
votes
0
answers
103
views
Nvim ESLint not working properly in React TypeScript
I have a React TypeScript project, here is .eslintrc.json:
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:...
1
vote
1
answer
611
views
Configuring Protobuf support for NeoVim
I am trying to configure Protobuf LSP support with nvim (I am using Lazyvim package manager). I've read here that bufls is deprecated and that we should be using buf_ls. Using this snippet, I've ...
1
vote
0
answers
270
views
GoPls LSP is not loading manually when I open a .go file
I have configured the gopls LSP as shown below in lspconfig.lua:
lspconfig.gopls.setup {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = {"gopls"},
...
2
votes
0
answers
66
views
How to setup compilerOptions during tsserver.setup({})?
Hi I've been trying to setup my nvim lsp tsserver compilerOptions during initialization of my lsp but failed. Current docs does not specifically have the compilerOptions in their examples.
I tried to ...
0
votes
0
answers
81
views
Neovim -Lsp "angularls" cannot find root. Runs in "Single File Mode"
So I'm running my angular project in Neovim (started recently) and when I open a project file and run :LspInfo it says root directory: Running in single file mode. But that doesen't help me at all ...
1
vote
1
answer
1k
views
Vue LSP(Volar 2.0) in neovim doesn't work for script section
I recently start working on vue3 framework. As a neovim(neovim 10.0) user I wanted to integrate lsp server in my workflow. I finally wrote the the config like this.
local lspconfig = require "...
0
votes
1
answer
568
views
NeoVim omnisharp LSP, getting an error for go to def
I am trying to set up my go to definition for omnisharp. I read in the docs that I need to get omnisharp extended for the go to definition functionality to work, however I'm still getting this error. ...
1
vote
1
answer
1k
views
NVIM Cmp LSP autocomplete not working. Using mason.nvim alongside nvim-cmp
I've been trying to get my autocomplete working. It works when I hit ctr space but everything I get says text.
Here is my lsp config:
local on_attach = function(_,_)
vim.keymap.set('n', 'gd', vim....
2
votes
2
answers
2k
views
How to stop JDTLS quitting ("Exit code 13 and signal 0") every time I open a java file in neovim?
I am fairly new to using neovim and set things up with kickstart.nvim. I tried to setup jdtls to run with mason. It was working fine until today, when it has been quitting immediately upon opening of ...
3
votes
1
answer
788
views
Why are both denols and tsserver attaching to the same TypeScript project in Neovim?
I'm using Neovim's lspconfig plugin to manage LSP servers for my development environment. Whenever I open a TypeScript file, both denols and tsserver attach to the same buffer, causing conflicts.
When ...
2
votes
2
answers
857
views
Unable to use rename in neovim with ruby lsp
I have tried this with a custom configuration and with the default LazyVim distribution.
When I trigger vim.lsp.buf.rename(), for example in LazyVim with <leader>cr I get a error message stating ...
1
vote
0
answers
152
views
How to execute `typescript.goToSourceDefinition` in neovim with lspconfig
I'd like to jump to the actual implementation typescript function in neovim instead of the type definition. From what I've read I must execute the "typescript.goToSourceDefinition". I'm ...
4
votes
1
answer
846
views
Setting up denols to work along with tsls in kickstart neovim
I want to set up language server for my JS/TS project with Deno. I am using modular_kickstart which is a fork of kickstart neovim. I have put my config for deno in my lspconfig.nvim plugin file like ...
1
vote
1
answer
1k
views
Neovim with mason cannot launch typescript-language-server
I'm a beginner nvim user (version v0.11.0-dev). I've got my config forked from kickstart.nvim and it works on my personal machine with EndeavourOS. On my work laptop, I've got Windows with WSL, on ...
3
votes
0
answers
382
views
Executing a command on only one of the attached LSP servers in Neovim
I'd like to run a ruff supported command on my buffer, to fix all possible auto-fixable issues with some piece of Python code.
I followed the setup instructions in nvim-lspconfig (note: I'm also using ...
0
votes
0
answers
1k
views
How to customize rustfmt style with rust-analyzer
How do I get my lsp config in neovim to format my rust code in the desired style? How do I get it to follow what's prescribed in ~/.config/rustfmt/rustfmt.toml? Is my global rustfmt.toml incorrect or ...
0
votes
1
answer
2k
views
How to configure nvim-cmp for autocompletion
I am starting to use Neovim and need some basic functions, like autocompletion. I went with vim-plug plugin manager for neovim and found nvim-cmp as autocompletion.
My problem is that when I copy the ...
2
votes
0
answers
458
views
Clangd auto-inserts C++ headers instead of C headers
The header insertion for clangd imports C++ style headers as opposed to C style headers when editing *.c files.
For Example: ctime as opposed to time.h
Is there any way to disable this?
Nvim Lspconfig ...
1
vote
2
answers
2k
views
How to disable LSP virtual text
My neovim details:
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
OS details (if useful)
WSL2
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: ...
3
votes
1
answer
611
views
ESLint and TSServer errors reported twice in diagnostics
I'm trying to configure ESLint for my React (TypeScript) project.
This is my initial eslint.config.js file located in the root of the project.
// @ts-check
import eslint from "@eslint/js"
...
2
votes
0
answers
252
views
Go to definition in current window if split windows for the same buffer
When I opened two split windows for the same buffer and called vim.lsp.buf.definition, if the symbol definition is in the same file, it would always jump to definition in the first window.
Is there a ...
1
vote
0
answers
892
views
Neovim LSP: how to configure two servers running alongside each other for one filetype?
How do I configure two language servers (pylsp and Jedi-lsp) such that I can use Jedi for "Go to definition" code action and pylsp for everything else (formatting, autocompletion, etc.)?
The ...
1
vote
0
answers
782
views
How to change Neovim LSP configuration schema/settings?
I am trying to override the default LSP configuration schema for pyright within neovim. I have installed my lsps using Mason and Mason-lspconfig and am using the recommended setup from LSP-zero. The ...
1
vote
1
answer
319
views
Set diagnostics configuration per LSP
I have the following in my config
vim.diagnostic.config {
virtual_text = false,
underline = false,
update_in_insert = false,
float = {
focusable = false,
style = 'minimal',
border =...
2
votes
1
answer
637
views
How to disable coloring out the section of code between macros?
I have source files that contain macros loaded by a proprietary build toolchain. Unfortunately, Neovim doesn't have a plugin for the configuration file (emProject from SEGGER) and doesn't recognize ...
1
vote
1
answer
828
views
Custom configuration for NvChad is not working
"nvchad.mappings"
-- add yours here
local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk&...
0
votes
1
answer
847
views
How to configure the angular-language-server in NvChad for a NX monorepo?
I'm trying to make the Angular language server work in NvChad, for a NX monorepo, but it doesn't seem to work. This is what I've pieced together from different sources on the internet:
-- EXAMPLE
...
1
vote
0
answers
886
views
Cannot access configuration for ruff via lspconfig
I am using ruff, ruff-lsp, pyright and using the distro Astrovim. Whenever I open a file, I get the following warning,
[lspconfig] Cannot access configuration for ruff. Ensure this server is listed in ...
8
votes
1
answer
5k
views
How to use clangd as formatter in neovim?
I am using nvim with lazy and using mason, mason-lspconfig, nvim-lspconfig as follow
return {
{
"williamboman/mason.nvim",
config = function()
...
0
votes
3
answers
997
views
Neovim mason diagnostics not recognizing header files
I recently started using nvim and started playing with some plugins. I found Mason to be extremely useful. However, I find it bit annoying that Mason diagnostics complain about missing header files (...
2
votes
2
answers
2k
views
How to import symbol under cursor from another Python module using Neovim & LSP
I am a Python developer and would like to use Neovim as my main code editor. I have managed to configure auto-completion, linting and auto-formatting using lspconfig, mason, null-ls, nvim-cmp and ...
2
votes
1
answer
2k
views
How to enter hovered diagnostic?
If I want to see or copy whole diagnostics, I have to click it with my mouse. Is there any way to enter hovered diagnostics automatically after hovering diagnostics? enter image description here
I ...
2
votes
0
answers
1k
views
"Go to Definition" not working in Neovim in Golang's tests
"Go to definition" is working fine in normal code base, but it's just not working in tests. Here's the error message:
Error when executing textDocument/Definition : no package metadata for ...
1
vote
0
answers
249
views
Diagnostic syntax highlight not showing on code lines
I want to set up a custom NeoVim configuration, but I have a problem with syntax highlighting.
I can't find a way to show lint errors with syntax highlighting on this repository. I would like to ...
1
vote
0
answers
165
views
Strange behavior in nvim for lsp virtual_text
I have a strange behavior in nvim with lsp virtual_text. When I enter command mode and exit, the symbol for virtual_text changes to the default symbol.
So how do I stop this strange behavior?
Config ...
1
vote
0
answers
956
views
nvim lsp and lsp-config restarting server on new nvim instance
So I have the LSP client and lsp-config setup and running for typescript and golang.
The problem is when every I start up nvim a project, it takes about 1~2 minutes before the LSP is ready and I can ...
2
votes
0
answers
1k
views
Pyright Language Server with Neovim not loading new files
When I am creating a new file in neovim (without closing the neovim instance), I am unable to import the variables from those files (import the new file as a module) in other files of my project ...
6
votes
0
answers
1k
views
Setting Biome root directory on nvim with lspconfig
This isn't a problem but a solution in case anyones meets it as a problem.
While setting up biomejs with the lspconfig on neovim, the root directory returns "not found".
This will fix that.
...
1
vote
0
answers
440
views
LazyVim: Two LSP clients launched
I'm using the latest LazyVim version.
Here LspInfo output:
Press q or <Esc> to close this window. Press <Tab> to view server doc.
Language client log: /home/jcabre/.local/state/nvim/...
2
votes
1
answer
4k
views
How do I enable Intelephense for my Neovim config?
I have a Neovim config that i use for C/C++, Python, Assembly, Rust and PHP, and in all of those the LSP's are working - highlights, coloring, autocomplete, all the things - except in Asm and PHP. I ...
1
vote
2
answers
1k
views
when i open nvim show me error massage from ast-grep
machine : arch linux
there is an error massage show when i open neovim from ast-grep lsp :
the error massage: LSP[ast_grep] Failed to load rules: Cannot read configuration.. No such file or directory (...
0
votes
0
answers
1k
views
Nvim-jdtls doens't work for a big java project
I'm working on a big Java project. The project uses Java 1.8 but I have installed Java 20 for jdtls.
The projects uses only an and build and tomcat. I'm currently using eclipse for the project but I ...