fix(conflict): resolve LuaLS duplicate-doc-field and inject-field errors
Problem: lua-language-server reports duplicate @class definitions for ConflictKeymaps and ConflictConfig (defined in both init.lua and conflict.lua), and inject-field errors for the untyped parser table. Solution: remove duplicate @class annotations from conflict.lua (init.lua is the canonical source), and annotate the parser's current variable as diffs.ConflictRegion? so LuaLS knows its shape.
This commit is contained in:
parent
74c2dd4c7a
commit
7ae867c413
1 changed files with 1 additions and 14 deletions
|
|
@ -1,17 +1,3 @@
|
|||
---@class diffs.ConflictKeymaps
|
||||
---@field ours string|false
|
||||
---@field theirs string|false
|
||||
---@field both string|false
|
||||
---@field none string|false
|
||||
---@field next string|false
|
||||
---@field prev string|false
|
||||
|
||||
---@class diffs.ConflictConfig
|
||||
---@field enabled boolean
|
||||
---@field disable_diagnostics boolean
|
||||
---@field show_virtual_text boolean
|
||||
---@field keymaps diffs.ConflictKeymaps
|
||||
|
||||
---@class diffs.ConflictRegion
|
||||
---@field marker_ours integer
|
||||
---@field ours_start integer
|
||||
|
|
@ -41,6 +27,7 @@ local PRIORITY_LINE_BG = 200
|
|||
function M.parse(lines)
|
||||
local regions = {}
|
||||
local state = 'idle'
|
||||
---@type diffs.ConflictRegion?
|
||||
local current = nil
|
||||
|
||||
for i, line in ipairs(lines) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue