-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
LSP: INFO read as ERROR, and edited files are excluded #439
Comments
Thanks for the bug report! This would need more investigation, but my current understanding would be:
Fixing any of those 2 issues would probably fix your error. |
I had this issue in The solution depends on how your editor determines the root folder of your project. My solution was to add And then add a The other solution might be to edit your toml file in a versioned folder. By default, most editors consider a versioned folder the workspace or root folder. |
Why would Taplo need to be run in a workspace? I assume basic LSP tasks in a TOML file can be accomplished with default configuration on the file alone. |
I'm not sure (not familiar enough with LSP) so only speculating. Only a single instance of Taplo is needed to handle multiple projects (which I guess is what is sometimes called multi-root), which I think are called workspace in LSP vocabulary (I think project is Emacs vocabulary). Compare this with rust-analyzer which needs one instance per project/workspace. But note that Taplo only emits warnings for this issue, so it's probably not required. I think the bug is somewhere else but a consequence of using detached workspace, which is probably a path that is not heavily tested. And the bug is probably something about path matching failing because the prefix differs although it is semantically the same. |
FYI here is how to solve the problem in Neovim: https://www.reddit.com/r/neovim/comments/1fkprp5/how_to_properly_setup_lspconfig_for_toml_files/ The key is that by default, Taplo looks for a git repository so if you are not within one, you will get the |
This issue and helix-editor/helix#4436 look very related. From what I can piece together...
BTW @thomasaarholt consider splitting/renaming this issue. I had trouble parsing "LSP: INFO read as ERROR, and edited files are excluded" and it seems to describe two completely different issues. |
I've just installed taplo using
cargo install taplo-cli --locked --features lsp
. taplo is found on PATH.I want to use helix editor with the LSP.
hx --health toml
reports that it finds the taplo binary in.cargo/bin/taplo
.But trying to edit any new or existing .toml file results in a "this document is excluded error", which is also reported in #320. Additionally, it seems that info messages are being interpreted by helix as error messages. This does not happen for e.g. the pyright LSP for python.
Here's an asciicast video showing the steps:
Full log:
The text was updated successfully, but these errors were encountered: