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 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,9 @@ function! s:settings() abort
|
|||||||
\ 'file_extension': get(g:, 'nuwiki_file_extension', '.wiki'),
|
\ 'file_extension': get(g:, 'nuwiki_file_extension', '.wiki'),
|
||||||
\ 'syntax': get(g:, 'nuwiki_syntax', 'vimwiki'),
|
\ 'syntax': get(g:, 'nuwiki_syntax', 'vimwiki'),
|
||||||
\ 'log_level': get(g:, 'nuwiki_log_level', 'warn'),
|
\ '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
|
" 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
|
" server knows each wiki's root, diary path, etc. Without this it only
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ M.defaults = {
|
|||||||
-- provider (Neovim 0.11+ wires it automatically). `'expr'` falls
|
-- provider (Neovim 0.11+ wires it automatically). `'expr'` falls
|
||||||
-- back to a regex-based `foldexpr`. `'off'` skips folding setup.
|
-- back to a regex-based `foldexpr`. `'off'` skips folding setup.
|
||||||
folding = 'lsp',
|
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)
|
M.options = vim.deepcopy(M.defaults)
|
||||||
|
|||||||
Reference in New Issue
Block a user