From 5ee72c40e2e9cdda191fd457943905ec32b7c016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Sat, 30 May 2026 21:53:51 -0300 Subject: [PATCH] feat(client): send diagnostic.link_severity from both clients Neovim adds a `diagnostic = { link_severity = 'warn' }` default so the value is actually included in the payload. Vim reads the flat g:nuwiki_link_severity global and nests it into the same `diagnostic` dict, keeping the two clients' server-bound payloads identical. Co-Authored-By: Claude Opus 4.7 --- autoload/nuwiki/lsp.vim | 3 +++ lua/nuwiki/config.lua | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/autoload/nuwiki/lsp.vim b/autoload/nuwiki/lsp.vim index cdef885..d56f837 100644 --- a/autoload/nuwiki/lsp.vim +++ b/autoload/nuwiki/lsp.vim @@ -81,6 +81,9 @@ function! s:settings() abort \ 'file_extension': get(g:, 'nuwiki_file_extension', '.wiki'), \ 'syntax': get(g:, 'nuwiki_syntax', 'vimwiki'), \ 'log_level': get(g:, 'nuwiki_log_level', 'warn'), + \ 'diagnostic': { + \ 'link_severity': get(g:, 'nuwiki_link_severity', 'warn'), + \ }, \ } " Include the per-wiki list when configured via g:nuwiki_wikis so the " server knows each wiki's root, diary path, etc. Without this it only diff --git a/lua/nuwiki/config.lua b/lua/nuwiki/config.lua index f937610..73b201d 100644 --- a/lua/nuwiki/config.lua +++ b/lua/nuwiki/config.lua @@ -50,6 +50,13 @@ M.defaults = { -- provider (Neovim 0.11+ wires it automatically). `'expr'` falls -- back to a regex-based `foldexpr`. `'off'` skips folding setup. folding = 'lsp', + + -- Broken-link diagnostic severity. Sent to the server, which downgrades + -- or suppresses the diagnostic accordingly. + -- 'off' | 'hint' | 'warn' | 'error' + diagnostic = { + link_severity = 'warn', + }, } M.options = vim.deepcopy(M.defaults)