feat(compiler): add configurable error output modes (#14)
Problem: all parse errors went to vim.diagnostic with no way to silence them or route them to the quickfix list. Users wanting quickfix-style error navigation had no option. Solution: add an errors field to ProviderConfig accepting false, 'diagnostic' (default), or 'quickfix'. false suppresses error handling entirely. 'quickfix' converts parsed diagnostics to qflist items (1-indexed), calls setqflist, and opens the window. On success, 'quickfix' mode clears the qflist the same way 'diagnostic' mode clears vim.diagnostic.
This commit is contained in:
parent
7995d6422d
commit
253ca05da3
3 changed files with 133 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
---@field env? table<string, string>
|
||||
---@field output? string|fun(ctx: preview.Context): string
|
||||
---@field error_parser? fun(output: string, ctx: preview.Context): preview.Diagnostic[]
|
||||
---@field errors? false|'diagnostic'|'quickfix'
|
||||
---@field clean? string[]|fun(ctx: preview.Context): string[]
|
||||
---@field open? boolean|string[]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue