Description
(I'm using Neovim v0.11.2 + LazyVim + Mason pinned to v1. IIRC there are still some unresolved issues with the new vim.lsp ecosystem, so first, sorry if this issue doesn't belong here.)
lspconfig correctly adds yarn exec upon first start
|
config.cmd = vim.list_extend({ 'yarn', 'exec' }, config.cmd) |
:
> vim.lsp.get_clients({ name = 'eslint' })[1].config.cmd
< { "yarn", "exec", "vscode-eslint-language-server", "--stdio" }
> vim.lsp._enabled_configs
< {}
And I could confirm the command with ps aux.
However after executing :LspRestart eslint,
> vim.lsp.get_clients({ name = 'eslint' })[1].config.cmd
< { "yarn", "exec", "vscode-eslint-language-server", "--stdio" }
> vim.lsp._enabled_configs.eslint.resolved_config.cmd
< { "vscode-eslint-language-server", "--stdio" }
vim.lsp._enabled_configs somehow got populated with an eslint.resolved_config, where cmd didn't have the yarn exec prefix. I'd see an '[lspconfig] Unable to find ESLint library.' notification, and ps aux also said the vscode-eslint-language-server was executed with node directly.
I understand 'The configs in this repo are UNSUPPORTED and provided only as a starting point', but this might be some more generic issue with built-in LSP and config modifications in on_new_config?
I'm also aware of #3705 and neovim/neovim#32287, but I'm not entirely sure if it's something that'll resolve this problem and whether there's anything we can do in the interim?
Description
(I'm using Neovim v0.11.2 + LazyVim + Mason pinned to v1. IIRC there are still some unresolved issues with the new vim.lsp ecosystem, so first, sorry if this issue doesn't belong here.)
lspconfig correctly adds
yarn execupon first startnvim-lspconfig/lua/lspconfig/configs/eslint.lua
Line 129 in 036885e
And I could confirm the command with
ps aux.However after executing
:LspRestart eslint,vim.lsp._enabled_configssomehow got populated with aneslint.resolved_config, wherecmddidn't have theyarn execprefix. I'd see an '[lspconfig] Unable to find ESLint library.' notification, andps auxalso said the vscode-eslint-language-server was executed withnodedirectly.I understand 'The configs in this repo are UNSUPPORTED and provided only as a starting point', but this might be some more generic issue with built-in LSP and config modifications in
on_new_config?I'm also aware of #3705 and neovim/neovim#32287, but I'm not entirely sure if it's something that'll resolve this problem and whether there's anything we can do in the interim?