nvim: Fix lsp key mapping for markdown files

We forgot to pass through the original on_attach function when loading
the custom marksman one, now fixed.
This commit is contained in:
Marty Oehme 2024-07-03 09:46:13 +02:00
parent 011942e049
commit db86edf4ce
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -157,12 +157,13 @@ lspconfig.nushell.setup({})
lspconfig.marksman.setup({
filetypes = { "markdown", "quarto" },
on_attach = function(client, bufnr)
-- TODO: for some reason this is always true even though it shouldn't be
-- TODO: for some reason this stays true even after rootdir switch?
if client.config.in_zk_notebook then
vim.defer_fn(function()
vim.lsp.buf_detach_client(bufnr, client.id)
end, 1000)
end
on_attach(client, bufnr)
end,
on_new_config = function(conf, new_root)
if require("lspconfig.util").root_pattern(".zk")(new_root) then
@ -218,6 +219,7 @@ if require("core.util").is_available("arduino") then
})
end
-- attach ltex for fitting ft only when spell checking becomes enabled
vim.api.nvim_create_autocmd("User", {
pattern = "SpellEnable",
callback = function()