Open RudolfVonKrugstein opened 5 months ago
That feature was never merged in any release branch. So you have to add all the relevant options to lspconfig manually.
I would do something like this.
local efm_tools = {
pandoc = {
formatCommand = "pandoc -f markdown -t gfm -sp --tab-stop=2",
},
markdownlint = {
lintCommand = "markdownlint -s",
lintStdin = true,
lintFormats = {
"%f:%l %m",
"%f:%l:%c %m",
"%f: %l: %m",
},
}
}
require('lspconfig').efm.setup({
init_options = {
-- enable the options that your tools support
documentFormatting = true,
documentRangeFormatting = false,
hover = false,
documentSymbol = false,
completion = false,
codeAction = false
},
settings = {
rootMarkers = {'.git/'},
-- here you configure the tools per language
languages = {
markdown = {
efm_tools.pandoc,
efm_tools.markdownlint,
},
}
},
-- list of file types where the language server will be active
filetypes = {
'markdown',
},
})
Hi,
I am trying to configure efm to use markdown-lint and pandoc in markdown. Following this https://github.com/VonHeikemen/lsp-zero.nvim/blob/efm-client/doc/md/api-reference.md#efmtoolsopts I did:
But when running this, I get:
Why? What shall I do different?
Thanks!