You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, for golang I am using efm only for lint, the rest I do using gopls; There is a problem though, for typescript I am using prettier for formating, so I need to set init_options = {documentFormatting = true} and I have a format command set on save. For typescript it is ok, but for go, I have 2 server which offer documentFormating, so everytime I save a document I need to select the LSP I want to use for formatting. In this case my EFM don't format for Go so it is useless and inconvenient. I wonder if it is possible to do something like:
localprettier= {
formatCommand='prettier'init_options= {documentFormatting=true}, -- SET HERE
}
localgolangcilint= {
lintCommand="golangci-lint run",
lintSource="golanci-lint",
init_options= {documentFormatting=false}, -- SET HERE
}
lsp.efm.setup{
root_dir=vim.loop.cwd,
settings= {
rootMarkers= {".git/"},
languages= {
go= {golangcilint},
typescript= {prettier},
}
}
}
The text was updated successfully, but these errors were encountered:
Hello, I am using efm-langserver with
nvim-lspconfig
, this is my configuration:As you can see, for golang I am using efm only for lint, the rest I do using
gopls
; There is a problem though, for typescript I am using prettier for formating, so I need to setinit_options = {documentFormatting = true}
and I have a format command set on save. For typescript it is ok, but for go, I have 2 server which offer documentFormating, so everytime I save a document I need to select the LSP I want to use for formatting. In this case my EFM don't format for Go so it is useless and inconvenient. I wonder if it is possible to do something like:The text was updated successfully, but these errors were encountered: