aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * fix(treesitter.foldexpr): robustness against ctrl-cJaehwang Jung2024-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Exiting the insert mode with ctrl-c does not trigger InsertLeave autocmd. This may lead to nil error in treesitter foldexpr. Solution: Check nil. Folds still can be stale after exiting the insert mode with ctrl-c, but it will be eventually updated correctly. An alternative solution would be to ensure that exiting the insert mode always triggers do_foldupdate. This can be done either by "fixing" ctrl-c or with on_key callback that checks ctrl-c (nvim-cmp does this).
| * vim-patch:9.1.0544: filetype: ldapconf files are not recognizedChristian Clason2024-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: ldapconf files are not recognized Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf filetype, include a simple ldapconf ftplugin file (Riley Bruins) [Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release) closes: vim/vim#15176 https://github.com/vim/vim/commit/62f31e949918167cb7f50cdf1737f7c28460b62b Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * vim-patch:9.1.0540: Unused assignment in sign_define_cmd()zeertzjq2024-07-08
| | | | | | | | | | | | | | | | | | | | Problem: Unused assignment in sign_define_cmd() Solution: Remove the assignment. Also document the "priority" flag of sign_define(). (zeertzjq) closes: vim/vim#15169 https://github.com/vim/vim/commit/fc3f5dba52099d82ccc8bfe309d58a6fac01373d
| * fix(health): fix fetching url with python in provider health (#29594)Stanislav Asunkin2024-07-07
| |
| * vim-patch:9.1.0538: not possible to assign priority when defining a sign ↵zeertzjq2024-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#29592) Problem: not possible to assign priority when defining a sign (Mathias Fußenegger) Solution: Add the priority argument for the :sign-define ex command and the sign_define() function (LemonBoy) Use the specified value instead of the default one (SIGN_DEF_PRIO) when no priority is explicitly specified in sign_place or :sign place. fixes: vim/vim#8334 closes: vim/vim#15124 https://github.com/vim/vim/commit/b975ddfdf96644b8df808415dee36f99abd48753 Co-authored-by: LemonBoy <thatlemon@gmail.com>
| * vim-patch:9.1.0536: filetype: zone files are not recognizedChristian Clason2024-07-07
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: zone files are not recognized (rpdprd) Solution: Detect '*.zone' files as bindzone filetype fixes: vim/vim#14222 https://github.com/vim/vim/commit/f095539b3900d76f5eeaaa0897c6abf970829b31 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0537: signed number detection for CTRL-X/A can be improved ↵zeertzjq2024-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#29590) Problem: signed number detection for CTRL-X/A can be improved (Chris Patuzzo) Solution: Add the new "blank" value for the 'nrformat' setting. This will make Vim assume a signed number only if there is a blank in front of the sign. (distobs) fixes: vim/vim#15033 closes: vim/vim#15110 https://github.com/vim/vim/commit/25ac6d67d92e0adda53b8d44b81c15031643ca1e Co-authored-by: distobs <cuppotatocake@gmail.com>
| * feat(lsp): drop fswatch, use inotifywait (#29374)Andreas Schneider2024-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces fswatch with inotifywait from inotify-toools: https://github.com/inotify-tools/inotify-tools fswatch takes ~1min to set up recursively for the Samba source code directory. inotifywait needs less than a second to do the same thing. https://github.com/emcrisostomo/fswatch/issues/321 Also it fswatch seems to be unmaintained in the meantime. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
| * fix(glob): avoid `subcapture nesting too deep` error (#29520)Zoltán Nyikos2024-07-06
| | | | | | | | Use Cmt to evaluate Cond and Elem during match to avoid building the nested capture structure later.
| * vim-patch:9.1.0532: filetype: Cedar files not recognizedChristian Clason2024-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Cedar files not recognized Solution: Detect '*.cedar' files as cedar filetype (Riley Bruins) References: https://github.com/cedar-policy closes: vim/vim#15148 https://github.com/vim/vim/commit/15addb24dd3b2645f5c04d2742ab5eb53444a3a0 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
| * fix(treesitter): display fields for anonymous nodes in :InspectTreeRiley Bruins2024-07-05
| |
| * fix(diagnostic): make docs agree with code (#29561)Peter Aronoff2024-07-04
| | | | | | | | | | | | | | | | | | | | | | Problem: the code and docs for vim.diagnostic.JumpOpts.float send mixed signals about what the default should be. When the option is first set, in the global_diagnostic_options table, the comment clearly says that the default is false. Later in the code, in goto_diagnostic, there's a line that sets the default to true if no default is present. Finally, the docs say that the default is true. Solution: Change the docs to reflect the new default of false and fix the goto_diagnostic function.
| * fix(lua): use rawget() to get __call in vim.is_callable() (#29536)Tyler Miller2024-07-04
| | | | | | | | | | Lua 5.1 uses a "raw get" to retrieve `__call` from a metatable to determine if a table is callable. Mirror this behavior in `vim.is_callable()`.
| * fix(treesitter): ensure syntaxset augroup exists (#29542)zeertzjq2024-07-03
| | | | | | | | | | | | | | | | Problem: Error when calling vim.treesitter.start() and vim.treesitter.stop() in init.lua. Solution: Ensure syntaxset augroup exists after loading synload.vim.
| * fix(lsp): fallback to `label` for completion items if all others are missing ↵Sebastian Lyng Johansen2024-07-02
| | | | | | | | (#29522)
| * feat(jumplist): allow opting out of removing unloaded buffers (#29347)zeertzjq2024-06-30
| | | | | | | | Problem: Cannot opt out of removing unloaded buffers from the jumplist. Solution: Only enable that with "unload" flag in 'jumpoptions'.
| * refactor: use `vim._with` where possibledundargoc2024-06-28
| | | | | | | | | | This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`.
| * Merge pull request #29483 from bfredl/nonbinarybfredl2024-06-27
| |\ | | | | | | refactor(typval)!: remove binary distinction of binary and nonbinary strings
| | * refactor(typval)!: remove distinction of binary and nonbinary stringsbfredl2024-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a breaking change which will make refactor of typval and shada code a lot easier. In particular, code that would use or check for v:msgpack_types.binary in the wild would be broken. This appears to be rarely used in existing plugins. Also some cases where v:msgpack_type.string would be used to represent a binary string of "string" type, we use a BLOB instead, which is vimscripts native type for binary blobs, and already was used for BIN formats when necessary. msgpackdump(msgpackparse(data)) no longer preserves the distinction of BIN and STR strings. This is very common behavior for language-specific msgpack bindings. Nvim uses msgpack as a tool to serialize its data. Nvim is not a tool to bit-perfectly manipulate arbitrary msgpack data out in the wild. The changed tests should indicate how behavior changes in various edge cases.
| * | fix(lsp): pre-filter matches on label if filterText is missing (#29491)Mathias Fußenegger2024-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the built-in pum completion mechanism will filter anyway on the next input it is odd if the initial popup shows entries which don't match the current prefix. Using fuzzy match on the label/prefix is compatible with `completeopt+=fuzzy` and also doesn't seem to break postfix snippet cases Closes https://github.com/neovim/neovim/issues/29287
| * | fix(lsp): avoid vim.keymap.del error when stopping a client (#29478)Matt Fellenz2024-06-26
| | |
| * | feat(lua): add `context.env` (environment variables) to `vim._with()`Evgeni Chasnovski2024-06-24
| | |
| * | feat(lua): update `vim._with` to allow more granular option contextsEvgeni Chasnovski2024-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: with a single `context.options` there is no way for user to force which scope (local, global, both) is being temporarily set and later restored. Solution: replace single `options` context with `bo`, `go`, `wo`, and `o`. Naming and implementation follows how options can be set directly with `vim.*` (like `vim.bo`, etc.). Options are set for possible target `win` or `buf` context.
| * | test(lua): cover `vim._with()` with testsEvgeni Chasnovski2024-06-24
| |/ | | | | | | | | | | | | | | | | | | | | | | Problem: `vim._with()` has many different use cases which are not covered with tests. Solution: cover with tests. Some (many) test cases are intentionally marked as "pending" because they cover cases which don't work as expected at the moment (and fixing them requires specific knowledge of C codebase). Use them as a reference for future fixes. Also some of "can be nested" tests currently might pass only because the tested context doesn't work.
| * feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323Tom Praschan2024-06-24
| | | | | | | | | | | | | | | | | | | | While this relies on a proposed LSP 3.18 feature, it's fully backwards compatible, so IMO there's no harm in adding this already. Looks like some servers already support for this e.g. - gopls: https://go-review.googlesource.com/c/tools/+/510235 - clangd: https://github.com/llvm/llvm-project/pull/80180 Fixes #27293
| * refactor(filetype): change some patterns to extensions (#29472)zeertzjq2024-06-24
| | | | | | Ref #29468
| * perf(treesitter): remove unnecessary foldexpr loopRiley Bruins2024-06-24
| | | | | | | | | | | | Instead of looping over all captured nodes, just take the end range from the last node in the list. This uses the fact that nodes returned by iter_matches are ordered by their range (earlier to later).
| * fix(treesitter): do not modify highlight state for _on_spell_navLuuk van Baal2024-06-24
| | | | | | | | | | | | | | | | Problem: Treesitter highlighter clears the already populated highlight state when performing spell checking while drawing a smoothscrolled topline. Solution: Save and restore the highlight state in the highlighter's _on_spell_nav callback.
| * vim-patch:9.1.0506: filetype: .envrc & .prettierignore not recognizedChristian Clason2024-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: .envrc & .prettierignore not recognized Solution: Detect '.envrc' as shell and '.prettierignore' as gitignore filetype (Tyler Miller) Support ft detection for `.envrc` files used by direnv, and `.prettierignore` files used by prettier. closes: vim/vim#15053 resolves: neovim/neovim#29405 https://github.com/vim/vim/commit/49012cd8c2fb0452847e5d213b07aa8a978f4762 Co-authored-by: Tyler Miller <tmillr@proton.me>
| * fix(treesitter): don't open fold when o/O adds a line below #28709Jaehwang Jung2024-06-20
| | | | | | | | | | | | | | | | | | | | | | Problem: `o`-ing on a folded line opens the fold, because the new line gets the fold level from the above line (level '='), which extends the fold to the new line. `O` has a similar problem when run on the line below a fold. Solution: Use -1 for the added line to get the lower level from the above/below line.
| * vim-patch:9.1.0505: filetype: Faust files are not recognized (#29426)zeertzjq2024-06-20
| | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Faust files are not recognized Solution: Detect '*.lib' files as Faust filetype, add detection for '*.dsp' files (Faust or Make), remove '*.lib' from Cobol filetype (PowerUser64) closes: vim/vim#14894 https://github.com/vim/vim/commit/aa61b8a9087e9cd999ef07e0d87b60f43d68f2c6 Co-authored-by: PowerUser64 <blake@blakenorth.net>
| * fix(diagnostics): don't apply extmarks to invalid lines #29321Riley Bruins2024-06-19
| | | | | | | | | | | | | | | | | | | | | | Problem: If there are errors in the last line of a buffer, something like `Gdk` or `G2k3J` will produce an error (at least with `lua_ls`): Error executing vim.schedule lua callback: .../neovim/share/nvim/runtime/lua/vim/diagnostic.lua:1446: Invalid 'line': out of range Solution: Only set extmarks if the target buffer line still exists
| * vim-patch:9718ed7: runtime(filetype): update htmldjango detectionChristian Clason2024-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update tags to detect djangohtml based on https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference - increase the lines to inspect to 40 lines 10 lines is too few and might result in high false negative. Increasing it to 40 lines should reduce the false negative. closes: vim/vim#15037 https://github.com/vim/vim/commit/9718ed7ab989c0a0be88a0d749f24321eb0e6af1 Co-authored-by: Afiq Nazrie <afnazrie@gmail.com>
| * docs(news): fix inconsistencies (#29381)zeertzjq2024-06-18
| |
| * Merge pull request #29357 from luukvbaal/statuscolzeertzjq2024-06-17
| |\ | | | | | | feat(column)!: rework 'statuscolumn' %r/l items
| | * feat(column)!: rework 'statuscolumn' %r/l itemsLuuk van Baal2024-06-16
| | | | | | | | | | | | | | | | | | | | | Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item.
| * | vim-patch:9.1.0492: filetype: Vim-script files not detected by shebang lineChristian Clason2024-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim-script files may not be recognised Solution: Add shebang line detection (Doug Kearns) closes: vim/vim#15012 https://github.com/vim/vim/commit/0d4d23dac0a5a77ccb0ebf1dcf646afe0c6886bf Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * | docs: document 'list' behavior when 'listchars' excludes "tab" (#29360)zeertzjq2024-06-16
| |/
| * vim-patch:9.1.0486: filetype: Snakemake files are not recognizedChristian Clason2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Snakemake files are not recognized Solution: Detect '*.smk' and Snakefile files as snakemake filetype (Riley Bruins) See: https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility closes: vim/vim#14992 https://github.com/vim/vim/commit/82a579e15ad78f4b99d2957300da3076ccc7d378 Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * fix(defaults): default @/Q broken when 'ignorecase' is set (#29343)Jerry2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When 'ignorecase' is set, the default keymap Q and Q would exit visual mode. This issue was raised in #28287 and a fix was applied in #28289. However, `==` operator is subject to user `ignorecase` setting. Solution: Switching to `==#` operator would guarantee case sensitive comparison between visual mode and linewise visual mode. Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
| * docs: misc (#29229)dundargoc2024-06-15
| | | | | | | | | | | | Co-authored-by: Ilia Choly <ilia.choly@gmail.com> Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:c509c00: runtime(doc): fix wrong helptag for :deferzeertzjq2024-06-15
| | | | | | | | | | | | https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} ↵zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | meaning related: vim/vim#14991 https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de Co-authored-by: Christian Brabandt <cb@256bit.org>
| * fix(lsp): tune completion word extraction for decorated labels (#29331)Mathias Fußenegger2024-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For snippets lsp.completion prefers the label if it is shorter than the insertText or textEdit to support postfix completion cases but clangd adds decoration characters to labels. E.g.: `•INT16_C(c)` Solution: Use parse_snippet on insertText/textEdit before checking if it is shorter than the label. Fixes https://github.com/neovim/neovim/issues/29301
| * refactor(lsp): use metatable for buf_versions (#29304)Ilia Choly2024-06-14
| | | | | | | | | | | | This reduces the number of nil checks around buf_versions usage Test changes were lifted from 5c33815 Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
| * fix(lsp): check for nil response from server (#29196)Tama McGlinn2024-06-14
| | | | | | | | | | | | | | | | this only changes the error message, so that it is clear that the error is with the LSP server, rather than being a crash inside nvim runtime scripts. We are already doing a lot of validation, it's just that nil was being overlooked here. This fixes issue #27395
| * fix(terminal): set local values of window options (#29326)zeertzjq2024-06-14
| |
| * vim-patch:d353d27: runtime(doc): restore description of "$" in col() and ↵zeertzjq2024-06-14
| | | | | | | | | | | | | | | | virtcol() (vim/vim#14981) These are different from line() and getpos(). https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074
| * vim-patch:02f3eba: runtime(doc): deduplicate getpos(), line(), col(), virtcol()zeertzjq2024-06-14
| | | | | | | | | | | | | | | | | | Move the main description to getpos() and link to that from the other functions. closes: vim/vim#14970 https://github.com/vim/vim/commit/02f3ebacfbfa1f892347d7532278f24620e68300
| * Merge pull request #29103 from gpanders/test-no-tgcGregory Anders2024-06-12
| |\ | | | | | | test: do not set termguicolors in test runner