2024-09-07 20:39:22 +02:00
|
|
|
local T = require('toolchain')
|
|
|
|
local M = {}
|
|
|
|
|
2024-09-08 01:50:39 +02:00
|
|
|
function M.setup()
|
2024-09-07 20:39:22 +02:00
|
|
|
T.add_highlighter_autoinstalls('markdown')
|
|
|
|
|
|
|
|
T.add_null_ls_module(function(null_ls)
|
2025-02-26 08:08:54 +01:00
|
|
|
local markdownlint_options = {
|
|
|
|
extra_args = {
|
|
|
|
'--disable',
|
|
|
|
'MD022', -- Empty Line after Heading
|
|
|
|
'--disable',
|
|
|
|
'MD024', -- Duplicate Headings
|
|
|
|
'--disable',
|
|
|
|
'MD032', -- List Should be surounded by Empty Lines
|
|
|
|
},
|
|
|
|
}
|
2024-09-07 20:39:22 +02:00
|
|
|
return {
|
|
|
|
-- Actions
|
|
|
|
null_ls.builtins.code_actions.proselint,
|
|
|
|
-- Diagnostics
|
2025-02-26 08:08:54 +01:00
|
|
|
--null_ls.builtins.diagnostics.alex,
|
2024-09-07 20:39:22 +02:00
|
|
|
null_ls.builtins.diagnostics.trail_space,
|
|
|
|
-- Formatter
|
2025-02-26 08:08:54 +01:00
|
|
|
null_ls.builtins.diagnostics.markdownlint.with(
|
|
|
|
markdownlint_options
|
|
|
|
),
|
|
|
|
null_ls.builtins.formatting.markdownlint.with(markdownlint_options),
|
2024-09-07 20:39:22 +02:00
|
|
|
}
|
|
|
|
end)
|
|
|
|
|
|
|
|
T.add_lsp_autoinstalls('marksman')
|
|
|
|
|
|
|
|
T.add_lsps(function(lspconfig, capabilities)
|
|
|
|
local config = { capabilities = capabilities }
|
|
|
|
lspconfig.marksman.setup(config)
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|