aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
* vim-patch:84a343a: runtime(doc): correct another problem in :h items()zeertzjq2025-08-21
| | | | | | | | The returned value is only in arbitrary order for a Dict. closes: vim/vim#18050 https://github.com/vim/vim/commit/84a343a6ed34995adc67c062b64533c1b0bf7fb1
* vim-patch:44c8072: runtime(doc): fix style and clarify items() function for ↵zeertzjq2025-08-21
| | | | | | | | | | String type related: vim/vim#18021 https://github.com/vim/vim/commit/44c8072ef64a7a218eb8cf4b72866921762633e4 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:partial:308a313: runtime(doc): Update help for the items() functionzeertzjq2025-08-21
| | | | | | | | closes: vim/vim#18021 https://github.com/vim/vim/commit/308a3130be89148cdaf83bfaf00e3e7c69ed2133 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(lsp): update window title when cycling through signatures #35407Tiago Inaba2025-08-20
|
* vim-patch:9.1.1647: filetype: Cangjie files are not recognizedzeertzjq2025-08-20
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Cangjie files are not recognized Solution: Detect *.cj files as cangjie filetype, include a syntax plugin (WuJunkai2004) This commit introduces a new syntax highlighting file for the Cangjie programming language, includes 4 parts as required: - The main syntax file: runtime/syntax/cangjie.vim - The filetype detection rule in: runtime/filetype.vim - The documentation update in: runtime/doc/syntax.txt - Some menus References: - https://gitcode.com/Cangjie - https://cangjie-lang.cn/ fixes: 18014 closes: vim/vim#18027 https://github.com/vim/vim/commit/0c4405a6b2bc4d93c127e1b66da1b93dcfbbe3db Co-authored-by: WuJunkai2004 <wujunkai20041123@outlook.com>
* fix(treesitter): run FileType autocmds in the context of `<abuf>`Sean Dewar2025-08-19
| | | | | | | | | Problem: many FileType autocommands assume curbuf is the same as the target buffer; this can cause &syntax to be restored for the wrong buffer in some cases when TSHighlighter:destroy is called. Solution: run nvim_exec_autocmds in the context of the target buffer via nvim_buf_call.
* feat(snippet): highlight active tabstop (#35378)TheBlob422025-08-19
|
* Merge #35018 refactor(lsp): centralized enable/is_enabled strategyJustin M. Keyes2025-08-18
|\
| * refactor(lsp): use `vim.lsp._capability.enable` internallyYi Ming2025-08-18
| |
| * refactor(lsp): correct enable marker nameYi Ming2025-08-18
| |
| * refactor(lsp): no longer rely on `LspDetach` for detaching capabilitiesYi Ming2025-08-18
| |
| * refactor(lsp): move `util.enable` to `capability.enable`Yi Ming2025-08-18
| |
| * refactor(lsp): change capability name to snake caseYi Ming2025-08-17
| |
| * refactor(lsp): register all derived `Capability` prototypesYi Ming2025-08-17
| |
| * refactor(lsp): define `Capability.on_attach`Yi Ming2025-08-17
| |
| * refactor(lsp): check supported methods instead of `tbl_get`Yi Ming2025-08-17
| |
* | docs: misc, dev-api-fast, $XDG_STATE_HOME #35138Justin M. Keyes2025-08-17
| |
* | feat(ssh): SSH configuration parser #35027Siddhant Agarwal2025-08-17
| |
* | Merge #35109 vim.pos, vim.rangeJustin M. Keyes2025-08-17
|\ \ | |/ |/|
| * feat(lua): conversion between vim and lsp position/rangeYi Ming2025-08-17
| |
| * feat(lua): `vim.pos`/`vim.range`Yi Ming2025-08-17
| |
* | feat(provider): detect venv python via "pynvim-python" tool #35273Michael Henry2025-08-16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Detection of the pynvim module is currently done by finding the first Python interpreter in the `PATH` and checking if it can import pynvim. This has several problems: - Activation of an unrelated Python virtual environment will break automatic detection, unless pynvim is also installed in that environment. - Installing pynvim to the expected location is difficult. User installation into the system-wide or user-wide Python site area is now deprecated. On Ubuntu 24.04 with Python 3.12, for example, the command `pip install --user pynvim` now fails with the error message `error: externally-managed-environment`. - Users may create a dedicated virtual environment in which to install pynvim, but Nvim won't detect it; instead, they must either activate it before launching Nvim (which interferes with the user of other virtual environments) or else hard-code the variable `g:python3_host_prog` in their `init.vim` to the path of the correct Python interpreter. Neither option is desirable. Solution: Expose pynvim's Python interpreter on the `PATH` under the name `pynvim-python`. Typical user-flow: 1. User installs either uv or pipx. 2. User installs pynvim via: ``` uv tool install --upgrade pynvim # Or: pipx install --upgrade pynvim ``` With corresponding changes in pynvim https://github.com/neovim/pynvim/issues/593 the above user-flow is all that's needed for Nvim to detect the installed location of pynvim, even if an unrelated Python virtual environments is activated. It uses standard Python tooling to automate the necessary creation of a Python virtual environment for pyenv and the publication of `pynvim-python` to a directory on `PATH`.
* fix(checkhealth): wrong ABI version for treesitter parsers #35327Jalil David Salamé Messina2025-08-14
| | | | | | | | | | | | | | | | Don't print ABI version of duplicated parsers that are later in the runtime path (see [#35326]). Change the sorting from `name > path` to `name > rtpath_index`, this ensures the first (loaded) parser is first in the list and any subsequent parsers can be considered "not loaded". This is fuzzy at best since `vim.treesitter.language.add` can take a path to a parser and change the load order. The correct solution is for `vim.treesitter.language.inspect` to return the parser path so we can compare against it and/or for it to also be able to take a path to a parser so we can inspect it without loading it first.
* vim-patch:9.1.1627: fuzzy matching can be improvedzeertzjq2025-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: fuzzy-matching can be improved Solution: Implement a better fuzzy matching algorithm (Girish Palya) Replace fuzzy matching algorithm with improved fzy-based implementation The [current](https://www.forrestthewoods.com/blog/reverse_engineering_sublime_texts_fuzzy_match/) fuzzy matching algorithm has several accuracy issues: * It struggles with CamelCase * It fails to prioritize matches at the beginning of strings, often ranking middle matches higher. After evaluating alternatives (see my comments [here](https://github.com/vim/vim/issues/17531#issuecomment-3112046897) and [here](https://github.com/vim/vim/issues/17531#issuecomment-3121593900)), I chose to adopt the [fzy](https://github.com/jhawthorn/fzy) algorithm, which: * Resolves the aforementioned issues. * Performs better. Implementation details This version is based on the original fzy [algorithm](https://github.com/jhawthorn/fzy/blob/master/src/match.c), with one key enhancement: **multibyte character support**. * The original implementation supports only ASCII. * This patch replaces ascii lookup tables with function calls, making it compatible with multibyte character sets. * Core logic (`match_row()` and `match_positions()`) remains faithful to the original, but now operates on codepoints rather than single-byte characters. Performance Tested against a dataset of **90,000 Linux kernel filenames**. Results (in milliseconds) show a **\~2x performance improvement** over the current fuzzy matching algorithm. ``` Search String Current Algo FZY Algo ------------------------------------------------- init 131.759 66.916 main 83.688 40.861 sig 98.348 39.699 index 109.222 30.738 ab 72.222 44.357 cd 83.036 54.739 a 58.94 62.242 b 43.612 43.442 c 64.39 67.442 k 40.585 36.371 z 34.708 22.781 w 38.033 30.109 cpa 82.596 38.116 arz 84.251 23.964 zzzz 35.823 22.75 dimag 110.686 29.646 xa 43.188 29.199 nha 73.953 31.001 nedax 94.775 29.568 dbue 79.846 25.902 fp 46.826 31.641 tr 90.951 55.883 kw 38.875 23.194 rp 101.575 55.775 kkkkkkkkkkkkkkkkkkkkkkkkkkkkk 48.519 30.921 ``` ```vim vim9script var haystack = readfile('/Users/gp/linux.files') var needles = ['init', 'main', 'sig', 'index', 'ab', 'cd', 'a', 'b', 'c', 'k', 'z', 'w', 'cpa', 'arz', 'zzzz', 'dimag', 'xa', 'nha', 'nedax', 'dbue', 'fp', 'tr', 'kw', 'rp', 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkk'] for needle in needles var start = reltime() var tmp = matchfuzzy(haystack, needle) echom $'{needle}' (start->reltime()->reltimefloat() * 1000) endfor ``` Additional changes * Removed the "camelcase" option from both matchfuzzy() and matchfuzzypos(), as it's now obsolete with the improved algorithm. related: neovim/neovim#34101 fixes vim/vim#17531 closes: vim/vim#17900 https://github.com/vim/vim/commit/7e0df5eee9eab872261fd5eb0068cec967a2ba77 Co-authored-by: Girish Palya <girishji@gmail.com>
* fix(snippet): adjacent tabstops without placeholders (#35167)TheBlob422025-08-13
| | | | | * fix(snippet): adjacent tabstops without placeholders * test(snippet): add tests for directly adjacent tabstops
* fix(treesitter): set local values of window optionsJaehwang Jung2025-08-12
|
* fix: don't use logical diagnostic position in `get_prev` and `get_next` #35282Sergei Slipchenko2025-08-11
| | | | | | | | | | | Problem: `vim.diagnostic.get_prev()` / `vim.diagnostic.get_next()` use logical diagnostic positions and consider extmark validity. `vim.diagnostic.get()` only uses original positions and doesn't care about extmark validity. This results in inconsistency between these APIs. Solution: use original positions in `vim.diagnostic.get_prev()` and `vim.diagnostic.get_next()` and don't consider extmark validity to match previous behavior, which is consistent with `vim.diagnostic.get`.
* Merge #35270 vim.pack: more control over "load" behaviorJustin M. Keyes2025-08-11
|\
| * feat(pack): allow skip install confirmation in `add()`Evgeni Chasnovski2025-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No way to skip install confirmation in `add()`. Having install confirmation by default is a more secure design. However, users are usually aware of the fact that plugin will be installed and there is currently no way to skip confirmation. Plus it can introduce inconvenience on the clean config initialization if it is modularized with many `vim.pack.add()` calls (leads to confirming installation many times in a row). Solution: Add `opts.confirm` option that can skip install confirmation.
| * feat(pack): allow function `opts.load` in `add()`Evgeni Chasnovski2025-08-09
| | | | | | | | | | | | | | | | | | | | | | Problem: No way to have full control over how plugin is loaded. Although `:packadd!` has small side effects (only adds plugin directory to 'runtimepath'; and maybe its 'after/' subdirectory), it still has side effects. For example, 'plugin/' directories are still loaded during startup (as part of `:h load-plugins`). Solution: Allow function `opts.load` that has full control over how plugin is loaded.
| * fix(pack): update `add()` to have default `load=false` during startupEvgeni Chasnovski2025-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: the `load=true` in `vim.pack.add()` means that `:packadd` is executed even during startup. This leads to force source of 'plugin/', which breaks the intended loading order (`:h load-plugins`) and results into sourcing them twice. This also makes it ignore `--noplugin` argument. Using `:packadd!` during startup is more appropriate, while `:packadd` afterwards is still more favorable to actually force 'plugin/' source (as there is no pre-defined mechanism that will load them later). Solution: have `load=false` default during startup, `true` - afterwards.
* | feat(lsp): support signature help noActiveParameterSupport #34838skewb1k2025-08-11
| |
* | fix(extui): ensure temporary cmdline config is not restored #35301luukvbaal2025-08-11
| | | | | | | | Problem: Temporary cmdline config is saved to be restored later. Solution: Close the cmdline window so that it is recreated with the appropriate config.
* | fix(lsp): deprecate vim.lsp.set_log_level, vim.lsp.get_log_path #35274Maria José Solano2025-08-11
| |
* | docs(lsp): specify formatting_options type (#35302)Riley Bruins2025-08-11
| |
* | fix(lsp): check for lens range in `vim.lsp.codelens.run()` (#35294)Maria José Solano2025-08-11
| |
* | vim-patch:9.1.1620: filetype: composer.lock and symfony.lock files not ↵Dietrich Moerman2025-08-10
| | | | | | | | | | | | | | | | | | | | | | recognized (#35291) Problem: filetype: composer.lock and symfony.lock files not recognized Solution: Detect composer.lock and symfony.lock files as json filetype (Dietrich Moerman) closes: vim/vim#17945 https://github.com/vim/vim/commit/4fca92faa2079d4bb1ece3bd31a4278881a7dacb
* | vim-patch:9.1.1615: diff format erroneously detected (#35276)zeertzjq2025-08-09
|/ | | | | | | | | | | | Problem: diff format erroneously detected (Tomáš Janoušek) Solution: Make the regex to detect normal diff format a bit stricter, while at it, fix wrong test content from patch v9.1.1606 fixes: vim/vim#17946 https://github.com/vim/vim/commit/887b4981e7e929ce8676b1b524e47a7fb5a8288b Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.1606: filetype: a few more files are not recognized (#35268)zeertzjq2025-08-09
| | | | | | | | | | | Problem: filetype: a few more files are not recognized Solution: guess Mail, Info and Terminfo files by its content (lacygoill) closes: vim/vim#17880 https://github.com/vim/vim/commit/eb2aebeb7982168ece3888c9c0b08fc46f9d4d15 Co-authored-by: lacygoill <lacygoill@lacygoill.me>
* fix(snippet): sync tabstop text also if pmenu is visible (#35250)Mathias Fußenegger2025-08-08
| | | | | | | | | | | | | | | | | Using a snippet like: ${1:name} :: ${2}\n${1:name} ${3}= ${4:undefined}${0} The text for `${1:name}` stopped syncing if the completion popup menu showed up. E.g. typing `par` where the `a` triggered completion resulted in: pat :: pa = undefined Instead of: pat :: pat = undefined
* vim-patch:9.1.1605: cannot specify scope for chdir() (#35239)zeertzjq2025-08-08
| | | | | | | | | | Problem: Cannot specify scope for chdir() Solution: Add optional scope argument (kuuote) closes: vim/vim#17888 https://github.com/vim/vim/commit/8a65a49d509d5a9dd5759a4287969896e8941c10 Co-authored-by: kuuote <znmxodq1@gmail.com>
* vim-patch:d82c918: runtime(doc): Improve doc for cmdline-autocomplete (#35235)zeertzjq2025-08-08
| | | | | | | | Maybe this was unnecessary, but saw this: https://github.com/vim/vim/issues/17854 https://github.com/vim/vim/commit/d82c918e2f3e6af65c36fb14457968053dcc03a3 Co-authored-by: Girish Palya <girishji@gmail.com>
* vim-patch:9.1.1602: filetype: requirements-*.txt files are not recognizedChristian Clason2025-08-08
| | | | | | | | | | | | | | | | Problem: filetype: requirements-*.txt files are not recognized Solution: Detect requirements-*.txt files as requirements filetype (Xudong Zheng). References: - https://github.com/search?q=path%3Arequirements-*.txt&type=code - https://github.com/zephyrproject-rtos/zephyr/tree/v4.2.0/scripts closes: vim/vim#17894 https://github.com/vim/vim/commit/d305729bc570fab478c3718bd4d07bd9ddd088e0 Co-authored-by: Xudong Zheng <7pkvm5aw@slicealias.com>
* fix(lsp): update capability maps (#35227)Maria José Solano2025-08-07
|
* vim-patch:9.1.1600: using diff anchors with hidden buffers fails silently ↵zeertzjq2025-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#35218) Problem: diff: using diff anchors with hidden buffers fails silently Solution: Give specific error message for diff anchors when using hidden buffers (Yee Cheng Chin). Diff anchors currently will fail to parse if a buffer used for diff'ing is hidden. Previously it would just fail as the code assumes it would not happen normally, but this is actually possible to do if `closeoff` and `hideoff` are not set in diffopt. Git's default diff tool "vimdiff3" also takes advantage of this. This fix this properly would require the `{address}` parser to be smarter about whether a particular address relies on window position or not (e.g. the `'.` address requires an active window, but `'a` or `1234` do not). Since hidden diff buffers seem relatively niche, just provide a better error message / documentation for now. This could be improved later if there's a demand for it. related: vim/vim#17615 closes: vim/vim#17904 https://github.com/vim/vim/commit/cad3b2421de7b703e0ee619850a8a3bc55454281 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.1.1598: filetype: waybar config file is not recognizedChristian Clason2025-08-07
| | | | | | | | | | | | Problem: filetype: waybar config file is not recognized Solution: Detect */waybar/config file as jsonc filetype (Furkan Sahin) closes: vim/vim#17915 https://github.com/vim/vim/commit/a6e28b1d0508e499844d289aa00773fe9cb5503b Co-authored-by: Furkan Sahin <furkan-dev@proton.me>
* feat(lsp): improve signature help display #35190skewb1k2025-08-06
| | | | | - Add delimiter between function signature and documentation, matching hover formatting - Show title only if there are multiple clients or multiple signatures - Avoid duplicating the title inside the window if it's already shown in the border
* vim-patch:f7deb81: runtime(doc): fix typo at :h cmdline-autocompletionzeertzjq2025-08-07
| | | | | | | | | | | The '?' needs to be escaped, because the autocommand is using file-patterns (glob like) and not a regex). See :h file-pattern closes: vim/vim#17890 https://github.com/vim/vim/commit/f7deb815b0b3f326a4b3b5b983da87e46df4f477 Co-authored-by: Girish Palya <girishji@gmail.com>
* fix(lsp): show title when global winborder is set (#35181)glepnir2025-08-06
| | | | | Problem: make_floating_popup_options only shows when opts.border is explicitly set, ignoring global winborder setting Solution: check both opts.border and vim.o.winborder when determining whether to show title
* vim-patch:85cd509: runtime(doc): Use correct option-name tagszeertzjq2025-08-06
| | | | | | | | | | closes: vim/vim#17857 https://github.com/vim/vim/commit/85cd509885a05c3a6bb029fb378b1295f107f8f6 Omit 'completepopup' and v:colornames. Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>