diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-10-16 09:33:13 +0100 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2024-10-17 10:54:19 +0100 |
commit | 21151144c6ee0d38841aea78b2e0ecb8a0046429 (patch) | |
tree | 982f117026c1ff64f0e61ec0aa035d8ce571008f /runtime | |
parent | 0e8568d72c8825292af1b74018d8c3def0e3f16b (diff) | |
download | rneovim-21151144c6ee0d38841aea78b2e0ecb8a0046429.tar.gz rneovim-21151144c6ee0d38841aea78b2e0ecb8a0046429.tar.bz2 rneovim-21151144c6ee0d38841aea78b2e0ecb8a0046429.zip |
feat(meta): add type for quickfix entries
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 4 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/builtin_types.lua | 91 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 4 |
3 files changed, 95 insertions, 4 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1022565b87..385ddf39a6 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -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`) diff --git a/runtime/lua/vim/_meta/builtin_types.lua b/runtime/lua/vim/_meta/builtin_types.lua index aca6649957..eae76d80d7 100644 --- a/runtime/lua/vim/_meta/builtin_types.lua +++ b/runtime/lua/vim/_meta/builtin_types.lua @@ -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 diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index de1937f620..4e5d3f5701 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -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 |