diff options
Diffstat (limited to 'runtime/lua/vim/_meta')
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 55 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/options.lua | 28 |
2 files changed, 54 insertions, 29 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index e7ad91132d..62df0a7707 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -939,8 +939,8 @@ function vim.api.nvim_create_augroup(name, opts) end --- - desc (string) optional: description (for documentation and troubleshooting). --- - callback (function|string) optional: Lua function (or Vimscript function name, if --- string) called when the event(s) is triggered. Lua callback can return a truthy ---- value (not `false` or `nil`) to delete the autocommand. Receives one argument, ---- a table with these keys: [event-args]() +--- value (not `false` or `nil`) to delete the autocommand, and receives one argument, a +--- table with these keys: [event-args]() --- - id: (number) autocommand id --- - event: (string) name of the triggered event `autocmd-events` --- - group: (number|nil) autocommand group id, if any @@ -1796,41 +1796,40 @@ function vim.api.nvim_open_term(buffer, opts) end --- region is hidden by setting `eob` flag of --- 'fillchars' to a space char, and clearing the --- `hl-EndOfBuffer` region in 'winhighlight'. ---- - border: Style of (optional) window border. This can either be a string ---- or an array. The string values are the same as those described in 'winborder'. ---- If it is an array, it should have a length of eight or any divisor of ---- eight. The array will specify the eight chars building up the border ---- in a clockwise fashion starting with the top-left corner. As an ---- example, the double box style could be specified as: ---- ``` ---- [ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ]. ---- ``` ---- If the number of chars are less than eight, they will be repeated. Thus ---- an ASCII border could be specified as ---- ``` ---- [ "/", "-", \"\\\\\", "|" ], ---- ``` ---- or all chars the same as ---- ``` ---- [ "x" ]. ---- ``` ---- An empty string can be used to turn off a specific border, for instance, +--- - border: (`string|string[]`) (defaults to 'winborder' option) Window border. The string form +--- accepts the same values as the 'winborder' option. The array form must have a length of +--- eight or any divisor of eight, specifying the chars that form the border in a clockwise +--- fashion starting from the top-left corner. For example, the double-box style can be +--- specified as: --- ``` ---- [ "", "", "", ">", "", "", "", "<" ] +--- [ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ]. --- ``` ---- will only make vertical borders but not horizontal ones. ---- By default, `FloatBorder` highlight is used, which links to `WinSeparator` ---- when not defined. It could also be specified by character: +--- If fewer than eight chars are given, they will be repeated. An ASCII border could be +--- specified as: --- ``` ---- [ ["+", "MyCorner"], ["x", "MyBorder"] ]. +--- [ "/", "-", \"\\\\\", "|" ], --- ``` ---- - title: Title (optional) in window border, string or list. +--- Or one char for all sides: +--- ``` +--- [ "x" ]. +--- ``` +--- Empty string can be used to hide a specific border. This example will show only vertical +--- borders, not horizontal: +--- ``` +--- [ "", "", "", ">", "", "", "", "<" ] +--- ``` +--- By default, `hl-FloatBorder` highlight is used, which links to `hl-WinSeparator` when not +--- defined. Each border side can specify an optional highlight: +--- ``` +--- [ ["+", "MyCorner"], ["x", "MyBorder"] ]. +--- ``` +--- - title: (optional) Title in window border, string or list. --- List should consist of `[text, highlight]` tuples. --- If string, or a tuple lacks a highlight, the default highlight group is `FloatTitle`. --- - title_pos: Title position. Must be set with `title` option. --- Value can be one of "left", "center", or "right". --- Default is `"left"`. ---- - footer: Footer (optional) in window border, string or list. +--- - footer: (optional) Footer in window border, string or list. --- List should consist of `[text, highlight]` tuples. --- If string, or a tuple lacks a highlight, the default highlight group is `FloatFooter`. --- - footer_pos: Footer position. Must be set with `footer` option. diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 20d8ac3058..9ff4770e7c 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1716,6 +1716,21 @@ vim.go.dex = vim.go.diffexpr --- Use the indent heuristic for the internal --- diff library. --- +--- inline:{text} Highlight inline differences within a change. +--- See `view-diffs`. Supported values are: +--- +--- none Do not perform inline highlighting. +--- simple Highlight from first different +--- character to the last one in each +--- line. This is the default if no +--- `inline:` value is set. +--- char Use internal diff to perform a +--- character-wise diff and highlight the +--- difference. +--- word Use internal diff to perform a +--- `word`-wise diff and highlight the +--- difference. +--- --- internal Use the internal diff library. This is --- ignored when 'diffexpr' is set. *E960* --- When running out of memory when writing a @@ -1766,7 +1781,7 @@ vim.go.dex = vim.go.diffexpr --- --- --- @type string -vim.o.diffopt = "internal,filler,closeoff,linematch:40" +vim.o.diffopt = "internal,filler,closeoff,inline:simple,linematch:40" vim.o.dip = vim.o.diffopt vim.go.diffopt = vim.o.diffopt vim.go.dip = vim.go.diffopt @@ -4787,6 +4802,17 @@ vim.o.ph = vim.o.pumheight vim.go.pumheight = vim.o.pumheight vim.go.ph = vim.go.pumheight +--- Maximum width for the popup menu (`ins-completion-menu`). When zero, +--- there is no maximum width limit, otherwise the popup menu will never be +--- wider than this value. Truncated text will be indicated by "..." at the +--- end. Takes precedence over 'pumwidth'. +--- +--- @type integer +vim.o.pummaxwidth = 0 +vim.o.pmw = vim.o.pummaxwidth +vim.go.pummaxwidth = vim.o.pummaxwidth +vim.go.pmw = vim.go.pummaxwidth + --- Minimum width for the popup menu (`ins-completion-menu`). If the --- cursor column + 'pumwidth' exceeds screen width, the popup menu is --- nudged to fit on the screen. |