From db86edf4cea722061c9e172474fb1238617daa97 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 3 Jul 2024 09:46:13 +0200 Subject: [PATCH] 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. --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index 6263dfb..7054d1d 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -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()