test(config): cover link_severity in parity harnesses and docs
CI / cargo fmt --check (push) Successful in 23s
CI / cargo clippy (push) Successful in 31s
CI / cargo test (push) Successful in 31s
CI / editor keymaps (push) Successful in 1m28s

Both editor harnesses now emit diagnostic.link_severity and exercise a
non-default override ('error') in the sample scenario, diffed against the
shared golden. Drop the README "not wired" caveat now that the value flows
through, and document the g:nuwiki_link_severity global.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 21:53:56 -03:00
parent 5ee72c40e2
commit e3f28d7dfc
4 changed files with 14 additions and 7 deletions
+3 -6
View File
@@ -255,6 +255,7 @@ plugin:
let g:nuwiki_wiki_root = '~/vimwiki'
let g:nuwiki_file_extension = '.wiki'
let g:nuwiki_log_level = 'warn'
let g:nuwiki_link_severity = 'warn' " 'off'|'hint'|'warn'|'error'
let g:nuwiki_no_default_mappings = 0 " set to 1 to skip the keymap layer
let g:nuwiki_no_folding = 0 " set to 1 to skip foldexpr setup
let g:nuwiki_mouse_mappings = 0 " set to 1 to enable mouse maps
@@ -273,7 +274,7 @@ let g:nuwiki_mouse_mappings = 0 " set to 1 to enable mouse maps
| `folding` | string | `'lsp'` | `'lsp'` \| `'expr'` \| `'off'` |
| `wikis` | list of tables | `nil` | per-wiki tables (see below); wins over the single-wiki shorthand |
| `mappings` | table | all on | keymap subgroups (see below) |
| `diagnostic` | table | — | `{ link_severity = … }` (see note below) |
| `diagnostic` | table | `{ link_severity = 'warn' }` | `link_severity`: `'off'` \| `'hint'` \| `'warn'` \| `'error'` |
#### `mappings` subgroups
@@ -340,15 +341,11 @@ For users configuring without Lua.
| `g:nuwiki_wiki_root` | `'~/vimwiki'` | single-wiki root |
| `g:nuwiki_file_extension` | `'.wiki'` | wiki file extension |
| `g:nuwiki_log_level` | `'warn'` | `error` \| `warn` \| `info` \| `debug` |
| `g:nuwiki_link_severity` | `'warn'` | broken-link severity: `off` \| `hint` \| `warn` \| `error` |
| `g:nuwiki_no_default_mappings` | `0` | `1` skips the keymap layer |
| `g:nuwiki_no_folding` | `0` | `1` skips foldexpr setup |
| `g:nuwiki_mouse_mappings` | `0` | `1` enables mouse maps |
> **Note:** `diagnostic.link_severity` is accepted in the config surface but
> the server currently always uses its default (`'warn'`); the client value is
> not yet wired through. Track this if you rely on changing broken-link
> severity.
---
## Usage