aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * | | fix(lsp): document_symbol uses loclist by default #32070Yochem van Rosmalen2025-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not able to open document symbols for different buffers Solution: Use the location list as default. To switch back to previous behavior (qflist): vim.lsp.buf.document_symbol({ loclist = false }) Fixes: #31832
| * | | fix(treesitter): clean up parsing queueJaehwang Jung2025-01-19
| |/ /
| * | fix(diagnostic)!: make virtual text handler opt-in (#32079)Gregory Anders2025-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making this opt-out (on by default) was the wrong choice from the beginning. It is too visually noisy to be enabled by default. BREAKING CHANGE: Users must opt-in to the diagnostic virtual text handler by adding vim.diagnostic.config({ virtual_text = true }) to their config.
| * | fix(lsp): use filterText as word if textEdit/label doesn't matchMathias Fussenegger2025-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: With language servers like lemminx, completing xml tags like `<mo` first shows the right candidates (`modules`) but after typing `d` the candidates disappear. This is because the server returns: [...] filterText = "<module", label = "module", textEdit = { newText = "<module>$1</module>$0", Which resulted in `module` being used as `word`, and `module` doesn't match the prefix `<mo`. Typing `d` causes the `complete()` filtering mechanism to kick in and remove the entry. Solution: Use `<module` from the `filterText` as `word` if the textEdit/label heuristic doesn't match.
| * | vim-patch:9.1.1026: filetype: swc configuration files are not recognizedChristian Clason2025-01-17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: swc configuration files are not recognized Solution: detect .swcrc files as json filetype (Marces Engel) References: https://swc.rs/docs/configuration/swcrc closes: vim/vim#16462 https://github.com/vim/vim/commit/3a738fccaaf6737c91641856ea00579dbe68bd4e Co-authored-by: Marces Engel <marces@facemurphy.com>
| * fix(messages): lsp window/showMessage is not an errorLuuk van Baal2025-01-17
| | | | | | | | Ref https://github.com/neovim/neovim/discussions/32015
| * vim-patch:9.1.1020: no way to get current selected item in a async context ↵zeertzjq2025-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | (#32056) Problem: no way to get current selected item in a async context Solution: add completed flag to show the entries of currently selected index item (glepnir) closes: vim/vim#16451 https://github.com/vim/vim/commit/037b028a2219d09bc97be04b300b2c0490c4268d Co-authored-by: glepnir <glephunter@gmail.com>
| * refactor(options): generic expand and did_set callbacks (#32011)Lewis Russell2025-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(options): generic expand and did_set callbacks Problem: Many options have similar callbacks to check the values are valid. Solution: Generalize these callbacks into a single function that reads the option table. * refactor: gen_options.lua refactor: gen_options.lua - inline get_cond * refactor(options): use a simpler format for the common default
| * vim-patch:9.1.1019: filetype: fd ignore files are not recognized (#32042)Christian Clason2025-01-16
| | | | | | | | | | | | | | | | | | | | Problem: filetype: fd ignore files are not recognized Solution: detect .fdignore files as gitignore filetype closes: vim/vim#16444 https://github.com/vim/vim/commit/3058087f6f04be788118e94e942e0f0c9fca25f0 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * fix(docs): replace `yxx` mappings with `g==` #31947Evgeni Chasnovski2025-01-15
| | | | | | | | | | | | | | | | Problem: `yx` uses "y" prefix, which shadows a builtin operator. Solution: Use `g=` (in the form of `g==` currently), drawing from precedent of CTRL-= and 'tpope/vim-scriptease'.
| * Merge #32001 from MariaSolOs/consistent-namespacesJustin M. Keyes2025-01-15
| |\
| | * refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano2025-01-14
| | |
| | * refactor: use nvim.foo.bar format for namespacesMaria José Solano2025-01-14
| | |
| * | fix(lsp): vim.lsp.enable(...,false) does not disable #32002Andrew Braxton2025-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Per the documentation, passing `false` as the `enable` parameter of `vim.lsp.enable()` should disable the given LSP(s), but it does not work due to a logic error. Specifically, `enable == false and nil or {}` will always evaluate to `{}` because `nil` is falsy. Solution: Correct the conditional statement.
| * | feat(vim.fs): find(), dir() can "follow" symlinks #31551Mike2025-01-14
| | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.fs.dir(), vim.fs.find() do not follow symlinks. Solution: - Add "follow" flag. - Enable it by default.
| * | fix(lsp): schedule call to vim.lsp.start for async root_dir (#31998)Gregory Anders2025-01-14
| | | | | | | | | | | | | | | | | | When `root_dir` is a function it can (and often will) call the provided callback function in a fast API context (e.g. in the `on_exit` handler of `vim.system`). When the callback function is executed we should ensure that it runs vim.lsp.start on the main event loop.
| * | feat(api): nvim_open_win() relative to tabline and laststatus #32006luukvbaal2025-01-14
| | | | | | | | | | | | | | | | | | | | | Problem: Anchoring a floating window to the tabline and laststatus is cumbersome; requiring autocommands and looping over all windows/tabpages. Solution: Add new "tabline" and "laststatus" options to the `relative` field of nvim_open_win() to place a window relative to.
| * | vim-patch:9.1.1010: filetype: VisualCode setting file not recognized (#32003)zeertzjq2025-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: VisualCode setting file not recognized Solution: detect json files in VSCode config directory as jsonc filetype (Konfekt) closes: vim/vim#16400 https://github.com/vim/vim/commit/c200f53cbb03fa11e489a27791d5b9dfc34a6564 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
| * | perf(treesitter): calculate folds asynchronouslyRiley Bruins2025-01-14
| |/ | | | | | | | | | | | | | | | | **Problem:** The treesitter `foldexpr` runs synchronous parses to calculate fold levels, which eliminates async parsing performance in the highlighter. **Solution:** Migrate the `foldexpr` to also calculate and apply fold levels asynchronously.
| * fix(lsp): minimum height for floating popup #31990Xuyuan Pang2025-01-13
| | | | | | | | | | | | | | | | | | Problem: The floating window for hover and signature help always cuts off a few lines, because the `_make_floating_popup_size` function counts empty lines as having zero height. Solution: Ensure the height is at least 1.
| * fix(options): better handling of empty valuesLewis Russell2025-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Whether an option is allowed to be empty isn't well defined and isn't properly checked. Solution: - For non-list string options, explicitly check the option value if it is empty. - Annotate non-list string options that can accept an empty value. - Adjust command completion to ignore the empty value. - Render values in Lua meta files
| * feat: add vim.fs.relpathdundargoc2025-01-13
| | | | | | | | | | This is needed to replace the nvim-lspconfig function is_descendant that some lspconfg configurations still use.
| * feat(treesitter)!: don't parse tree in get_parser() or start()Riley Bruins2025-01-12
| | | | | | | | | | | | | | | | | | | | **Problem:** `vim.treesitter.get_parser()` and `vim.treesitter.start()` both parse the tree before returning it. This is problematic because if this is a sync parse, it will stall the editor on large files. If it is an async parse, the functions return stale trees. **Solution:** Remove this parsing side effect and leave it to the user to parse the returned trees, either synchronously or asynchronously.
| * feat(treesitter): async parsingRiley Bruins2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | **Problem:** Parsing can be slow for large files, and it is a blocking operation which can be disruptive and annoying. **Solution:** Provide a function for asynchronous parsing, which accepts a callback to be run after parsing completes. Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: VanaIgr <vanaigranov@gmail.com>
| * perf(treesitter): cache queries stronglyRiley Bruins2025-01-12
| | | | | | | | | | | | | | | | | | | | **Problem:** Query parsing uses a weak cache which is invalidated frequently **Solution:** Make the cache strong, and invalidate it manually when necessary (that is, when `rtp` is changed or `query.set()` is called) Co-authored-by: Christian Clason <c.clason@uni-graz.at>
| * vim-patch:9.1.1007: filetype: various ignore are not recognizedChristian Clason2025-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: various ignore are not recognized Solution: detect rg/docker/npm/vvsce ignore files as 'gitgnore' filetype (Wu, Zhenyu) Not only prettier, but many programs also support ignore files (like rg, docker, npm, vscode). So use the gitignore filetype for them due to same syntax closes: vim/vim#16428 https://github.com/vim/vim/commit/8cbe2e0a0a78f57bb545a97695bfedd6a95e6992 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * feat(diagnostic)!: filter diagnostics by severity before passing to handlers ↵Gregory Anders2025-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | (#30070) BREAKING CHANGE: This changes the list of diagnostics that are passed to a diagnostic handler. If a handler is already filtering by severity itself then this won't break anything, since the handler's filtering will become a no-op. But handlers which depend on receiving the full list of diagnostics may break. Note that diagnostics are only filtered if the handler's configuration has the `severity` option set. If `severity` is not set, the handler still receives the full list of diagnostics.
| * vim-patch:668e9f2: runtime(filetype): don't detect string interpolation as ↵Christian Clason2025-01-11
| | | | | | | | | | | | | | | | | | | | angular fixes: vim/vim#16375 https://github.com/vim/vim/commit/668e9f24037fc7c362ffdf5fc1d5c5b1a8b0e855 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * docs: miscdundargoc2025-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Axel <axelhjq@gmail.com> Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com> Co-authored-by: Juan Giordana <juangiordana@gmail.com> Co-authored-by: Lincoln Wallace <locnnil0@gmail.com> Co-authored-by: Matti Hellström <hellstrom@scm.com> Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: ifish <fishioon@live.com>
| * fix(treesitter): don't return error message on success #31955Guilherme Soares2025-01-10
| | | | | | | | | | | | | | | | Problem: The `vim.treesitter.language.add` function returns a error message even when it succeeds. Solution: Don't return error message on success.
| * refactor(treesitter.foldexpr): remove unused parse_injections parameterRiley Bruins2025-01-10
| |
| * refactor(api): deprecate nvim_notify #31938Justin M. Keyes2025-01-10
| | | | | | | | | | | | | | | | | | | | Problem: The `nvim_notify` API (note: unrelated to `vim.notify()` Lua API) was not given any real motivation in https://github.com/neovim/neovim/pull/13843 There are, and were, idiomatic and ergonomic alternatives already. Solution: Deprecate `nvim_notify`.
| * docs: misc #31867Justin M. Keyes2025-01-09
| |
| * feat(docs): "yxx" runs Lua/Vimscript code examples #31904Riley Bruins2025-01-09
| | | | | | | | | | `yxx` in Normal mode over a Lua or Vimscript code block section will execute the code. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * Merge #31900 from luukvbaal/nvim_echoJustin M. Keyes2025-01-09
| |\
| | * feat(api): deprecate nvim_out/err_write(ln)Luuk van Baal2025-01-09
| | |
| | * feat(api): add err field to nvim_echo() optsLuuk van Baal2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | Problem: We want to deprecate `nvim_err_write(ln)()` but there is no obvious replacement (from Lua). Meanwhile we already have `nvim_echo()` with an `opts` argument. Solution: Add `err` argument to `nvim_echo()` that directly maps to `:echoerr`.
| * | vim-patch:9.1.0998: filetype: TI assembly files are not recognized (#31929)zeertzjq2025-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: TI assembly files are not recognized Solution: inspect '*.sa' and assembly files and detect TI assembly files, include filetype plugin and syntax script for TI assembly files (Wu, Zhenyu) closes: vim/vim#15827 https://github.com/vim/vim/commit/4f73c07abff420bad9fa5befc2c284c00b984993 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
| * | fix(api): nvim_set_decoration_provider callback return type #31912notomo2025-01-08
| | | | | | | | | | | | | | | Problem: incorrect return type doc causes luals `Annotations specify that at most 0 return value(s) are required, found 1 returned here instead.` diagnosis Solution: correct return type doc
| * | vim-patch:9.1.0995: filetype: shaderslang files are not detectedChristian Clason2025-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: shaderslang files are not detected Solution: detect '*.slang' files as shaderslang filetype, include a filetype and syntax script (mtvare6) Reference: https://shader-slang.com/ closes: vim/vim#16387 https://github.com/vim/vim/commit/616219f684744bcfad61a53c13166cda9b141dea Co-authored-by: mtvare6 <mtvare6@proton.me>
| * | feat(health): show :checkhealth in floating window #31086glepnir2025-01-07
| | | | | | | | | | | | Problem: health can not shown in a floating window Solution: add g:health variable
| * | perf(treesitter): don't fetch parser for each fold lineRiley Bruins2025-01-07
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | **Problem:** The treesitter `foldexpr` calls `get_parser()` for each line in the buffer when calculating folds. This can be incredibly slow for buffers where a parser cannot be found (because the result is not cached), and exponentially more so when the user has many `runtimepath`s. **Solution:** Only fetch the parser when it is needed; that is, only when initializing fold data for a buffer. Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * vim-patch:9.1.0991: v:stacktrace has wrong type in Vim9 scriptzeertzjq2025-01-07
| | | | | | | | | | | | | | | | | | | | Problem: v:stacktrace has wrong type in Vim9 script. Solution: Change the type to t_list_dict_any. Fix grammar in docs. (zeertzjq) closes: vim/vim#16390 https://github.com/vim/vim/commit/6655bef33047b826e0ccb8c686f3f57e47161b1c
| * vim-patch:9.1.0984: exception handling can be improvedzeertzjq2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | Problem: exception handling can be improved Solution: add v:stacktrace and getstacktrace() closes: vim/vim#16360 https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6 Co-authored-by: ichizok <gclient.gaap@gmail.com> Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
| * refactor(treesitter): simplify condition #31889Riley Bruins2025-01-06
| |
| * Merge #31625 perf(decor): improve iter_captures() cacheJustin M. Keyes2025-01-06
| |\
| | * refactor: split predicates and directivesvanaigr2025-01-06
| | |
| | * perf(decor): join predicates and matches cachevanaigr2025-01-06
| | |
| * | fix(lsp): open_floating_preview() zindex relative to current window #31886luukvbaal2025-01-06
| |/ | | | | | | | | Problem: open_floating_preview() may be hidden behind current window if that is floating and has a higher zindex. Solution: Open floating preview with zindex higher than current window.
| * fix(health): "q" should not close last window #31876Justin M. Keyes2025-01-05
| |