mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
feat(meta): add type for quickfix entries
This commit is contained in:
parent
0e8568d72c
commit
21151144c6
4
runtime/doc/builtin.txt
generated
4
runtime/doc/builtin.txt
generated
@ -9097,9 +9097,9 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
`:cc 1` to jump to the first position.
|
||||
|
||||
Parameters: ~
|
||||
• {list} (`any[]`)
|
||||
• {list} (`vim.quickfix.entry[]`)
|
||||
• {action} (`string?`)
|
||||
• {what} (`table?`)
|
||||
• {what} (`vim.fn.setqflist.what?`)
|
||||
|
||||
Return: ~
|
||||
(`any`)
|
||||
|
@ -66,6 +66,97 @@
|
||||
--- @field winnr integer
|
||||
--- @field winrow integer
|
||||
|
||||
--- @class vim.quickfix.entry
|
||||
--- buffer number; must be the number of a valid buffer
|
||||
--- @field bufnr? integer
|
||||
---
|
||||
--- name of a file; only used when "bufnr" is not
|
||||
--- present or it is invalid.
|
||||
--- @field filename? string
|
||||
---
|
||||
--- name of a module; if given it will be used in
|
||||
--- quickfix error window instead of the filename.
|
||||
--- @field module? string
|
||||
---
|
||||
--- line number in the file
|
||||
--- @field lnum? integer
|
||||
---
|
||||
--- end of lines, if the item spans multiple lines
|
||||
--- @field end_lnum? integer
|
||||
---
|
||||
--- search pattern used to locate the error
|
||||
--- @field pattern? string
|
||||
---
|
||||
--- column number
|
||||
--- @field col? integer
|
||||
---
|
||||
--- when non-zero: "col" is visual column
|
||||
--- when zero: "col" is byte index
|
||||
--- @field vcol? integer
|
||||
---
|
||||
--- end column, if the item spans multiple columns
|
||||
--- @field end_col? integer
|
||||
---
|
||||
--- error number
|
||||
--- @field nr? integer
|
||||
---
|
||||
--- description of the error
|
||||
--- @field text? string
|
||||
---
|
||||
--- single-character error type, 'E', 'W', etc.
|
||||
--- @field type? string
|
||||
---
|
||||
--- recognized error message
|
||||
--- @field valid? boolean
|
||||
---
|
||||
--- custom data associated with the item, can be
|
||||
--- any type.
|
||||
--- @field user_data? any
|
||||
|
||||
--- @class vim.fn.setqflist.what
|
||||
---
|
||||
--- quickfix list context. See |quickfix-context|
|
||||
--- @field context? table
|
||||
---
|
||||
--- errorformat to use when parsing text from
|
||||
--- "lines". If this is not present, then the
|
||||
--- 'errorformat' option value is used.
|
||||
--- See |quickfix-parse|
|
||||
--- @field efm? string
|
||||
---
|
||||
--- quickfix list identifier |quickfix-ID|
|
||||
--- @field id? integer
|
||||
--- index of the current entry in the quickfix
|
||||
--- list specified by "id" or "nr". If set to '$',
|
||||
--- then the last entry in the list is set as the
|
||||
--- current entry. See |quickfix-index|
|
||||
--- @field idx? integer
|
||||
---
|
||||
--- list of quickfix entries. Same as the {list}
|
||||
--- argument.
|
||||
--- @field items? vim.quickfix.entry[]
|
||||
---
|
||||
--- use 'errorformat' to parse a list of lines and
|
||||
--- add the resulting entries to the quickfix list
|
||||
--- {nr} or {id}. Only a |List| value is supported.
|
||||
--- See |quickfix-parse|
|
||||
--- @field lines? string[]
|
||||
---
|
||||
--- list number in the quickfix stack; zero
|
||||
--- means the current quickfix list and "$" means
|
||||
--- the last quickfix list.
|
||||
--- @field nr? integer
|
||||
---
|
||||
--- function to get the text to display in the
|
||||
--- quickfix window. The value can be the name of
|
||||
--- a function or a funcref or a lambda. Refer
|
||||
--- to |quickfix-window-function| for an explanation
|
||||
--- of how to write the function and an example.
|
||||
--- @field quickfixtextfunc? function
|
||||
---
|
||||
--- quickfix list title text. See |quickfix-title|
|
||||
--- @field title? string
|
||||
|
||||
--- @class vim.fn.sign_define.dict
|
||||
--- @field text string
|
||||
--- @field icon? string
|
||||
|
4
runtime/lua/vim/_meta/vimfn.lua
generated
4
runtime/lua/vim/_meta/vimfn.lua
generated
@ -8286,9 +8286,9 @@ function vim.fn.setpos(expr, list) end
|
||||
--- independent of the 'errorformat' setting. Use a command like
|
||||
--- `:cc 1` to jump to the first position.
|
||||
---
|
||||
--- @param list any[]
|
||||
--- @param list vim.quickfix.entry[]
|
||||
--- @param action? string
|
||||
--- @param what? table
|
||||
--- @param what? vim.fn.setqflist.what
|
||||
--- @return any
|
||||
function vim.fn.setqflist(list, action, what) end
|
||||
|
||||
|
@ -9955,7 +9955,11 @@ M.funcs = {
|
||||
|
||||
]=],
|
||||
name = 'setqflist',
|
||||
params = { { 'list', 'any[]' }, { 'action', 'string' }, { 'what', 'table' } },
|
||||
params = {
|
||||
{ 'list', 'vim.quickfix.entry[]' },
|
||||
{ 'action', 'string' },
|
||||
{ 'what', 'vim.fn.setqflist.what' },
|
||||
},
|
||||
signature = 'setqflist({list} [, {action} [, {what}]])',
|
||||
},
|
||||
setreg = {
|
||||
|
Loading…
Reference in New Issue
Block a user