aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* fix(diagnostic): fix typing on field |diagnostic-severity|Jongwook Choi2024-01-23
| | | | | | | | Problem: vim.diagnostic.{underline,float,virtual_text...}.severity will have a type warning on list-like or table (min-max) inputs, e.g. `vim.diagnostic.config { float = { severity = { min = INFO } } }`. Solution: Correct the typing as documented in |diagnostic-severity|.
* vim-patch:add31baedaf0Christian Clason2024-01-22
| | | | | | | | | | | | | | | | | runtime(sh): Add handling for ksh93 shared-state comsubs and mksh valsubs (vim/vim#13884) This commit adds support for ksh93 shared-state command substitutions (syntax: ${ command; }) and mksh's value substitutions (syntax: ${|command;}) in the sh syntax script. Also add a syntax test for ksh subshares with dumps included to make sure it doesn't regress. fixes: vim/vim#9514 https://github.com/vim/vim/commit/add31baedaf03b92dbd41427860c61c639ef705c Co-authored-by: Johnothan King <johnothanking@protonmail.com>
* vim-patch:3b2c27415d7dChristian Clason2024-01-22
| | | | | | | | | runtime(chuck): include ChucK syntax file (vim/vim#13895) https://github.com/vim/vim/commit/3b2c27415d7d6e97be9580b66528e8c19d19aade Co-authored-by: Andrea C from The App <3269984+gacallea@users.noreply.github.com> Co-authored-by: gacallea <gacallea@users.noreply.github.com>
* vim-patch:ea9a93e5b098Christian Clason2024-01-22
| | | | | | | | | | runtime(go): update Go syntax file (vim/vim#13896) Update the Go syntax file with some recent changes made to vim-go. https://github.com/vim/vim/commit/ea9a93e5b0989b9242a1ea1f6f2dd7c9399e6f20 Co-authored-by: Billie Cleek <bhcleek@users.noreply.github.com>
* refactor: rewrite python provider in luadundargoc2024-01-22
|
* docs(options): remove misleading sentence (#27129)zeertzjq2024-01-22
| | | | Setting 'verbose' to 1 doesn't cause Nvim to produce messages. It adds more information to existing messages, which is documented above.
* feat(fold): transparent foldtextLewis Russell2024-01-22
| | | | | | | | | | | | | | | | | 'foldtext' can be set to an empty string to disable and render the line with: - extmark highlight - syntax highlighting - search highlighting - no line wrapping - spelling - conceal - inline virtual text - respects `fillchars:fold` Currently normal virtual text is not displayed Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #27076 from glepnir/extmark_hlgroupbfredl2024-01-22
|\ | | | | refactor(api): use hl id directly in nvim_buf_set_extmark
| * refactor(api): give "hl_group" more accurate _meta typebfredl2024-01-22
| | | | | | | | | | These can either be number or string in lua, so we can specify this directly as "number|string".
| * refactor(api): use hl id directly in nvim_buf_set_extmarkglepnir2024-01-20
| |
* | fix(eval): properly support checking v:lua function in exists() (#27124)Raphael2024-01-22
| |
* | Merge pull request #26813 from VanaIgr/screen-pos-speedupzeertzjq2024-01-22
|\ \ | | | | | | | | | | | | | | | | | | perf: make screen size and position calculations more efficient N/A patches for version.c: vim-patch:9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol vim-patch:9.1.0038: Unnecessary loop in getvcol()
| * | docs(news): expand the list of performance improvementsVanaIgr2024-01-22
| |/ | | | | | | | | | | | | | | When computing on-screen size or position, the size 'breakindent' and 'showbreak' is now cached, and checks for whether a faster character size function can be used are performed only once at the start. Multibyte characters are not decodes multiple times anymore, and character decoding functions are more efficient. Additionally, the amount of trailing spaces for pasted blockwise text is now calculated correctly for multibyte characters. Internal lisp formatting now doesn't erroneously use inline virtual text from a different line.
* | feat(vim.version): add `vim.version.le` and `vim.version.ge`Jongwook Choi2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | - Problem: One cannot easily write something like, for example: `version_current >= {0, 10, 0}`; writing like `not vim.version.lt(version_current, {0, 10, 0})` is verbose. - Solution: add {`le`,`ge`} in addition to {`lt`,`gt`}. - Also improve typing on the operator methods: allow `string` as well. - Update the example in `vim.version.range()` docs: `ge` in place of `gt` better matches the semantics of `range:has`.
* | vim-patch:27a4632af675Christian Clason2024-01-21
| | | | | | | | | | | | | | | | | | | | runtime(filetype): detect *.ck files as Chuck filetype (vim/vim#13888) closes vim/vim#13886 https://github.com/vim/vim/commit/27a4632af675345f9d3b4f3d66a63756835df8cc Co-authored-by: Christian Brabandt <cb@256bit.org>
* | feat(treesitter)!: new standard capture namesChristian Clason2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sharing queries with upstream and Helix is difficult due to different capture names. Solution: Define and document a new set of standard captures that matches tree-sitter "standard captures" (where defined) and is closer to Helix' Atom-style nested groups. This is a breaking change for colorschemes that defined highlights based on the old captures. On the other hand, the default colorscheme now defines links for all standard captures (not just those used in bundled queries), improving the out-of-the-box experience.
* | fix(lsp): clean up duplicate and unused meta type annotationsJongwook Choi2024-01-20
| |
* | build: create separate targets for nvim with and without runtime filesdundargoc2024-01-20
| | | | | | | | | | | | | | This distinction is important for correct dependency management, as the nvim binary is used to create some runtime files. The nvim binary (and the target to build it) is thus called `nvim_bin` and the target to build all of nvim (binary+runtime) is called `nvim`.
* | feat(api): support getting abbreviations (#26868)Raphael2024-01-20
| |
* | feat(ui): add chdir UI event (#27093)Gregory Anders2024-01-19
| | | | | | | | | | | | When an embedded Nvim instance changes its current directory a "chdir" UI event is emitted. Attached UIs can use this information however they wish. In the TUI it is used to synchronize the cwd of the TUI process with the cwd of the embedded Nvim process.
* | fix(vim.deprecate): show deprecation warning in devel versions as wellJongwook Choi2024-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: On devel(nightly) versions, deprecation warnings for hard-deprecated features are not being displayed. E.g., - to be removed in: 0.11 - hard-deprecation since 0.10 - soft-deprecation since 0.9 then 0.10-nightly (0.10.0-dev) versions as well as 0.10.0 (stable) should display the deprecation warning message. Solution: Improve the code and logic on `vim.deprecate()`, and improve test cases with mocked `vim.version()`.
* | refactor(lua): refactored globaltermo2024-01-19
| |
* | Merge pull request #27061 from luukvbaal/extmarkbfredl2024-01-19
|\ \ | |/ |/| fix(extmarks): do not remove invalid marks from decor upon deletion
| * docs(extmarks): add undocumented "details" array fieldsLuuk van Baal2024-01-18
| |
* | fix(treesitter): validate language alias for injectionsChristian Clason2024-01-18
| | | | | | | | | | | | | | | | Problem: Parsed language annotations can be random garbage so `nvim_get_runtime_file` throws an error. Solution: Validate that `alias` is a valid language name before trying to find a parser for it.
* | docs(vim.iter): correct `bool` to `boolean` (#27018)notomo2024-01-18
| |
* | docs: various #25289Justin M. Keyes2024-01-18
| | | | | | | | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com> Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* | vim-patch:46d67d22b9baChristian Clason2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords See: https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L680 `focus_follows_mouse yes|no|always` https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L770 closes: vim/vim#13797 https://github.com/vim/vim/commit/46d67d22b9baa575de3ef2fb7ff430b11dfa1e26 Co-authored-by: James Eapen <james.eapen@vai.org>
* | vim-patch:a39af0290496Christian Clason2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(i3config): remove always from `focus_follows_mouse` The always option does not exist in i3, only sway. From https://i3wm.org/docs/userguide.html: `focus_follows_mouse yes|no` Version number incremented by 2 because the last commit did not increment the version. https://github.com/vim/vim/commit/a39af02904966087b2af2372fa8233c4dfe149e3 Co-authored-by: James Eapen <james.eapen@vai.org>
* | vim-patch:6e5a6c9965f6Christian Clason2024-01-18
| | | | | | | | | | | | | | | | runtime(netrw): minor changes to fix move cmd on windows (vim/vim#13823) https://github.com/vim/vim/commit/6e5a6c9965f667712494ae0a9df8a407267cc72f Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
* | vim-patch:9.1.0039: too vague errors for 'listchars'/'fillchars' (#27070)zeertzjq2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: too vague errors for 'listchars'/'fillchars' Solution: Include the field name in error message. (zeertzjq) related: #27050 closes: vim/vim#13877 https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7 Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
* | fix(lua): return after assert returns assert message (#27064)altermo2024-01-17
| |
* | vim-patch:9b03d3e75b42 (#27059)Sean Dewar2024-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Translate the Vim9 script Godot files to legacy. `<scriptcmd>` is not ported yet, so replace it with `<Cmd>` and `<SID>`. If it's ported, `<scriptcmd>call s:` can be used instead. Includes changes from: vim-patch:0daafaa7d99e (was partial, but is now pretty much fully ported) vim-patch:9712ff1288f9 Co-authored-by: Maxim Kim <habamax@gmail.com>
* | feat: add __call typing for vim.inspect()Lewis Russell2024-01-17
|/
* docs: various fixes (#26929)dundargoc2024-01-17
| | | | Co-authored-by: Patrick Bollinger <owner@pjbollinger.com> Co-authored-by: vilo1839 <139687192+vilo1839@users.noreply.github.com>
* vim-patch:211211052d04 (#27048)Sean Dewar2024-01-16
| | | | | | | | | | | | | | | | | runtime(odin): include ftplugin, syntax and indent script (vim/vim#13867) https://github.com/vim/vim/commit/211211052d0426394cbd5f42f3f3f78a64822e2a Translate the files from Vim9 script to legacy Vim script. Notably: - Prefer case-matching comparisons where needed. - Save and restore `&cpo`. - Make the functions script-local. (Pretty easy to use these in expr options now since Vim 9.0 anyways) Add a note after the header for each file stating that they're manually translated. Co-authored-by: Maxim Kim <habamax@gmail.com>
* refactor(lsp): deprecate `vim.lsp.util.lookup_section`Jongwook Choi2024-01-16
| | | | | | | | This function is used only in the `workspace/configuration` handler, and does not warrant a public API because of its confusing return types. The only caller `vim.lsp.handlers["workspace.configuration"]` is also refactored to use `vim.tbl_get()` instead.
* vim-patch:9.1.0013: Modula2 filetype support lacking (#27020)Sean Dewar2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Modula2 filetype support lacking Solution: Improve the Modula-2 runtime support, add additional modula2 dialects, add compiler plugin, update syntax highlighting, include syntax tests, update Makefiles (Doug Kearns) closes: vim/vim#6796 closes: vim/vim#8115 https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7 - Luaify the detection script: - Split the `(*!m2foo*)` and `(*!m2foo+bar*)` detection into two Lua patterns, as Lua capture groups cannot be used with `?` and friends (as they only work on character classes). - Use `vim.api.nvim_buf_call()` (ew) to call `modula2#SetDialect()` to ensure `b:modula2` is set for the given bufnr. - Skip the syntax screendump tests. (A shame as they test some of the detection from `(*!m2foo+bar*)` tags, but I tested this locally and it seems to work) - Port the synmenu.vim changes from Vim9 script. (Also tested this locally) - (And also add the missing comma for `b:browsefilter` from earlier.) Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* docs(column): 'statuscolumn' redraw interaction with 'relativenumber'Luuk van Baal2024-01-16
|
* fix(diagnostic): typingLewis Russell2024-01-16
|
* vim-patch:ef79c5783782Christian Clason2024-01-16
| | | | | | | | | | | | runtime(fortran): update fortran syntax (vim/vim#13870) Support most remaining features of Fortran 2018/2023 Small improvements to folding etc, Code cleanup: use \? instead of mix of \= and \? https://github.com/vim/vim/commit/ef79c5783782d12bdc6c40cf24d578cc6a1f2a8c Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
* docs(builtin): remove signatures of undocumented functions (#27039)zeertzjq2024-01-16
| | | | | | Having an empty signature causes an empty line in generated docs, so remove it. Also change ">" to ">vim" in foreach() docs.
* vim-patch:partial:9.1.0027: Vim is missing a foreach() func (#27037)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | Problem: Vim is missing a foreach() func Solution: Implement foreach({expr1}, {expr2}) function, which applies {expr2} for each item in {expr1} without changing it (Ernie Rael) closes: vim/vim#12166 https://github.com/vim/vim/commit/e79e2077607e8f829ba823308c91104a795736ba Partial port as this doesn't handle non-materialized range() lists. vim-patch:c92b8bed1fa6 runtime(help): delete duplicate help tag E741 (vim/vim#13861) https://github.com/vim/vim/commit/c92b8bed1fa632569c8358feb3b72dd6a0844ef7 Co-authored-by: Ernie Rael <errael@raelity.com>
* vim-patch:9.1.0009: Cannot easily get the list of matches (#27028)zeertzjq2024-01-16
| | | | | | | | | | | | | | | | | | | | Problem: Cannot easily get the list of matches Solution: Add the matchstrlist() and matchbufline() Vim script functions (Yegappan Lakshmanan) closes: vim/vim#13766 Omit CHECK_LIST_MATERIALIZE(): it populates a List with numbers only, and there is a check for strings below. https://github.com/vim/vim/commit/f93b1c881a99fa847a1bafa71877d7e16f18e6ef vim-patch:eb3475df0d92 runtime(doc): Replace non-breaking space with normal space (vim/vim#13868) https://github.com/vim/vim/commit/eb3475df0d927a178789cf8e7fc4983932e1cdbe Co-authored-by: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
* feat(terminal): respond to OSC background and foreground request (#17197)Daniel Steinberg2024-01-15
| | | | | | | | | | | | The motivation for this update is Issue #15365, where background=light is not properly set for Nvim running from an Nvim :terminal. This can be encountered when e.g., opening a terminal to make git commits, which opens EDITOR=nvim in the nested terminal. Under the implementation of this commit, the OSC response always indicates a black or white foreground/background. While this may not reflect the actual foreground/background color, it permits 'background' to be retained for a nested Nvim instance running in the terminal emulator. The behaviour matches Vim.
* vim-patch:93197fde0f1dChristian Clason2024-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(ftplugin): Use "*" browsefilter pattern to match "All Files" Problem: The "*.*" browsefilter pattern only matches all files on Windows (Daryl Lee) Solution: Use "*" to filter on all platforms but keep "*.*" as the label text on Windows. (Fixes vim/vim#12685, Doug Kearns) The *.* browsefilter pattern used to match "All Files" on Windows is a legacy of the DOS 8.3 filename wildcard matching algorithm. For reasons of backward compatibility this still works on Windows to match all files, even those without an extension. However, this pattern only matches filenames containing a dot on other platforms. This often makes files without an extension difficult to access from the file dialog, e.g., "Makefile" On Windows it is still standard practice to use "*.*" for the filter label so ftplugins should use "All Files (*.*)" on Windows and "All Files (*)" on other platforms. This matches Vim's default browsefilter values. This commit also normalises the browsefilter conditional test to check for the Win32 and GTK GUI features and an unset b:browsefilter. closes: vim/vim#12759 https://github.com/vim/vim/commit/93197fde0f1db09b1e495cf3eb14a8f42c318b80 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* docs(vvars): fix wrong lua types in vim.v variablesJongwook Choi2024-01-15
| | | | | | | | - cmdarg: string[] -> string - shell_error: string -> int - stderr: string -> int - Add types for: cmdbang, errors, exception, false, true
* docs: add lua typing for `vim.NIL`Jongwook Choi2024-01-15
|
* docs(builtin): overload functions with union return typesaltermo2024-01-14
|
* docs: auto-generate docs for `vim.lpeg` and `vim.re`Jongwook Choi2024-01-14
| | | | | | | | | | | | | | | | | - Add section `VIM.LPEG` and `VIM.RE` to docs/lua.txt. - Add `_meta/re.lua` which adds luadoc and type annotations, for the vendored `vim.re` package. - Fix minor style issues on `_meta/lpeg.lua` luadoc for better vimdocs generation. - Fix a bug on `gen_vimdoc` where non-helptags in verbatim code blocks were parsed as helptags, affecting code examples on `vim.lpeg.Cf`, etc. - Also move the `vim.regex` section below so that it can be located closer to `vim.lpeg` and `vim.re`.