Closed hinell closed 8 months ago
I'm not good at neovim, anyone please help this.
We have to set the server version to 2
and language sub-fields should be lists:
M.config = {
log_level = 5,
cmd = {"/usr/bin/efm-langserver", "-logfile", "/tmp/efm.log", "-loglevel", "5"},
filetypes = {"json", "jsx", "lua", "yaml"},
init_options = {
codeAction = true,
completion = false,
documentFormatting = true,
documentRangeFormatting = true,
documentSymbol = true, -- this may interfere with navic.nvim
hover = true
},
settings = {
version = 2, -- NOTE: DO NOT FORGET TO SPECIFY VERSION
rootMarkers = {".git/"},
languages = {
json = {
{
formatCommand = "clang-format --assume-filename=.json",
formatStdin = false
}
},
lua = { {formatCommand = "lua-format -i", formatStdin = true} }
}
}
}
Hi. I'm using the config above and nothing happens when I call
vim.lsp.buf.format()
.I'm using
lspconfig
andcreativenull/efmls-configs-nvim
btw.Any ideas why? Thanks.
I got the following log (same for Lua):
Version