aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* 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
|
* feat(health): close checkhealth buffers with q #31870Maria José Solano2025-01-05
|
* feat(func): allow manual cache invalidation for _memoizeRiley Bruins2025-01-05
| | | | | This commit also adds some tests for the existing memoization functionality.
* fix(health): set nomodifiable in checkhealth buffersMaria José Solano2025-01-05
|
* fix(vim.fs.normalize): normalize case for windows drive letterdundargoc2025-01-04
| | | | | Also add tests for the current path casing behavior so it doesn't get accidentally changed.
* docs: misc #31822Justin M. Keyes2025-01-03
| | | | | * docs: drop "lua-" prefix from most treesitter tags * docs: move mouse section from tui.txt to gui.txt * docs: misc
* vim-patch:9.1.0987: filetype: cake files are not recognizedChristian Clason2025-01-03
| | | | | | | | | | | | | | | Problem: filetype: cake files are not recognized Solution: detect '*.cake' files as cs filetype (Zoe Roux) References: https://cakebuild.net/ closes: vim/vim#16367 https://github.com/vim/vim/commit/a407573f30a978b3aa61532bbd9b0ae94a87dc32 Co-authored-by: Zoe Roux <zoe.roux@zoriya.dev>
* vim-patch:9.1.0986: filetype: 'jj' filetype is a bit impreciseChristian Clason2025-01-03
| | | | | | | | | | | | Problem: filetype: 'jj' filetype is a bit imprecise Solution: rename 'jj' filetype to 'jjdescription' (Gregory Anders) closes: vim/vim#16364 https://github.com/vim/vim/commit/58c44e8833365e1a777330491c2799ae324ed893 Co-authored-by: Gregory Anders <greg@gpanders.com>
* feat(ui)!: emit prompt "messages" as cmdline events #31525luukvbaal2025-01-02
| | | | | | | Problem: Prompts are emitted as messages events, where cmdline events are more appropriate. The user input is also emitted as message events in fast context, so cannot be displayed with vim.ui_attach(). Solution: Prompt for user input through cmdline prompts.
* fix(lsp): ensure watcher cancelJaehwang Jung2025-01-02
| | | | | | | * Cancel watcher in the "force" case. * Cancel watcher outside the async callback. It seems nvim doesn't wait async jobs on quitting, leaving detached inotifywait processes. * Clean up cancelling callbacks.
* fix(vim.fs.abspath): correctly handle UNC pathsdundargoc2025-01-01
|
* docs: misc #31479Justin M. Keyes2025-01-01
|
* fix(vim.fs): joinpath() does not normalize slashes on Windows #31782Gustav Eikaas2024-12-31
|
* feat(lsp): return resolved config for vim.lsp.config[name]Mathias Fussenegger2024-12-31
| | | | | | | | | | Allows to retrieve the configuration as it will be used by `lsp.enable` - including the parts merged from `*` and rtp. This is useful for explicit startup control (`vim.lsp.start(vim.lsp.config[name])`) Closes https://github.com/neovim/neovim/issues/31640
* vim-patch:9.1.0982: TI linker files are not recognizedChristian Clason2024-12-31
| | | | | | | | | | | | | Problem: TI linker files are not recognized Solution: inspect '*.cmd' files and detect TI linker files as 'lnk' filetype, include a lnk ftplugin and syntax script (Wu, Zhenyu) closes: vim/vim#16320 https://github.com/vim/vim/commit/39a4eb0b2ca901b59800fad086550053556e59dc Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0983: not able to get the displayed items in complete_i… ↵glepnir2024-12-31
| | | | | | | | | | | | | | | (#31796) vim-patch:9.1.0983: not able to get the displayed items in complete_info() Problem: not able to get the displayed items in complete_info() (Evgeni Chasnovski) Solution: return the visible items via the "matches" key for complete_info() (glepnir) fixes: vim/vim#10007 closes: vim/vim#16307 https://github.com/vim/vim/commit/d4088edae21659e14ab5f763c820f4eab9d36981
* vim-patch:9.1.0977: filetype: msbuild filetypes are not recognizedChristian Clason2024-12-30
| | | | | | | | | | | | Problem: filetype: msbuild filetypes are not recognized Solution: detect msbuild files as xml filetype (Gustav Eikaas) closes: vim/vim#16339 https://github.com/vim/vim/commit/32b7e3a8c99d369b02154df74cbe42a37c7c7e68 Co-authored-by: GustavEikaas <gustav.eikaas@gmail.com>
* fix(treesitter.foldexpr): only refresh valid buffersIgor2024-12-29
| | | | | | | | | Problem: autocmd to refresh folds always uses the current buffer if the option type is local. However, the current buffer may not have a parser, and thus the assert that checks for a parser could fail. Solution: check if the foldinfo contains the buffer, and only refresh if so.
* fix(lsp): check if sig_help window is focusable when configuring cycle keymapMaria José Solano2024-12-29
|
* vim-patch:9.1.0972: filetype: TI linker map files are not recognizedChristian Clason2024-12-29
| | | | | | | | | | | | | | | Problem: filetype: TI linker map files are not recognized Solution: detect TI linker map files as lnkmap filetype (Wu, Zhenyu) References: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html closes: vim/vim#16324 https://github.com/vim/vim/commit/5113831d16c05f3a8b47da0c6f95a641d5fc7b2e Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0971: filetype: SLNX files are not recognizedChristian Clason2024-12-29
| | | | | | | | | | | | | | | | Problem: filetype: SLNX files are not recognized Solution: detect '*.slnx' files as xml filetype (Gustav Eikaas) References: https://blog.ndepend.com/slnx-the-new-net-solution-xml-file-format/ https://blog.jetbrains.com/dotnet/2024/10/04/support-for-slnx-solution-files/ closes: vim/vim#16334 https://github.com/vim/vim/commit/3b3318b64043dcf29d6f06322739f695a5cc257e Co-authored-by: GustavEikaas <gustav.eikaas@gmail.com>
* fix(treesitter.foldexpr): refresh in the buffers affected by OptionSetJaehwang Jung2024-12-29
|
* vim-patch:9.1.0965: filetype: sh filetype set when detecting the use of bash ↵Luca Saccarola2024-12-28
| | | | | | | | | | | (#31749) Problem: filetype: sh filetype set when detecting the use of bash Solution: when bash is detected, use 'bash' filetype instead (Luca Saccarola) closes: vim/vim#16309 https://github.com/vim/vim/commit/b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721
* feat(lua): add `vim.fs.abspath`Famiu Haque2024-12-28
| | | | | | Problem: There is currently no way to check if a given path is absolute or convert a relative path to an absolute path through the Lua stdlib. `vim.fs.joinpath` does not work when the path is absolute. There is also currently no way to resolve `C:foo\bar` style paths in Windows. Solution: Add `vim.fs.abspath`, which allows converting any path to an absolute path. This also allows checking if current path is absolute by doing `vim.fs.abspath(path) == path`. It also has support for `C:foo\bar` style paths in Windows.
* feat(lsp): support function for client root_dir (#31630)Gregory Anders2024-12-27
| | | | | | | | If root_dir is a function it is evaluated when the client is created to determine the root directory. This enables dynamically determining the root directory based on e.g. project or directory structure (example: finding a parent Cargo.toml file that contains "[workspace]" in a Rust project).
* vim-patch:9.1.0962: filetype: bun.lock file is not recognizedChristian Clason2024-12-27
| | | | | | | | | | | | Problem: filetype: bun.lock file is not recognized Solution: detect 'bun.lock' file as jsonc filetype (Anton Kastritskii) closes: vim/vim#16308 https://github.com/vim/vim/commit/f07ae5b3bdb7331ee0e65adcb74402eef74f0a2b Co-authored-by: Anton Kastritskii <halloy52@gmail.com>
* vim-patch:9.1.0961: filetype: TI gel files are not recognizedChristian Clason2024-12-25
| | | | | | | | | | | | | | | | Problem: filetype: TI gel files are not recognized Solution: detect '*.gel' files as gel filetype, include get filetype and syntax plugins (Wu, Zhenyu) References: https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html closes: vim/vim#16226 https://github.com/vim/vim/commit/9360de9027aa286e802363ede59c9e97025ae123 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* vim-patch:9.1.0960: filetype: hy history files are not recognizedChristian Clason2024-12-25
| | | | | | | | | | | | | Problem: filetype: hy history files are not recognized Solution: detect '*.hy', '.hy-history' files as hy filetype, detect '.lips_repl_history' files are scheme filetype (Wu, Zhenyu) closes: vim/vim#16298 https://github.com/vim/vim/commit/a32daed55933df49a7aed571cc6e400ae01c7976 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
* docs(api): return type of nvim_get_keymap() #31708Shihua Zeng2024-12-24
|
* vim-patch:9.1.0958: filetype: supertux2 config files detected as lispChristian Clason2024-12-24
| | | | | | | | | | | | | | | | | | Problem: filetype: supertux2 config files detected as lisp Solution: detect supertux2 config files as scheme instead (Wu, Zhenyu) References: https://github.com/SuperTux/supertux/wiki/S-Expression supertux uses #t and #f as bool type, which is same as scheme, not common lisp closes: vim/vim#16287 https://github.com/vim/vim/commit/e62d93ead10b4c5818e3c0b7551f1784d24bfe33 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>