Skip to content

Commit 81bbad4

Browse files
committed
👍 Update function and option modules with Vim 8.2.0662
While denops.vim itself drop support Vim before 8.2.0662 vim-denops/denops.vim#97
1 parent 97664c4 commit 81bbad4

File tree

6 files changed

+239
-96
lines changed

6 files changed

+239
-96
lines changed

denops_std/function/_generated.ts

Lines changed: 80 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -919,19 +919,6 @@ export function diff_hlID(
919919
return denops.call("diff_hlID", ...args);
920920
}
921921

922-
/**
923-
* Return all of environment variables as dictionary. You can
924-
* check if an environment variable exists like this:
925-
* :echo has_key(environ(), 'HOME')
926-
* Note that the variable name may be CamelCase; to ignore case
927-
* use this:
928-
* :echo index(keys(environ()), 'HOME', 0, 1) != -1
929-
*/
930-
export function environ(denops: Denops): Promise<unknown>;
931-
export function environ(denops: Denops, ...args: unknown[]): Promise<unknown> {
932-
return denops.call("environ", ...args);
933-
}
934-
935922
/**
936923
* Return the Number 1 if {expr} is empty, zero otherwise.
937924
* - A |List| or |Dictionary| is empty when it does not have any
@@ -952,6 +939,19 @@ export function empty(denops: Denops, ...args: unknown[]): Promise<unknown> {
952939
return denops.call("empty", ...args);
953940
}
954941

942+
/**
943+
* Return all of environment variables as dictionary. You can
944+
* check if an environment variable exists like this:
945+
* :echo has_key(environ(), 'HOME')
946+
* Note that the variable name may be CamelCase; to ignore case
947+
* use this:
948+
* :echo index(keys(environ()), 'HOME', 0, 1) != -1
949+
*/
950+
export function environ(denops: Denops): Promise<unknown>;
951+
export function environ(denops: Denops, ...args: unknown[]): Promise<unknown> {
952+
return denops.call("environ", ...args);
953+
}
954+
955955
/**
956956
* Escape the characters in {chars} that occur in {string} with a
957957
* backslash. Example:
@@ -1005,16 +1005,15 @@ export function eventhandler(
10051005
* arguments.
10061006
* executable() uses the value of $PATH and/or the normal
10071007
* searchpath for programs.
1008-
* On MS-DOS and MS-Windows the ".exe", ".bat", etc. can
1009-
* optionally be included. Then the extensions in $PATHEXT are
1010-
* tried. Thus if "foo.exe" does not exist, "foo.exe.bat" can be
1011-
* found. If $PATHEXT is not set then ".exe;.com;.bat;.cmd" is
1012-
* used. A dot by itself can be used in $PATHEXT to try using
1013-
* the name without an extension. When 'shell' looks like a
1014-
* Unix shell, then the name is also tried without adding an
1015-
* extension.
1016-
* On MS-DOS and MS-Windows it only checks if the file exists and
1017-
* is not a directory, not if it's really executable.
1008+
* On MS-Windows the ".exe", ".bat", etc. can optionally be
1009+
* included. Then the extensions in $PATHEXT are tried. Thus if
1010+
* "foo.exe" does not exist, "foo.exe.bat" can be found. If
1011+
* $PATHEXT is not set then ".exe;.com;.bat;.cmd" is used. A dot
1012+
* by itself can be used in $PATHEXT to try using the name
1013+
* without an extension. When 'shell' looks like a Unix shell,
1014+
* then the name is also tried without adding an extension.
1015+
* On MS-Windows it only checks if the file exists and is not a
1016+
* directory, not if it's really executable.
10181017
* On MS-Windows an executable in the same directory as Vim is
10191018
* always found. Since this directory is added to $PATH it
10201019
* should also work to execute it |win32-PATH|.
@@ -1260,6 +1259,8 @@ export function extend(denops: Denops, ...args: unknown[]): Promise<unknown> {
12601259
* 'L' Lowlevel input. Only works for Unix or when using the
12611260
* GUI. Keys are used as if they were coming from the
12621261
* terminal. Other flags are not used.
1262+
* When a CTRL-C interrupts and 't' is included it sets
1263+
* the internal "got_int" flag.
12631264
* 'i' Insert the string instead of appending (see above).
12641265
* 'x' Execute commands until typeahead is empty. This is
12651266
* similar to using ":normal!". You can call feedkeys()
@@ -1835,6 +1836,8 @@ export function get(denops: Denops, ...args: unknown[]): Promise<unknown> {
18351836
* {only with the |+viminfo| feature}
18361837
* listed TRUE if the buffer is listed.
18371838
* lnum current line number in buffer.
1839+
* linecount number of lines in the buffer (only
1840+
* valid when loaded)
18381841
* loaded TRUE if the buffer is loaded.
18391842
* name full path to the file in the buffer.
18401843
* signs list of signs placed in the buffer.
@@ -2133,6 +2136,7 @@ export function getcmdwintype(
21332136
* command Ex command (and arguments)
21342137
* compiler compilers
21352138
* cscope |:cscope| suboptions
2139+
* diff_buffer |:diffget| and |:diffput| completion
21362140
* dir directory names
21372141
* environment environment variable names
21382142
* event autocommand events
@@ -2435,7 +2439,7 @@ export function getmatches(
24352439
/**
24362440
* Return a Number which is the process ID of the Vim process.
24372441
* On Unix and MS-Windows this is a unique number, until Vim
2438-
* exits. On MS-DOS it's always zero.
2442+
* exits.
24392443
*/
24402444
export function getpid(denops: Denops): Promise<unknown>;
24412445
export function getpid(denops: Denops, ...args: unknown[]): Promise<unknown> {
@@ -2754,7 +2758,7 @@ export function getwininfo(
27542758
}
27552759

27562760
/**
2757-
* The result is a list with two numbers, the result of
2761+
* The result is a List with two numbers, the result of
27582762
* |getwinposx()| and |getwinposy()| combined:
27592763
* [x-pos, y-pos]
27602764
* {timeout} can be used to specify how long to wait in msec for
@@ -3879,6 +3883,7 @@ export function map(denops: Denops, ...args: unknown[]): Promise<unknown> {
38793883
* "rhs" The {rhs} of the mapping as typed.
38803884
* "silent" 1 for a |:map-silent| mapping, else 0.
38813885
* "noremap" 1 if the {rhs} of the mapping is not remappable.
3886+
* "script" 1 if mapping was defined with <script>.
38823887
* "expr" 1 for an expression mapping (|:map-<expr>|).
38833888
* "buffer" 1 for a buffer local mapping (|:map-local|).
38843889
* "mode" Modes for which the mapping is defined. In
@@ -4003,6 +4008,10 @@ export function mapcheck(denops: Denops, ...args: unknown[]): Promise<unknown> {
40034008
* The 'ignorecase' option is used to set the ignore-caseness of
40044009
* the pattern. 'smartcase' is NOT used. The matching is always
40054010
* done like 'magic' is set and 'cpoptions' is empty.
4011+
* Note that a match at the start is preferred, thus when the
4012+
* pattern is using "*" (any number of matches) it tends to find
4013+
* zero matches at the start instead of a number of matches
4014+
* further down in the text.
40064015
* Can also be used as a |method|:
40074016
* GetList()->match('word')
40084017
*/
@@ -4052,6 +4061,10 @@ export function match(denops: Denops, ...args: unknown[]): Promise<unknown> {
40524061
* The 'ignorecase' option is used to set the ignore-caseness of
40534062
* the pattern. 'smartcase' is NOT used. The matching is always
40544063
* done like 'magic' is set and 'cpoptions' is empty.
4064+
* Note that a match at the start is preferred, thus when the
4065+
* pattern is using "*" (any number of matches) it tends to find
4066+
* zero matches at the start instead of a number of matches
4067+
* further down in the text.
40554068
* Can also be used as a |method|:
40564069
* GetList()->match('word')
40574070
*/
@@ -4094,6 +4107,10 @@ export function strpbrk(denops: Denops, ...args: unknown[]): Promise<unknown> {
40944107
* The 'ignorecase' option is used to set the ignore-caseness of
40954108
* the pattern. 'smartcase' is NOT used. The matching is always
40964109
* done like 'magic' is set and 'cpoptions' is empty.
4110+
* Note that a match at the start is preferred, thus when the
4111+
* pattern is using "*" (any number of matches) it tends to find
4112+
* zero matches at the start instead of a number of matches
4113+
* further down in the text.
40974114
* Can also be used as a |method|:
40984115
* GetList()->match('word')
40994116
*/
@@ -4409,9 +4426,9 @@ export function matchstrpos(
44094426

44104427
/**
44114428
* Return the maximum value of all items in {expr}.
4412-
* {expr} can be a list or a dictionary. For a dictionary,
4413-
* it returns the maximum of all values in the dictionary.
4414-
* If {expr} is neither a list nor a dictionary, or one of the
4429+
* {expr} can be a List or a Dictionary. For a Dictionary,
4430+
* it returns the maximum of all values in the Dictionary.
4431+
* If {expr} is neither a List nor a Dictionary, or one of the
44154432
* items in {expr} cannot be used as a Number this results in
44164433
* an error. An empty |List| or |Dictionary| results in zero.
44174434
* Can also be used as a |method|:
@@ -4423,9 +4440,9 @@ export function max(denops: Denops, ...args: unknown[]): Promise<unknown> {
44234440
}
44244441

44254442
/**
4426-
* {expr} can be a list or a dictionary. For a dictionary,
4427-
* it returns the minimum of all values in the dictionary.
4428-
* If {expr} is neither a list nor a dictionary, or one of the
4443+
* {expr} can be a List or a Dictionary. For a Dictionary,
4444+
* it returns the minimum of all values in the Dictionary.
4445+
* If {expr} is neither a List nor a Dictionary, or one of the
44294446
* items in {expr} cannot be used as a Number this results in
44304447
* an error. An empty |List| or |Dictionary| results in zero.
44314448
* Can also be used as a |method|:
@@ -5912,8 +5929,8 @@ export function setloclist(
59125929
}
59135930

59145931
/**
5915-
* Restores a list of matches saved by |getmatches() for the
5916-
* current window|. Returns 0 if successful, otherwise -1. All
5932+
* Restores a list of matches saved by |getmatches()| for the
5933+
* current window. Returns 0 if successful, otherwise -1. All
59175934
* current matches are cleared before the list is restored. See
59185935
* example for |getmatches()|.
59195936
* If {win} is specified, use the window with this number or
@@ -5935,7 +5952,11 @@ export function setmatches(
59355952

59365953
/**
59375954
* Create or replace or add to the quickfix list.
5938-
* When {what} is not present, use the items in {list}. Each
5955+
* If the optional {what} dictionary argument is supplied, then
5956+
* only the items listed in {what} are set. The first {list}
5957+
* argument is ignored. See below for the supported items in
5958+
* {what}.
5959+
* When {what} is not present, the items in {list} or used. Each
59395960
* item must be a dictionary. Non-dictionary items in {list} are
59405961
* ignored. Each dictionary item can contain the following
59415962
* entries:
@@ -5983,10 +6004,7 @@ export function setmatches(
59836004
* quickfix list in the stack and all the following lists are
59846005
* freed. To add a new quickfix list at the end of the stack,
59856006
* set "nr" in {what} to "$".
5986-
* If the optional {what} dictionary argument is supplied, then
5987-
* only the items listed in {what} are set. The first {list}
5988-
* argument is ignored. The following items can be specified in
5989-
* {what}:
6007+
* The following items can be specified in dictionary {what}:
59906008
* context quickfix list context. See |quickfix-context|
59916009
* efm errorformat to use when parsing text from
59926010
* "lines". If this is not present, then the
@@ -6041,6 +6059,7 @@ export function setqflist(
60416059

60426060
/**
60436061
* Set the register {regname} to {value}.
6062+
* If {regname} is "" or "@", the unnamed register '"' is used.
60446063
* {value} may be any value returned by |getreg()|, including
60456064
* a |List|.
60466065
* If {options} contains "a" or {regname} is upper case,
@@ -6156,20 +6175,23 @@ export function settabwinvar(
61566175
* Modify the tag stack of the window {nr} using {dict}.
61576176
* {nr} can be the window number or the |window-ID|.
61586177
* For a list of supported items in {dict}, refer to
6159-
* |gettagstack()|
6160-
* If {action} is not present or is set to 'r', then the tag
6161-
* stack is replaced. If {action} is set to 'a', then new entries
6162-
* from {dict} are pushed onto the tag stack.
6178+
* |gettagstack()|. "curidx" takes effect before changing the tag
6179+
* stack.
6180+
* How the tag stack is modified depends on the {action}
6181+
* argument:
6182+
* - If {action} is not present or is set to 'r', then the tag
6183+
* stack is replaced.
6184+
* - If {action} is set to 'a', then new entries from {dict} are
6185+
* pushed (added) onto the tag stack.
6186+
* - If {action} is set to 't', then all the entries from the
6187+
* current entry in the tag stack or "curidx" in {dict} are
6188+
* removed and then new entries are pushed to the stack.
6189+
* The current index is set to one after the length of the tag
6190+
* stack after the modification.
61636191
* Returns zero for success, -1 for failure.
6164-
* Examples:
6165-
* Set current index of the tag stack to 4:
6166-
* call settagstack(1005, {'curidx' : 4})
6192+
* Examples (for more examples see |tagstack-examples||):
61676193
* Empty the tag stack of window 3:
61686194
* call settagstack(3, {'items' : []})
6169-
* Push a new item onto the tag stack:
6170-
* let pos = [bufnr('myfile.txt'), 10, 1, 0]
6171-
* let newtag = [{'tagname' : 'mytag', 'from' : pos}]
6172-
* call settagstack(2, {'items' : newtag}, 'a')
61736195
* Save and restore the tag stack:
61746196
* let stack = gettagstack(1003)
61756197
* " do something else
@@ -6301,6 +6323,8 @@ export function shiftwidth(
63016323
* removed when "dir" is a symbolic link within the same
63026324
* directory. In order to resolve all the involved symbolic
63036325
* links before simplifying the path name, use |resolve()|.
6326+
* Can also be used as a |method|:
6327+
* GetName()->simplify()
63046328
*/
63056329
export function simplify(denops: Denops, filename: unknown): Promise<unknown>;
63066330
export function simplify(denops: Denops, ...args: unknown[]): Promise<unknown> {
@@ -7235,7 +7259,7 @@ export function synstack(denops: Denops, ...args: unknown[]): Promise<unknown> {
72357259
* The command executed is constructed using several options:
72367260
* 'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote'
72377261
* ({tmp} is an automatically generated file name).
7238-
* For Unix and OS/2 braces are put around {expr} to allow for
7262+
* For Unix, braces are put around {expr} to allow for
72397263
* concatenated commands.
72407264
* The command will be executed in "cooked" mode, so that a
72417265
* CTRL-C will interrupt the command (on Unix at least).
@@ -8009,11 +8033,12 @@ export function winheight(
80098033
* " Two horizontally split windows
80108034
* :echo winlayout()
80118035
* ['col', [['leaf', 1000], ['leaf', 1001]]]
8012-
* " Three horizontally split windows, with two
8013-
* " vertically split windows in the middle window
8036+
* " The second tab page, with three horizontally split
8037+
* " windows, with two vertically split windows in the
8038+
* " middle window
80148039
* :echo winlayout(2)
8015-
* ['col', [['leaf', 1002], ['row', ['leaf', 1003],
8016-
* ['leaf', 1001]]], ['leaf', 1000]]
8040+
* ['col', [['leaf', 1002], ['row', [['leaf', 1003],
8041+
* ['leaf', 1001]]], ['leaf', 1000]]]
80178042
* Can also be used as a |method|:
80188043
* GetTabnr()->winlayout()
80198044
*/
@@ -8028,6 +8053,7 @@ export function winlayout(
80288053
/**
80298054
* The result is a Number, which is the number of the current
80308055
* window. The top window has number 1.
8056+
* Returns zero for a popup window.
80318057
* The optional argument {arg} supports the following values:
80328058
* $ the number of the last window (the window
80338059
* count).

0 commit comments

Comments
 (0)