diagnostics: false-positive unresolved-tag warnings from non-taglink pipe patterns #51
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/vimdoc-language-server#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
unresolved-tagdiagnostic fires on|...|patterns that are not vimdoc taglinks. Running against the full neovim 0.12 runtime corpus (135 files, no external tags) produces 26 spurious unresolved-tag warnings. Two distinct root causes:1. Blank line after
>resetsin_code, exposing code content to tag scanningThe parser resets
in_code = falseon any blank line (intended to handle fenced blocks). But neovim's docs commonly use a blank line between the>trigger and the code block body:The blank line resets
in_code, so the indented vim script is parsed asLineKind::Text.scan_inlinethen finds\|screen\|(vim regex alternation) and emits a spurious warning. Same pattern causes false positives inmap.txt(Luastring.format('|%d| ', ...)),dev_tools.txt(histogram bar|@@@...@@@|), and others.Files affected:
tui.txt,map.txt,dev_tools.txt2. Pipes in prose text (type annotations, option strings) parsed as taglinks
Some false positives come from lines that are genuinely prose, not code at all:
The parser reads
|fun(bufnr:integer):string|as a taglink. Similarly:emits a warning for
|,+,-,+,|.Files affected:
treesitter.txt,options.txtFull list of false positives (neovim 0.12 corpus)
|screen|,|iterm|etc.in_code(vim regex in>vimblock)|%d|,|<line1>,<line2>d|in_code(Lua code in>luablock)|@@@@...@@@@|in_code(profiler output block)|fun(bufnr:integer):string||,+,-,+,||\\|,|screen\\|etc.|in vim regex / backslash sequencesExpected behaviour
None of the above should produce diagnostics. The parser should either correctly classify these lines as
CodeBody(root cause 1) or not parse|...|as a taglink when the content cannot be a valid tag name (root cause 2).Notes