vvars_extra.lua (4153B)
1 --- @meta _ 2 error('Cannot require a meta file') 3 4 --- Extra types for vim.v dictionary fields 5 6 --- @class vim.v.completed_item 7 --- @field word? string the text that will be inserted, mandatory 8 --- abbreviation of "word"; when not empty it is used in the menu instead of "word" 9 --- @field abbr? string 10 --- extra text for the popup menu, displayed after "word" or "abbr" 11 --- @field menu? string 12 --- more information about the item, can be displayed in a preview window 13 --- @field info? string 14 --- @field kind? string single letter indicating the type of completion 15 --- when non-zero case is to be ignored when comparing items to be equal; when 16 --- omitted zero is used, thus items that only differ in case are added 17 --- @field icase? integer 18 --- when non-zero, always treat this item to be equal when comparing. Which 19 --- means, "equal=1" disables filtering of this item. 20 --- @field equal? integer 21 --- when non-zero this match will be added even when an item with the same word 22 --- is already present. 23 --- @field dup? integer 24 --- when non-zero this match will be added even when it is an empty string 25 --- @field empty? integer 26 --- custom data which is associated with the item and available 27 --- in |v:completed_item|; it can be any type; defaults to an empty string 28 --- @field user_data? any 29 --- an additional highlight group whose attributes are combined 30 --- with |hl-PmenuSel| and |hl-Pmenu| or |hl-PmenuMatchSel| and |hl-PmenuMatch| 31 --- highlight attributes in the popup menu to apply cterm and gui properties 32 --- (with higher priority) like strikethrough to the completion items abbreviation 33 --- @field abbr_hlgroup? string 34 --- an additional highlight group specifically for setting the highlight 35 --- attributes of the completion kind. When this field is present, it will 36 --- override the |hl-PmenuKind| highlight group, allowing for the customization 37 --- of ctermfg and guifg properties for the completion kind 38 --- @field kind_hlgroup? string 39 40 --- @class vim.v.event 41 --- Whether the event triggered during an aborting condition (e.g. |c_Esc| or 42 --- |c_CTRL-C| for |CmdlineLeave|). 43 --- @field abort? boolean 44 --- @field chan? integer See |channel-id| 45 --- @field info? table Dict of arbitrary event data. 46 --- @field cmdlevel? integer Level of cmdline. 47 --- @field cmdtype? string Type of cmdline, |cmdline-char|. 48 --- @field cwd? string Current working directory. 49 --- @field inclusive? boolean Motion is |inclusive|, else exclusive. 50 --- @field scope? string Event-specific scope name. 51 --- Current |operator|. Also set for Ex commands (unlike |v:operator|). For 52 --- example if |TextYankPost| is triggered by the |:yank| Ex command then 53 --- `v:event.operator` is "y". 54 --- @field operator? string 55 --- Text stored in the register as a |readfile()|-style list of lines. 56 --- @field regcontents? string 57 --- Requested register (e.g "x" for "xyy) or the empty string for an unnamed operation. 58 --- @field regname? string 59 --- @field regtype? string Type of register as returned by |getregtype()|. 60 --- @field visual? boolean Selection is visual (as opposed to, e.g., via motion). 61 --- @field completed_item? vim.v.completed_item 62 --- Current selected complete item on |CompleteChanged|, Is `{}` when no 63 --- complete item selected. 64 --- @field height? integer 65 --- @field width? integer Height of popup menu on |CompleteChanged| 66 --- @field row? integer Width of popup menu on |CompleteChanged| 67 --- Col count of popup menu on |CompleteChanged|, relative to screen. 68 --- @field col? integer 69 --- @field size? integer Total number of completion items on |CompleteChanged|. 70 --- Is |v:true| if popup menu have scrollbar, or |v:false| if not. 71 --- @field scrollbar? boolean 72 --- Is |v:true| if the event fired while changing window (or tab) on |DirChanged|. 73 --- @field changed_window? boolean 74 --- @field status? boolean Job status or exit code, -1 means "unknown". |TermClose| 75 --- @field reason? string Reason for completion being done. |CompleteDone| 76 --- The word that was selected, empty if abandoned complete. @field complete_word? string 77 --- @field complete_type? string See |complete_info_mode| 78 --- List of window IDs that changed on |WinResized| 79 --- @field windows? integer[]