Open dklymenk opened 3 years ago
I am seeing a similar issue with efm on both python and lua file types. Funnily enough it only seems to happen when quitting neovim without writing (i.e :q gives the error while :wq does not).
Everything seems to be working fine though.
Relevant logs from~/.cache/nvim/lsp.log
[ ERROR ] 2021-05-12T19:23:58-0400 ] /squashfs-root/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/nick/.local/share/nvim/lspinstall/efm/efm-langserver" "stderr" "2021/05/12 19:23:58 efm-langserver: no configuration file\n2021/05/12 19:23:58 efm-langserver: reading on stdin, writing on stdout\n"
[ ERROR ] 2021-05-12T19:23:58-0400 ] /squashfs-root/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/nick/.local/share/nvim/lspinstall/efm/efm-langserver" "stderr" "2021/05/12 19:23:58 lint for LanguageID not supported: lua\n"
[ ERROR ] 2021-05-12T19:23:58-0400 ] /squashfs-root/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/nick/.local/share/nvim/lspinstall/efm/efm-langserver" "stderr" "panic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x563a4a]\n\ngoroutine 19 [running]:\n"
[ ERROR ] 2021-05-12T19:23:58-0400 ] /squashfs-root/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/nick/.local/share/nvim/lspinstall/efm/efm-langserver" "stderr" "time.(*Timer).Stop(...)\n\t/usr/local/go/src/time/sleep.go:76\ngithub.com/mattn/efm-langserver/langserver.(*langHandler).handleShutdown(0xc0000f2000, 0x5f6640, 0xc0000a8000, 0xc0000f6000, 0xc0000c0370, 0x595200, 0xc000096f20, 0xc0000f87c0, 0x0)\n\t/home/nick/.local/share/nvim/lspinstall/efm/pkg/mod/github.com/mattn/efm-langserver@v0.0.29/langserver/handle_shutdown.go:10 +0x2a\ngithub.com/mattn/efm-langserver/langserver.(*langHandler).handle(0xc0000f2000, 0x5f6640, 0xc0000a8000, 0xc0000f6000, 0xc0000c0370, 0x595200, 0xc000096f20, 0x0, 0x0)\n\t/home/nick/.local/share/nvim/lspinstall/efm/pkg/mod/github.com/mattn/efm-langserver@v0.0.29/langserver/handler.go:559 +0x19c\ngithub.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc000096480, 0x5f6640, 0xc0000a8000, 0xc0000f6000, 0xc0000c0370)\n\t/home/nick/.local/share/nvim/lspinstall/efm/pkg/mod/github.com/sourcegraph/jsonrpc2@v0.0.0-20191222043438-96c4efab7ee2/handler_with_error.go:21 +0x73\ngithub.com/sourcegraph/jsonrpc2.(*Conn).readMessages(0xc0000f6000, 0x5f6640"
[ ERROR ] 2021-05-12T19:23:58-0400 ] /squashfs-root/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/nick/.local/share/nvim/lspinstall/efm/efm-langserver" "stderr" ", 0xc0000a8000)\n\t/home/nick/.local/share/nvim/lspinstall/efm/pkg/mod/github.com/sourcegraph/jsonrpc2@v0.0.0-20191222043438-96c4efab7ee2/jsonrpc2.go:334 +0x1d5\n"
Relevant efm lua
-- Python
local python_arguments = {}
local flake8 = {
LintCommand = 'flake8 --ignore=E501,E252,E124,E741 --stdin-display-name ${INPUT} -',
lintStdin = true,
}
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
local black = {formatCommand = "black --quiet -", formatStdin = true}
table.insert(python_arguments, flake8)
table.insert(python_arguments, isort)
table.insert(python_arguments, black)
require"lspconfig".efm.setup {
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false},
filetypes = {
"lua",
"python",
"sh",
},
settings = {
rootMarkers = {".git/"},
languages = {
python = python_arguments,
lua = lua_arguments,
sh = sh_arguments,
}
}
}
Same here. Is there any setting that controls this? While this is solved, how could I "suppress" this message?
As far as I understand, this should be fixed.
https://github.com/mattn/efm-langserver/commit/96808fdc7c4408b3637a0decf3c52a854ea094b0
For everyone asking about this, it's neovim that prints the warning, not EFM.
@mattn @mjlbach I started getting this yesterday on 0.0.31
which unless I'm mistaken includes the commit above. Are you not seeing it anymore?
I want to use prettier with twig via efm. I have prettier and the necessary extension for twig installed globally. Prettier works fine via both cli and efm. Here are some relevant lua configs:
So formatting works, but every time I exit vim I see "Client 1 quit with exit code 2 and signal 0" error. Relevant logs from
~/.cache/nvim/lsp.log
:One of the errors is
2021/05/11 14:36:31 lint for LanguageID not supported: twig\n
, but I'm not exactly sure if disabling linting would resolve other errors.Actually, while formatting works flawlessly, it also produces a bunch of "error" logs in
~/.cache/nvim/lsp.log
. Stuff likeno configuration file
andinvalid memory address or nil pointer deference
is present there as well, but I honestly don't care about how clean those logs are, I kinda only care about theClient 1 quit with exit code 2 and signal 0
error when I close vim.Please let me know if I should to provide any additional information. Thanks.