You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the scan process scans all files in ~/.local/shared for some reason.
The scan process seems to hang when it finds a directory without read permissions and leads to errors in other plugins that depend on LSP and run into a timeout.
In my case this happened because Steam on Linux creates directories with root permissions somewhere in my ~/.local directory:
Create a directory with root perms: sudo mkdir ~/.local/shared/x sudo chmod 700 ~/.local/shared/x
Start editing a .vim file that uses LSP
I can maybe provide a minimal vimrc.vim but it also requires to create a read-only directory somewhere in your home.
Expected behavior
The server should skip directories without read permissions.
Maybe an alternative is to restrict which directories are scanned.
Desktop
OS: Linux Mint 21.2
Neovim: 0.9.4
Relevant plugins: nvim-lspconfig, Mason
Log:
[START][2023-11-25 11:02:35] LSP logging initiated
[ERROR][2023-11-25 11:02:35] .../vim/lsp/rpc.lua:734 "rpc" "/tmp/plugged/mason/bin/vim-language-server" "stderr" "node:events:491\n throw er; // Unhandled 'error' event\n ^\n\nError: EACCES: permission denied, scandir '/home/mike/.local/share/Steam/steamapps/compatdata/0/pfx/dosdevices/z:/root'\nEmitted 'error' event at:\n at AsyncReader._handleError (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:22829:23)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:22808:22\n at worked (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:23378:14)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:22815:24\n at callFailureCallback (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:22974:5)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/scan.js:22905:20\n at node:fs:192:23\n at FSReqCallback.req.oncomplete (node:fs:1412:9) {\n errno: -13,\n code: 'EACCES',\n syscall: 'scandir',\n path: '/home/mike/.local/share/Steam/steamapps/compatdata/0/pfx/dosdevices/z:/root'\n}\n"
[WARN][2023-11-25 11:02:36] ...lsp/handlers.lua:537 "parser: Send error: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed\n at new NodeError (node:internal/errors:387:5)\n at ChildProcess.target.send (node:internal/child_process:749:16)\n at send (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27718:17)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27893:62\n at new Promise (<anonymous>)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27891:62\n at step (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27674:23)\n at Object.next (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27655:53)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27649:71\n at new Promise (<anonymous>)"
[WARN][2023-11-25 11:02:36] ...lsp/handlers.lua:537 "parser: Send error: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed\n at new NodeError (node:internal/errors:387:5)\n at ChildProcess.target.send (node:internal/child_process:749:16)\n at send (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27718:17)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27893:62\n at new Promise (<anonymous>)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27891:62\n at step (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27674:23)\n at Object.next (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27655:53)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27649:71\n at new Promise (<anonymous>)"
[WARN][2023-11-25 11:02:36] ...lsp/handlers.lua:537 "parser: Send error: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed\n at new NodeError (node:internal/errors:387:5)\n at ChildProcess.target.send (node:internal/child_process:749:16)\n at send (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27718:17)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27893:62\n at new Promise (<anonymous>)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27891:62\n at step (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27674:23)\n at Object.next (/tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27655:53)\n at /tmp/plugged/mason/packages/vim-language-server/node_modules/vim-language-server/out/index.js:27649:71\n at new Promise (<anonymous>)"
The text was updated successfully, but these errors were encountered:
Describe the bug
It seems the scan process scans all files in
~/.local/shared
for some reason.The scan process seems to hang when it finds a directory without read permissions and leads to errors in other plugins that depend on LSP and run into a timeout.
In my case this happened because Steam on Linux creates directories with root permissions somewhere in my
~/.local
directory:To Reproduce
Steps to reproduce the behavior:
sudo mkdir ~/.local/shared/x
sudo chmod 700 ~/.local/shared/x
I can maybe provide a minimal
vimrc.vim
but it also requires to create a read-only directory somewhere in your home.Expected behavior
The server should skip directories without read permissions.
Maybe an alternative is to restrict which directories are scanned.
Desktop
Log:
The text was updated successfully, but these errors were encountered: