-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't edit files in my home or home/tmp directory #373
Comments
Thanks for reporting @twrecked! Yeah, something's off here. Need a closer look. |
Not 100% sure but I guess I'm facing a similar or the same issue. IMO, the problem is that marksman is indexing all files in the root dir on startup which might takes quiet some time in directories with a lot of files. If there is a request for the language server during that time, marksman will bail out with a stack trace. File indexing seams to be here, generating loads of log messages like the following. [ERROR][2024-12-08 13:04:44] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:04:44 VRB] <Folder> Skipping ignored file: {"file": "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/trait.impl/core/core_simd/simd/num/int/trait.SimdInt.js"} Then it gets stuck for a few minutes after logging the following messages, generated here. [ERROR][2024-12-08 13:04:44] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" "[13:04:44 VRB] <Conn> mk: full rebuild started: {}\n"
[ERROR][2024-12-08 13:04:44] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:04:44 VRB] <Conn> update: started: {"#removed": 0, "#added": 101909} Finishing off with... [ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <Conn> Finished updating conn: {"elapsed_ms": 149731, "#touched": 101909}\n'
[ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <StateManager> Updating state: {"nextRev": 1, "curRev": 0}\n'
[ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <StateManager> Processing a hook: {"curRev": 1, "prevRev": "Some(0)", "name": "diag"}\n'
[ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <StateManager> Received a message: {"type": "MutateState"}\n'
[ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <StateManager> Updating state: {"nextRev": 2, "curRev": 1}\n'
[ERROR][2024-12-08 13:07:14] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:14 VRB] <StateManager> Processing a hook: {"curRev": 2, "prevRev": "Some(1)", "name": "diag"}\n[13:07:14 VRB] <StateManager> Received a message: {"type": "ReadState"}\n'
[ERROR][2024-12-08 13:07:15] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:15 VRB] <LSP Server> Updating folder diag: {"num_docs": 7303, "folder": "{ uri = \\"file:///home/user\\"\\n data = RootPath (AbsPath \\"/home/user\\") }"}\n'
[ERROR][2024-12-08 13:07:15] .../vim/lsp/rpc.lua:770 "rpc" "/home/user/.local/share/nvim/mason/bin/marksman" "stderr" '[13:07:15 VRB] <LSP Server> Diagnostic changed, queueing the update: {"doc": ".cargo/registry/src/index.crates.io-6f17d22bba15001f/addr2line-0.21.0/README.md"}\n' In this case the whole startup took over 3 minutes. During that time the CPU load is at 100% for a single thread. If you are patient enough to leave it alone, not generating any lsp calls, marksman seams to be ok. If not you will get the stack trace. |
…ders request Sometimes, LSP clients can send bogus folders (CWD, or homedir) as part of added folders in didChangeWorkspaceFolders. Whenever this happens marksman treats the root as the real root of the project folders and recursively scans/indexes mardown documents underneath.This is problematic when such root is a homedir because it makes marksman scan too much and potentially fail. Fixes #377 Potentially, addresses #373 too
…ders request Sometimes, LSP clients can send bogus folders (CWD, or homedir) as part of added folders in didChangeWorkspaceFolders. Whenever this happens marksman treats the root as the real root of the project folders and recursively scans/indexes mardown documents underneath.This is problematic when such root is a homedir because it makes marksman scan too much and potentially fail. Fixes #377 Potentially, addresses #373 too stack-info: PR: #380, branch: artempyanykh/stack/17
I think #380 should address/workaround it. A bit more details in LazyVim/LazyVim#5074 |
…ders request Sometimes, LSP clients can send bogus folders (CWD, or homedir) as part of added folders in didChangeWorkspaceFolders. Whenever this happens marksman treats the root as the real root of the project folders and recursively scans/indexes mardown documents underneath.This is problematic when such root is a homedir because it makes marksman scan too much and potentially fail. Fixes #377 Potentially, addresses #373 too stack-info: PR: #380, branch: artempyanykh/stack/17
…ders request Sometimes, LSP clients can send bogus folders (CWD, or homedir) as part of added folders in didChangeWorkspaceFolders. Whenever this happens marksman treats the root as the real root of the project folders and recursively scans/indexes mardown documents underneath.This is problematic when such root is a homedir because it makes marksman scan too much and potentially fail. Fixes #377 Potentially, addresses #373 too stack-info: PR: #380, branch: artempyanykh/stack/17
…ders request (#380) Sometimes, LSP clients can send bogus folders (CWD, or homedir) as part of added folders in didChangeWorkspaceFolders. Whenever this happens marksman treats the root as the real root of the project folders and recursively scans/indexes mardown documents underneath.This is problematic when such root is a homedir because it makes marksman scan too much and potentially fail. Fixes #377 Potentially, addresses #373 too
(This feels related to #370 and #348, apologies for opening a new bug.)
I'm using Ubuntu 24.04.1 but I've also seen the issue on a custom linux distribution as well. I've installed marksman via the astronvim package.
If I run
nvim
using any of these combinations of commands it will:marksman fails with this error:
Client marksman quit with exit code 1 and signal 0. Check log for errors: /home/steve/.local/state/nvim/lsp.log
But if I run like this, it works:
It looks like files in my home and tmp are causing it problems.
LspInfo
shows this when it fails:LspInfo
shows this when it works:The most obvious difference being the
root directory
entry but I have no idea what that implies.The log generated is:
Thanks.
The text was updated successfully, but these errors were encountered: