Skip to content
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

Although efm was setup correctly and detected successfully in nvim, it posts error #219

Open
winkee01 opened this issue May 3, 2022 · 4 comments

Comments

@winkee01
Copy link

winkee01 commented May 3, 2022

I was editing a rust file in nvim, efm was detected via :LspInfo, however, It refused to work, the log file ~/.cache/nvim/lsp.log shows this error:

[START][2022-05-03 16:21:32] LSP logging initiated
[ERROR][2022-05-03 16:21:32] .../vim/lsp/rpc.lua:420	"rpc"	"efm-langserver"	"stderr"	"2022/05/03 16:21:32 efm-langserver: no configuration file\n2022/05/03 16:21:32 efm-langserver: reading on stdin, writing on stdout\n"
[ERROR][2022-05-03 16:21:33] .../vim/lsp/rpc.lua:420	"rpc"	"efm-langserver"	"stderr"	"2022/05/03 16:21:33 lint for LanguageID not supported: rust\n"
[ERROR][2022-05-03 16:21:33] .../vim/lsp/rpc.lua:420	"rpc"	"efm-langserver"	"stderr"	"2022/05/03 16:21:33 lint for LanguageID not supported: rust\n"
[ERROR][2022-05-03 16:21:34] .../vim/lsp/rpc.lua:420	"rpc"	"efm-langserver"	"stderr"	"2022/05/03 16:21:34 lint for LanguageID not supported: rust\n"
[ERROR][2022-05-03 16:21:36] .../vim/lsp/rpc.lua:420	"rpc"	"rust-analyzer"	"stderr"	'[ERROR rust_analyzer::dispatch] unknown request: Request { id: RequestId(I32(7)), method: "textDocument/inlayHint", params: Object({"range": Object({"start": Object({"character": Number(0), "line": Number(0)}), "end": Object({"character": Number(1), "line": Number(30)})}), "textDocument": Object({"uri": String("file:///Users/winkee/dev/rs/calculator/src/main.rs")})}) }\n'
@danielnehrig
Copy link

This totally depends on what your interpretation on correct is as for in simpler terms works on my machine (shrug)
you're not addressing a efm issue here but a neovim setup issue from what i can see.
im on the latest efm version and as for me i do not have any issues with efm formatting/linting in rust files

if you want help i suggest you ask around in the neovim community
if a LSP service would open the pandoras box of letting maintainers debug issue from every consumers perspective we'll be in hells kitchen and i think its unreasonable to expect with this amount of information to let the maintainers figure out your problem at hand since they might not even be using your LSP consuming application

@ghost
Copy link

ghost commented Nov 3, 2022

Ran into a similar situation when using eslint_d.
In my case it turned out to be a missing eslint plugin that wasn't found, and eslint_d was returning an error code when trying to format stdin, but efm was just throwing a rather generic error

If anyone runs into this message
format for LanguageID not supported / lint for LanguageID not supported
I'd suggest copying the lint/format command from your efm configuration and manually running it in the terminal first. Make sure the command works on its own without efm, then debug further.

For efm developers - the error message could be more descriptive and could potentially relay the error message thrown by the formatter. As it stands right now it's a little cryptic so it's and hard to understand where the issue is coming from.

@kassio
Copy link

kassio commented Sep 17, 2023

@winkee01, did you find a solution? I just ran in the same error on my setup 😞 .

@gmhpfc
Copy link

gmhpfc commented Nov 8, 2023

its simple install formatter manually e.g with Mason stylua , pritierd and config in lspsaga.lua accourdingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants