robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 9a29622b3b00ddb601

master
31.8 KiB1013 linesraw
1local M = {}
2
3M.vars = {
4  argf = {
5    type = 'string[]',
6    desc = [=[
7      File arguments (expanded to absolute paths) given at startup.
8
9      Unlike |v:argv|, this does not include option arguments
10      such as `-u`, `--cmd`, or `+cmd`. Unlike |argv()|, it is not
11      affected by later |:args|, |:argadd|, or plugin modifications.
12
13      Example: >
14        nvim file1.txt +ls -- file2.txt
15        :echo v:argf
16        " ['/path/to/cwd/file1.txt', '/path/to/cwd/file2.txt']
17      <
18    ]=],
19  },
20  argv = {
21    type = 'string[]',
22    desc = [=[
23      Command line arguments (`-u`, `--cmd`, `+cmd`, …) Nvim was
24      invoked with.  The first item is the Nvim command.
25
26      See |v:progpath| to get the full path to Nvim.
27      See |v:argf| to get only file args, without other options.
28    ]=],
29  },
30  char = {
31    type = 'string',
32    desc = [=[
33      Argument for evaluating 'formatexpr' and used for the typed
34      character when using <expr> in an abbreviation |:map-<expr>|.
35      It is also used by the |InsertCharPre|, |InsertEnter|,
36      |CmdlineLeave| and |CmdlineLeavePre| events.
37    ]=],
38  },
39  charconvert_from = {
40    type = 'string',
41    desc = [=[
42      The name of the character encoding of a file to be converted.
43      Only valid while evaluating the 'charconvert' option.
44    ]=],
45  },
46  charconvert_to = {
47    type = 'string',
48    desc = [=[
49      The name of the character encoding of a file after conversion.
50      Only valid while evaluating the 'charconvert' option.
51    ]=],
52  },
53  cmdarg = {
54    type = 'string',
55    desc = [=[
56      The extra arguments ("++p", "++enc=", "++ff=") given to a file
57      read/write command.  This is set before an autocommand event
58      for a file read/write command is triggered.  There is a
59      leading space to make it possible to append this variable
60      directly after the read/write command. Note: "+cmd" isn't
61      included here, because it will be executed anyway.
62    ]=],
63  },
64  cmdbang = {
65    type = 'integer',
66    desc = [=[
67      Set like v:cmdarg for a file read/write command.  When a "!"
68      was used the value is 1, otherwise it is 0.  Note that this
69      can only be used in autocommands.  For user commands |<bang>|
70      can be used.
71    ]=],
72  },
73  collate = {
74    type = 'string',
75    desc = [=[
76      The current locale setting for collation order of the runtime
77      environment.  This allows Vim scripts to be aware of the
78      current locale encoding.  Technical: it's the value of
79      LC_COLLATE.  When not using a locale the value is "C".
80      This variable can not be set directly, use the |:language|
81      command.
82      See |multi-lang|.
83    ]=],
84  },
85  completed_item = {
86    type = 'vim.v.completed_item',
87    desc = [=[
88      Dictionary containing the |complete-items| for the most
89      recently completed word after |CompleteDone|.  Empty if the
90      completion failed, or after leaving and re-entering insert
91      mode.
92      Note: Plugins can modify the value to emulate the builtin
93      |CompleteDone| event behavior.
94    ]=],
95  },
96  count = {
97    type = 'integer',
98    desc = [=[
99      The count given for the last Normal mode command.  Can be used
100      to get the count before a mapping.  Read-only.  Example: >vim
101        :map _x :<C-U>echo "the count is " .. v:count<CR>
102      <
103      Note: The <C-U> is required to remove the line range that you
104      get when typing ':' after a count.
105      When there are two counts, as in "3d2w", they are multiplied,
106      just like what happens in the command, "d6w" for the example.
107      Also used for evaluating the 'formatexpr' option.
108    ]=],
109  },
110  count1 = {
111    type = 'integer',
112    desc = [=[
113      Just like "v:count", but defaults to one when no count is
114      used.
115    ]=],
116  },
117  ctype = {
118    type = 'string',
119    desc = [=[
120      The current locale setting for characters of the runtime
121      environment.  This allows Vim scripts to be aware of the
122      current locale encoding.  Technical: it's the value of
123      LC_CTYPE.  When not using a locale the value is "C".
124      This variable can not be set directly, use the |:language|
125      command.
126      See |multi-lang|.
127    ]=],
128  },
129  dying = {
130    type = 'integer',
131    desc = [=[
132      Normally zero.  When a deadly signal is caught it's set to
133      one.  When multiple signals are caught the number increases.
134      Can be used in an autocommand to check if Vim didn't
135      terminate normally.
136      Example: >vim
137        :au VimLeave * if v:dying | echo "\nAAAAaaaarrrggghhhh!!!\n" | endif
138      <
139      Note: if another deadly signal is caught when v:dying is one,
140      VimLeave autocommands will not be executed.
141    ]=],
142  },
143  echospace = {
144    type = 'integer',
145    desc = [=[
146      Number of screen cells that can be used for an `:echo` message
147      in the last screen line before causing the |hit-enter| prompt
148      (no longer applicable when |ui2| is enabled).
149
150      Depends on 'showcmd', 'ruler' and 'columns'.  You need to
151      check 'cmdheight' for whether there are full-width lines
152      available above the last line.
153    ]=],
154  },
155  errmsg = {
156    type = 'string',
157    desc = [=[
158      Last error message that occurred (not necessarily displayed).
159      Modifiable (can be set).
160      Example: >vim
161        let v:errmsg = ""
162        silent! next
163        if v:errmsg != ""
164          " ... handle error
165      <
166    ]=],
167  },
168  errors = {
169    type = 'string[]',
170    tags = { 'assert-return' },
171    desc = [=[
172      Errors found by assert functions, such as |assert_true()|.
173      This is a list of strings.
174      The assert functions append an item when an assert fails.
175      The return value indicates this: a one is returned if an item
176      was added to v:errors, otherwise zero is returned.
177      To remove old results make it empty: >vim
178        let v:errors = []
179      <
180      If v:errors is set to anything but a list it is made an empty
181      list by the assert function.
182    ]=],
183  },
184  event = {
185    type = 'vim.v.event',
186    desc = [=[
187      Dictionary of event data for the current |autocommand|.  Valid
188      only during the event lifetime; storing or passing v:event is
189      invalid!  Copy it instead: >vim
190        au TextYankPost * let g:foo = deepcopy(v:event)
191      <
192      Keys vary by event; see the documentation for the specific
193      event, e.g. |DirChanged| or |TextYankPost|.
194        KEY              DESCRIPTION ~
195        abort            Whether the event triggered during
196                         an aborting condition (e.g. |c_Esc| or
197                         |c_CTRL-C| for |CmdlineLeave|).
198        chan             |channel-id|
199        changed_window   Is |v:true| if the event fired while
200                         changing window  (or tab) on |DirChanged|.
201        cmdlevel         Level of cmdline.
202        cmdtype          Type of cmdline, |cmdline-char|.
203        col              Column count of popup menu on |CompleteChanged|,
204                         relative to screen.
205        complete_type    See |complete_info_mode|
206        complete_word    The selected word, or empty if completion
207                         was abandoned/discarded.
208        completed_item   Current selected item on |CompleteChanged|,
209                         or `{}` if no item selected.
210        cwd              Current working directory.
211        height           Height of popup menu on |CompleteChanged|
212        inclusive        Motion is |inclusive|, else exclusive.
213        info             Dict of arbitrary event data.
214        operator         Current |operator|.  Also set for Ex
215                         commands (unlike |v:operator|). For
216                         example if |TextYankPost| is triggered
217                         by the |:yank| Ex command then
218                         `v:event.operator` is "y".
219        reason           |CompleteDone| reason.
220        regcontents      Text stored in the register as a
221                         |readfile()|-style list of lines.
222        regname          Requested register (e.g "x" for "xyy), or
223                         empty string for an unnamed operation.
224        regtype          Type of register as returned by
225                         |getregtype()|.
226        row              Row count of popup menu on |CompleteChanged|,
227                         relative to screen.
228        scope            Event-specific scope name.
229        scrollbar        |v:true| if popup menu has a scrollbar, or
230                         |v:false| if not.
231        size             Total number of completion items on
232                         |CompleteChanged|.
233        status           Job status or exit code, -1 means "unknown". |TermClose|
234        visual           Selection is visual (as opposed to e.g. a motion range).
235        width            Width of popup menu on |CompleteChanged|
236        windows          List of window IDs that changed on |WinResized|
237    ]=],
238  },
239  exception = {
240    type = 'string',
241    desc = [=[
242      The value of the exception most recently caught and not
243      finished.  See also |v:stacktrace|, |v:throwpoint|, and
244      |throw-variables|.
245      Example: >vim
246        try
247          throw "oops"
248        catch /.*/
249          echo "caught " .. v:exception
250        endtry
251      <
252      Output: "caught oops".
253    ]=],
254  },
255  ['false'] = {
256    type = 'boolean',
257    desc = [=[
258      Special value used to put "false" in JSON and msgpack.  See
259      |json_encode()|.  This value is converted to "v:false" when used
260      as a String (e.g. in |expr5| with string concatenation
261      operator) and to zero when used as a Number (e.g. in |expr5|
262      or |expr7| when used with numeric operators).  Read-only.
263    ]=],
264  },
265  exiting = {
266    type = 'integer?',
267    desc = [=[
268      Exit code, or |v:null| before invoking the |VimLeavePre|
269      and |VimLeave| autocmds.  See |:q|, |:x| and |:cquit|.
270      Example: >vim
271        :au VimLeave * echo "Exit code is " .. v:exiting
272      <
273    ]=],
274  },
275  exitreason = {
276    type = 'string',
277    desc = [=[
278      Reason for the current exit. Set before |QuitPre|. Reset if
279      exit was canceled.
280
281      Possible values:
282      - ""          Not exiting, or exit was canceled.
283      - "quit"      |:quit|, |:qall|, |:wq|, |ZZ|, |ZQ|, etc.
284      - "restart"   |:restart|, |ZR|.
285      - "restart!"  |:restart!|, |[count]||ZR|.
286
287      Example: >vim
288        autocmd ExitPre * if v:exitreason ==# 'restart' | echomsg 'restarting' | endif
289      <
290      Read-only.
291    ]=],
292  },
293  fcs_choice = {
294    type = 'string',
295    desc = [=[
296      What should happen after a |FileChangedShell| event was
297      triggered.  Can be used in an autocommand to tell Vim what to
298      do with the affected buffer:
299        reload  Reload the buffer (does not work if
300                the file was deleted).
301        edit    Reload the buffer and detect the
302                values for options such as
303                'fileformat', 'fileencoding', 'binary'
304                (does not work if the file was
305                deleted).
306        ask     Ask the user what to do, as if there
307                was no autocommand.  Except that when
308                only the timestamp changed nothing
309                will happen.
310        <empty> Nothing, the autocommand should do
311                everything that needs to be done.
312      The default is empty.  If another (invalid) value is used then
313      Vim behaves like it is empty, there is no warning message.
314    ]=],
315  },
316  fcs_reason = {
317    type = 'string',
318    desc = [=[
319      The reason why the |FileChangedShell| event was triggered.
320      Can be used in an autocommand to decide what to do and/or what
321      to set v:fcs_choice to.  Possible values:
322      - deleted   file no longer exists
323      - conflict  file contents, mode or timestamp was
324                  changed and buffer is modified
325      - changed   file contents has changed
326      - mode      mode of file changed
327      - time      only file timestamp changed
328    ]=],
329  },
330  fname = {
331    type = 'string',
332    desc = [=[
333      When evaluating 'includeexpr': the file name that was
334      detected.  Empty otherwise.
335    ]=],
336  },
337  fname_diff = {
338    type = 'string',
339    desc = [=[
340      The name of the diff (patch) file.  Only valid while
341      evaluating 'patchexpr'.
342    ]=],
343  },
344  fname_in = {
345    type = 'string',
346    desc = [=[
347      The name of the input file.  Valid while evaluating:
348        option         used for ~
349        'charconvert'  file to be converted
350        'diffexpr'     original file
351        'patchexpr'    original file
352      And set to the swap file name for |SwapExists|.
353    ]=],
354  },
355  fname_new = {
356    type = 'string',
357    desc = [=[
358      The name of the new version of the file.  Only valid while
359      evaluating 'diffexpr'.
360    ]=],
361  },
362  fname_out = {
363    type = 'string',
364    desc = [=[
365      The name of the output file.  Only valid while
366      evaluating:
367        option           used for ~
368        'charconvert'    resulting converted file [1]
369        'diffexpr'       output of diff
370        'patchexpr'      resulting patched file
371      [1] When doing conversion for a write command (e.g., ":w
372      file") it will be equal to v:fname_in.  When doing conversion
373      for a read command (e.g., ":e file") it will be a temporary
374      file and different from v:fname_in.
375    ]=],
376  },
377  folddashes = {
378    type = 'string',
379    desc = [=[
380      Used for 'foldtext': dashes representing foldlevel of a closed
381      fold.
382      Read-only in the |sandbox|. |fold-foldtext|
383    ]=],
384  },
385  foldend = {
386    type = 'integer',
387    desc = [=[
388      Used for 'foldtext': last line of closed fold.
389      Read-only in the |sandbox|. |fold-foldtext|
390    ]=],
391  },
392  foldlevel = {
393    type = 'integer',
394    desc = [=[
395      Used for 'foldtext': foldlevel of closed fold.
396      Read-only in the |sandbox|. |fold-foldtext|
397    ]=],
398  },
399  foldstart = {
400    type = 'integer',
401    desc = [=[
402      Used for 'foldtext': first line of closed fold.
403      Read-only in the |sandbox|. |fold-foldtext|
404    ]=],
405  },
406  hlsearch = {
407    type = 'integer',
408    desc = [=[
409      Variable that indicates whether search highlighting is on.
410      Setting it makes sense only if 'hlsearch' is enabled.  Setting
411      this variable to zero acts like the |:nohlsearch| command,
412      setting it to one acts like >vim
413        let &hlsearch = &hlsearch
414      <
415      Note that the value is restored when returning from a
416      function. |function-search-undo|.
417    ]=],
418  },
419  insertmode = {
420    type = 'string',
421    desc = [=[
422      Used for the |InsertEnter| and |InsertChange| autocommand
423      events.  Values:
424        i    Insert mode
425        r    Replace mode
426        v    Virtual Replace mode
427    ]=],
428  },
429  key = {
430    type = 'string',
431    desc = [=[
432      Key of the current item of a |Dictionary|.  Only valid while
433      evaluating the expression used with |map()| and |filter()|.
434      Read-only.
435    ]=],
436  },
437  lang = {
438    type = 'string',
439    desc = [=[
440      The current locale setting for messages of the runtime
441      environment.  This allows Vim scripts to be aware of the
442      current language.  Technical: it's the value of LC_MESSAGES.
443      The value is system dependent.
444      This variable can not be set directly, use the |:language|
445      command.
446      It can be different from |v:ctype| when messages are desired
447      in a different language than what is used for character
448      encoding.  See |multi-lang|.
449    ]=],
450  },
451  useractive = {
452    type = 'integer',
453    tags = { 'user-idle' },
454    desc = [=[
455      Timestamp (nanoseconds since UNIX epoch) indicating the most
456      recent user activity, i.e. when a key is received from a UI
457      (TUI input or |nvim_input()|).
458
459      Initialized to 0 (no user activity since startup).
460      Read-only.
461    ]=],
462  },
463  lc_time = {
464    type = 'string',
465    desc = [=[
466      The current locale setting for time messages of the runtime
467      environment.  This allows Vim scripts to be aware of the
468      current language.  Technical: it's the value of LC_TIME.
469      This variable can not be set directly, use the |:language|
470      command.  See |multi-lang|.
471    ]=],
472  },
473  lnum = {
474    type = 'integer',
475    desc = [=[
476      Line number for the 'foldexpr' |fold-expr|, 'formatexpr',
477      'indentexpr' and 'statuscolumn' expressions, tab page number
478      for 'guitablabel' and 'guitabtooltip'.  Only valid while one of
479      these expressions is being evaluated.  Read-only when in the
480      |sandbox|.
481    ]=],
482  },
483  lua = {
484    desc = [=[
485      Prefix for calling Lua functions from expressions.
486      See |v:lua-call| for more information.
487    ]=],
488  },
489  maxcol = {
490    type = 'integer',
491    desc = [=[
492      Maximum line length.  Depending on where it is used it can be
493      screen columns, characters or bytes.  The value currently is
494      2147483647 on all systems.
495    ]=],
496  },
497  mouse_col = {
498    type = 'integer',
499    desc = [=[
500      Column number for a mouse click obtained with |getchar()|.
501      This is the screen column number, like with |virtcol()|.  The
502      value is zero when there was no mouse button click.
503    ]=],
504  },
505  mouse_lnum = {
506    type = 'integer',
507    desc = [=[
508      Line number for a mouse click obtained with |getchar()|.
509      This is the text line number, not the screen line number.  The
510      value is zero when there was no mouse button click.
511    ]=],
512  },
513  mouse_win = {
514    type = 'integer',
515    desc = [=[
516      Window number for a mouse click obtained with |getchar()|.
517      First window has number 1, like with |winnr()|.  The value is
518      zero when there was no mouse button click.
519    ]=],
520  },
521  mouse_winid = {
522    type = 'integer',
523    desc = [=[
524      |window-ID| for a mouse click obtained with |getchar()|.
525      The value is zero when there was no mouse button click.
526    ]=],
527  },
528  msgpack_types = {
529    type = 'table',
530    desc = [=[
531      Dictionary containing msgpack types used by |msgpackparse()|
532      and |msgpackdump()|. All types inside dictionary are fixed
533      (not editable) empty lists. To check whether some list is one
534      of msgpack types, use |is| operator.
535    ]=],
536  },
537  null = {
538    type = 'vim.NIL',
539    desc = [=[
540      Special value used to put "null" in JSON and NIL in msgpack.
541      See |json_encode()|.  This value is converted to "v:null" when
542      used as a String (e.g. in |expr5| with string concatenation
543      operator) and to zero when used as a Number (e.g. in |expr5|
544      or |expr7| when used with numeric operators).  Read-only.
545      In some places `v:null` can be used for a List, Dict, etc.
546      that is not set.  That is slightly different than an empty
547      List, Dict, etc.
548    ]=],
549  },
550  numbermax = {
551    type = 'integer',
552    desc = 'Maximum value of a number.',
553  },
554  numbermin = {
555    type = 'integer',
556    desc = 'Minimum value of a number (negative).',
557  },
558  numbersize = {
559    type = 'integer',
560    desc = [=[
561      Number of bits in a Number.  This is normally 64, but on some
562      systems it may be 32.
563    ]=],
564  },
565  oldfiles = {
566    type = 'string[]',
567    desc = [=[
568      List of file names that is loaded from the |shada| file on
569      startup.  These are the files that Vim remembers marks for.
570      The length of the List is limited by the ' argument of the
571      'shada' option (default is 100).
572      When the |shada| file is not used the List is empty.
573      Also see |:oldfiles| and |c_#<|.
574      The List can be modified, but this has no effect on what is
575      stored in the |shada| file later.  If you use values other
576      than String this will cause trouble.
577    ]=],
578  },
579  operator = {
580    type = 'string',
581    desc = [=[
582      The last operator given in Normal mode.  This is a single
583      character except for commands starting with <g> or <z>,
584      in which case it is two characters.  Best used alongside
585      |v:prevcount| and |v:register|.  Useful if you want to cancel
586      Operator-pending mode and then use the operator, e.g.: >vim
587        :omap O <Esc>:call MyMotion(v:operator)<CR>
588      <
589      The value remains set until another operator is entered, thus
590      don't expect it to be empty.
591      v:operator is not set for |:delete|, |:yank| or other Ex
592      commands.
593      Read-only.
594    ]=],
595  },
596  option_command = {
597    type = 'string',
598    desc = [=[
599      Command used to set the option.  Valid while executing an
600      |OptionSet| autocommand.
601        value        option was set via ~
602        "setlocal"   |:setlocal| or `:let l:xxx`
603        "setglobal"  |:setglobal| or `:let g:xxx`
604        "set"        |:set| or |:let|
605        "modeline"   |modeline|
606    ]=],
607  },
608  option_new = {
609    desc = [=[
610      New value of the option.  Valid while executing an |OptionSet|
611      autocommand.
612    ]=],
613  },
614  option_old = {
615    desc = [=[
616      Old value of the option.  Valid while executing an |OptionSet|
617      autocommand.  Depending on the command used for setting and
618      the kind of option this is either the local old value or the
619      global old value.
620    ]=],
621  },
622  option_oldglobal = {
623    desc = [=[
624      Old global value of the option.  Valid while executing an
625      |OptionSet| autocommand.
626    ]=],
627  },
628  option_oldlocal = {
629    desc = [=[
630      Old local value of the option.  Valid while executing an
631      |OptionSet| autocommand.
632    ]=],
633  },
634  option_type = {
635    type = 'string',
636    desc = [=[
637      Scope of the set command.  Valid while executing an
638      |OptionSet| autocommand.  Can be either "global" or "local"
639    ]=],
640  },
641  prevcount = {
642    type = 'integer',
643    desc = [=[
644      The count given for the last but one Normal mode command.
645      This is the v:count value of the previous command.  Useful if
646      you want to cancel Visual or Operator-pending mode and then
647      use the count, e.g.: >vim
648        :vmap % <Esc>:call MyFilter(v:prevcount)<CR>
649      <
650      Read-only.
651    ]=],
652  },
653  profiling = {
654    type = 'integer',
655    desc = [=[
656      Normally zero.  Set to one after using ":profile start".
657      See |profiling|.
658    ]=],
659  },
660  progname = {
661    type = 'string',
662    desc = [=[
663      The name by which Nvim was invoked (with path removed).
664      Read-only.
665    ]=],
666  },
667  progpath = {
668    type = 'string',
669    desc = [=[
670      Absolute path to the current running Nvim.
671      Read-only.
672    ]=],
673  },
674  register = {
675    type = 'string',
676    desc = [=[
677      The name of the register in effect for the current normal mode
678      command (regardless of whether that command actually used a
679      register).  Or for the currently executing normal mode mapping
680      (use this in custom commands that take a register).
681      If none is supplied it is the default register '"', unless
682      'clipboard' contains "unnamed" or "unnamedplus", then it is
683      "*" or '+'.
684      Also see |getreg()| and |setreg()|
685    ]=],
686  },
687  relnum = {
688    type = 'integer',
689    desc = [=[
690      Relative line number for the 'statuscolumn' expression.
691      Read-only.
692    ]=],
693  },
694  scrollstart = {
695    type = 'string',
696    desc = [=[
697      String describing the script or function that caused the
698      screen to scroll up.  It's only set when it is empty, thus the
699      first reason is remembered.  It is set to "Unknown" for a
700      typed command.
701    ]=],
702  },
703  searchforward = {
704    type = 'integer',
705    desc = [=[
706      Search direction:  1 after a forward search, 0 after a
707      backward search.  It is reset to forward when directly setting
708      the last search pattern, see |quote/|.
709      Note that the value is restored when returning from a
710      function. |function-search-undo|.
711      Read-write.
712    ]=],
713  },
714  servername = {
715    type = 'string',
716    desc = [=[
717      Primary listen-address of Nvim, the first item returned by
718      |serverlist()|. Usually this is the named pipe created by Nvim
719      at |startup| or given by |--listen| (or the deprecated
720      |$NVIM_LISTEN_ADDRESS| env var).
721
722      See also |serverstart()| |serverstop()|.
723      Read-only.
724
725                                                           *$NVIM*
726      $NVIM is set to v:servername by |terminal| and |jobstart()|,
727      and is thus a hint that the current environment is a child
728      (direct subprocess) of Nvim.
729
730      Example: a child Nvim process can detect and make requests to
731      its parent Nvim: >lua
732
733        if vim.env.NVIM then
734          local ok, chan = pcall(vim.fn.sockconnect, 'pipe', vim.env.NVIM, {rpc=true})
735          if ok and chan then
736            local client = vim.api.nvim_get_chan_info(chan).client
737            local rv = vim.rpcrequest(chan, 'nvim_exec_lua', [[return ... + 1]], { 41 })
738            vim.print(('got "%s" from parent Nvim'):format(rv))
739          end
740        end
741      <
742    ]=],
743  },
744  shell_error = {
745    type = 'integer',
746    desc = [=[
747      Result of the last shell command.  When non-zero, the last
748      shell command had an error.  When zero, there was no problem.
749      This only works when the shell returns the error code to Vim.
750      The value -1 is often used when the command could not be
751      executed.  Read-only.
752      Example: >vim
753        !mv foo bar
754        if v:shell_error
755          echo 'could not rename "foo" to "bar"!'
756        endif
757      <
758    ]=],
759  },
760  stacktrace = {
761    type = 'table[]',
762    desc = [=[
763      The stack trace of the exception most recently caught and
764      not finished.  Refer to |getstacktrace()| for the structure of
765      stack trace.  See also |v:exception|, |v:throwpoint|, and
766      |throw-variables|.
767    ]=],
768  },
769  starttime = {
770    type = 'integer',
771    desc = [=[
772      Timestamp (nanoseconds since UNIX epoch) when the Nvim process
773      started.
774
775      To see the current "uptime": >lua
776        vim.print(('uptime: %d seconds'):format(os.time() - (vim.v.starttime / 1e9)))
777      <
778      Read-only.
779    ]=],
780  },
781  startreason = {
782    type = 'string',
783    desc = [=[
784      The reason Nvim started. Possible values:
785      - "normal"    Normal startup, yearning for life, etc.
786      - "restart"   Started by |:restart|.
787      - "restart!"  Started by |:restart!|.
788
789      Read-only.
790    ]=],
791  },
792  statusmsg = {
793    type = 'string',
794    desc = [=[
795      Last given status message.
796      Modifiable (can be set).
797    ]=],
798  },
799  stderr = {
800    type = 'integer',
801    desc = [=[
802      |channel-id| corresponding to stderr. The value is always 2;
803      use this variable to make your code more descriptive.
804      Unlike stdin and stdout (see |stdioopen()|), stderr is always
805      open for writing. Example: >vim
806      :call chansend(v:stderr, "error: toaster empty\n")
807      <
808    ]=],
809  },
810  swapchoice = {
811    type = 'string',
812    desc = [=[
813      |SwapExists| autocommands can set this to the selected choice
814      for handling an existing swapfile:
815        'o'    Open read-only
816        'e'    Edit anyway
817        'r'    Recover
818        'd'    Delete swapfile
819        'q'    Quit
820        'a'    Abort
821      The value should be a single-character string.  An empty value
822      results in the user being asked, as would happen when there is
823      no SwapExists autocommand.  The default is empty.
824    ]=],
825  },
826  swapcommand = {
827    type = 'string',
828    desc = [=[
829      Normal mode command to be executed after a file has been
830      opened.  Can be used for a |SwapExists| autocommand to have
831      another Vim open the file and jump to the right place.  For
832      example, when jumping to a tag the value is ":tag tagname\r".
833      For ":edit +cmd file" the value is ":cmd\r".
834    ]=],
835  },
836  swapname = {
837    type = 'string',
838    desc = [=[
839      Name of the swapfile found.
840      Only valid during |SwapExists| event.
841      Read-only.
842    ]=],
843  },
844  t_blob = {
845    type = 'integer',
846    tags = { 'v:t_TYPE' },
847    desc = 'Value of |Blob| type.  Read-only.  See: |type()|',
848  },
849  t_bool = {
850    type = 'integer',
851    desc = 'Value of |Boolean| type.  Read-only.  See: |type()|',
852  },
853  t_dict = {
854    type = 'integer',
855    desc = 'Value of |Dictionary| type.  Read-only.  See: |type()|',
856  },
857  t_float = {
858    type = 'integer',
859    desc = 'Value of |Float| type.  Read-only.  See: |type()|',
860  },
861  t_func = {
862    type = 'integer',
863    desc = 'Value of |Funcref| type.  Read-only.  See: |type()|',
864  },
865  t_list = {
866    type = 'integer',
867    desc = 'Value of |List| type.  Read-only.  See: |type()|',
868  },
869  t_number = {
870    type = 'integer',
871    desc = 'Value of |Number| type.  Read-only.  See: |type()|',
872  },
873  t_string = {
874    type = 'integer',
875    desc = 'Value of |String| type.  Read-only.  See: |type()|',
876  },
877  termrequest = {
878    type = 'string',
879    desc = [=[
880      The value of the most recent OSC, DCS or APC control sequence
881      sent from a process running in the embedded |terminal|.
882      This can be read in a |TermRequest| event handler to respond
883      to queries from embedded applications.
884    ]=],
885  },
886  termresponse = {
887    type = 'string',
888    desc = [=[
889      The most recent OSC, DCS, APC, or recognized CSI (DA1, kitty
890      multiple-cursors) control sequence received by Nvim from the
891      host-terminal. Can be read in a |TermResponse| event handler
892      after querying the terminal.
893    ]=],
894  },
895  testing = {
896    type = 'integer',
897    desc = [=[
898      Must be set before using `test_garbagecollect_now()`.
899    ]=],
900  },
901  this_session = {
902    type = 'string',
903    desc = [=[
904      Full filename of the last loaded or saved session file.
905      Empty when no session file has been saved.  See |:mksession|.
906      Modifiable (can be set).
907    ]=],
908  },
909  throwpoint = {
910    type = 'string',
911    desc = [=[
912      The point where the exception most recently caught and not
913      finished was thrown.  Not set when commands are typed.  See
914      also |v:exception|, |v:stacktrace|, and |throw-variables|.
915      Example: >vim
916        try
917          throw "oops"
918        catch /.*/
919          echo "Exception from" v:throwpoint
920        endtry
921      <
922      Output: "Exception from test.vim, line 2"
923    ]=],
924  },
925  ['true'] = {
926    type = 'boolean',
927    desc = [=[
928      Special value used to put "true" in JSON and msgpack.  See
929      |json_encode()|.  This value is converted to "v:true" when used
930      as a String (e.g. in |expr5| with string concatenation
931      operator) and to one when used as a Number (e.g. in |expr5| or
932      |expr7| when used with numeric operators).  Read-only.
933    ]=],
934  },
935  val = {
936    desc = [=[
937      Value of the current item of a |List| or |Dictionary|.  Only
938      valid while evaluating the expression used with |map()| and
939      |filter()|.  Read-only.
940    ]=],
941  },
942  version = {
943    type = 'integer',
944    desc = [=[
945      Vim version number: major version times 100 plus minor
946      version.  Vim 5.0 is 500, Vim 5.1 is 501.
947      Read-only.
948      Use |has()| to check the Nvim (not Vim) version: >vim
949        :if has("nvim-0.2.1")
950      <
951    ]=],
952  },
953  versionlong = {
954    type = 'integer',
955    desc = [=[
956      Like v:version, but also including the patchlevel in the last
957      four digits.  Version 8.1 with patch 123 has value 8010123.
958      This can be used like this: >
959        if v:versionlong >= 8010123
960      <
961      However, if there are gaps in the list of patches included
962      this will not work well.  This can happen if a recent patch
963      was included into an older version, e.g. for a security fix.
964      Use the has() function to make sure the patch is actually
965      included.
966    ]=],
967  },
968  vim_did_enter = {
969    type = 'integer',
970    desc = [=[
971      0 during startup, 1 just before |VimEnter|.
972      See also |v:vim_did_init|, which is set earlier.
973      Read-only.
974    ]=],
975  },
976  vim_did_init = {
977    type = 'integer',
978    desc = [=[
979      0 during initialization, 1 after sourcing the user |vimrc|,
980      just before |load-plugins|.
981      See also |v:vim_did_enter|, which is set later.
982      Read-only.
983    ]=],
984  },
985  virtnum = {
986    type = 'integer',
987    desc = [=[
988      Virtual line number for the 'statuscolumn' expression.
989      Negative when drawing the status column for virtual lines, zero
990      when drawing an actual buffer line, and positive when drawing
991      the wrapped part of a buffer line.
992      Read-only.
993    ]=],
994  },
995  warningmsg = {
996    type = 'string',
997    desc = [=[
998      Last given warning message.
999      Modifiable (can be set).
1000    ]=],
1001  },
1002  windowid = {
1003    type = 'integer',
1004    desc = [=[
1005      Application-specific window "handle" which may be set by any
1006      attached UI. Defaults to zero.
1007      Note: For Nvim |windows| use |winnr()| or |win_getid()|, see
1008      |window-ID|.
1009    ]=],
1010  },
1011}
1012
1013return M