diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-09-16 19:25:38 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-09-16 19:25:38 +0300 |
| commit | 741353c1f86f78784f884e1b5babec8718fa144e (patch) | |
| tree | 4b535220d33cdb384a2965313962aa30b7318489 /.config/nvim/lua/custom/config/commands.lua | |
| parent | 589a8af495420d927a42e381ef059ebcfd47debb (diff) | |
feat: added marksman language for markdown
Diffstat (limited to '.config/nvim/lua/custom/config/commands.lua')
| -rw-r--r-- | .config/nvim/lua/custom/config/commands.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/lua/custom/config/commands.lua b/.config/nvim/lua/custom/config/commands.lua index acb2cbb..525461b 100644 --- a/.config/nvim/lua/custom/config/commands.lua +++ b/.config/nvim/lua/custom/config/commands.lua @@ -48,3 +48,16 @@ end, { desc = 'Toggle autoformat on save', bang = true, }) + +local function filter_marksman_diagnostics(_, result, ctx, config) + local client = vim.lsp.get_client_by_id(ctx.client_id) + if client ~= nil and client.name == "marksman" then + return + end + -- For other language servers, show diagnostics as normal + vim.lsp.diagnostic.on_publish_diagnostics(_, result, ctx, config) +end + +-- Set diagnostic handler for all language servers +vim.lsp.handlers["textDocument/publishDiagnostics"] = filter_marksman_diagnostics + |
