vvars_extra.lua 4.0 KB

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