aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahmJosh Rahm2025-02-05
|\
| * feat(diagnostic): add `current_line` option for `virtual_text` handlerMaria José Solano2025-02-05
| |
| * feat(treesitter): show which nodes are missing in InspectTreeRiley Bruins2025-02-05
| | | | | | | | | | | | | | | | Now `:InspectTree` will show missing nodes as e.g. `(MISSING identifier)` or `(MISSING ";")` rather than just `(identifier)` or `";"`. This is doable because the `MISSING` keyword is now valid query syntax. Co-authored-by: Christian Clason <c.clason@uni-graz.at>
| * build(deps): bump luv to v1.50.0-1Christian Clason2025-02-05
| |
| * vim-patch:9.1.1076: vim_strnchr() is strange and unnecessary (#32327)zeertzjq2025-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim_strnchr() is strange and unnecessary (after v9.1.1009) Solution: Remove vim_strnchr() and use memchr() instead. Also remove a comment referencing an #if that is no longer present. vim_strnchr() is strange in several ways: - It's named like vim_strchr(), but unlike vim_strchr() it doesn't support finding a multibyte char. - Its logic is similar to vim_strbyte(), but unlike vim_strbyte() it uses char instead of char_u. - It takes a pointer as its size argument, which isn't convenient for all its callers. - It allows embedded NULs, unlike other "strn*" functions which stop when encountering a NUL byte. In comparison, memchr() also allows embedded NULs, and it converts bytes in the string to (unsigned char). closes: vim/vim#16579 https://github.com/vim/vim/commit/34e1e8de91ff4a8922d454e3147ea425784aa0a0
| * build(deps): bump tree-sitter-query to v0.5.0 (#32299)Riley Bruins2025-02-04
| | | | | | and sync queries from nvim-treesitter (adds support for `MISSING` nodes).
| * vim-patch:9.1.1009: diff feature can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | Problem: diff feature can be improved Solution: include the linematch diff alignment algorithm (Jonathon) closes: vim/vim#9661 https://github.com/vim/vim/commit/7c7a4e6d1ad50d5b25b42aa2d5a33a8d04a4cc8a Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
| * vim-patch:9.1.0967: SpotBugs compiler setup can be further improvedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | Problem: SpotBugs compiler can be further improved Solution: Introduce event-driven primitives for SpotBugs (Aliaksei Budavei) closes: vim/vim#16258 https://github.com/vim/vim/commit/2e252474c4df5018b9819d86ebb70bf3b1b1a1af Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
| * vim-patch:9.1.0935: SpotBugs compiler can be improvedzeertzjq2025-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: SpotBugs compiler can be improved Solution: runtime(compiler): Improve defaults and error handling for SpotBugs; update test_compiler.vim (Aliaksei Budavei) runtime(compiler): Improve defaults and error handling for SpotBugs * Keep "spotbugs#DefaultPreCompilerTestAction()" defined but do not assign its Funcref to the "PreCompilerTestAction" key of "g:spotbugs_properties": there are no default and there can only be introduced arbitrary "*sourceDirPath" entries; therefore, this assignment is confusing at best, given that the function's implementation delegates to whatever "PreCompilerAction" is. * Allow for the possibility of relative source pathnames passed as arguments to Vim for the Javac default actions, and the necessity to have them properly reconciled when the current working directory is changed. * Do not expect users to remember or know that new source files ‘must be’ ":argadd"'d to be then known to the Javac default actions; so collect the names of Java-file buffers and Java-file Vim arguments; and let users providing the "@sources" file-lists in the "g:javac_makeprg_params" variable update these file-lists themselves. * Strive to not leave behind a fire-once Syntax ":autocmd" for a Java buffer whenever an arbitrary pre-compile action errors out. * Only attempt to run a post-compiler action in the absence of failures for a pre-compiler action. Note that warnings and failures are treated alike (?!) by the Javac compiler, so when previews are tried out with "--enable-preview", remember about passing "-Xlint:-preview" too to also let SpotBugs have a go. * Properly group conditional operators when testing for key entries in a user-defined variable. * Also test whether "javaExternal" is defined when choosing an implementation for source-file parsing. * Two commands are provided to toggle actions for buffer-local autocommands: - SpotBugsRemoveBufferAutocmd; - SpotBugsDefineBufferAutocmd. For example, try this from "~/.vim/after/ftplugin/java.vim": ------------------------------------------------------------ if exists(':SpotBugsDefineBufferAutocmd') == 2 SpotBugsDefineBufferAutocmd BufWritePost SigUSR1 endif ------------------------------------------------------------ And ":doautocmd java_spotbugs User" can be manually used at will. closes: vim/vim#16140 https://github.com/vim/vim/commit/368ef5a48c7a41af7fe2c32a5d5659e23aff63d0 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
| * Merge #32082 refactor(treesitter): use coroutines for resuming _parse()Justin M. Keyes2025-02-03
| |\
| | * feat(treesitter): allow LanguageTree:is_valid() to accept a rangeRiley Bruins2025-02-02
| | | | | | | | | | | | | | | | | | When given, only that range will be checked for validity rather than the entire tree. This is used in the highlighter to save CPU cycles since we only need to parse a certain region at a time anyway.
| | * refactor(treesitter): use coroutines for resuming _parse() logicRiley Bruins2025-02-02
| | | | | | | | | | | | | | | | | | This means that all work previously done by a `_parse()` iteration will be kept in future iterations. This prevents it from running indefinitely in some cases where the file is very large and there are 2+ injections.
| * | feat(diagnostic): format() can filter diagnostics by returning nil #32302Maria José Solano2025-02-03
| | |
| * | vim-patch:9.1.1070: Cannot control cursor positioning of getchar() (#32303)zeertzjq2025-02-03
| |/ | | | | | | | | | | | | | | | | | | Problem: Cannot control cursor positioning of getchar(). Solution: Add "cursor" flag to {opts}, with possible values "hide", "keep" and "msg". related: vim/vim#10603 closes: vim/vim#16569 https://github.com/vim/vim/commit/edf0f7db28f87611368e158210e58ed30f673098
| * refactor(treesitter): always return valid range from parse() #32273Riley Bruins2025-02-02
| | | | | | | | | | | | | | | | | | | | | | Problem: When running an initial parse, parse() returns an empty table rather than an actual range. In `languagetree.lua`, we manually check if a parse was incremental to determine the changed parse region. Solution: - Always return a range (in the C side) from parse(). - Simplify the language tree code a bit. - Logger no longer shows empty ranges on the initial parse.
| * refactor(treesitter): drop `LanguageTree._has_regions` #32274Riley Bruins2025-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies some logic in `languagetree.lua`, removing the need for `_has_regions`, and removing side effects in `:included_regions()`. Before: - Edit is made which sets `_regions = nil` - Upon the next call to `included_regions()` (usually right after we marked `_regions` as `nil` due to an `_iter_regions()` call), if `_regions` is nil, we repopulate the table (as long as the tree actually has regions) After: - Edit is made which resets `_regions` if it exists - `included_regions()` no longer needs to perform this logic itself, and also no longer needs to read a `_has_regions` variable
| * perf(diagnostics): cache line diagnostics when `current_line` is set #32288Maria José Solano2025-02-02
| | | | | | | | | | Compute the diagnostics per line when `show` is called, allowing for O(1) access for the diagnostics to display when the cursor line or the list of diagnostics haven't changed.
| * fix(man.lua): skip `Attrs.None` highlights #32262Johannes Larsen2025-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the 7121983c45d92349a6532f32dcde9f425e30781e refactoring this loop added highlights from a `buf_hls` list that had filtered out elements with `Attrs.None`. After the refactoring this added highlights from `hls` directly, and those elements would fail with e.g.: $ nvim 'man://math.h(0)' Error detected while processing command line: Error executing Lua callback: /usr/share/nvim/runtime/lua/man.lua:205: Invalid 'hl_group': Expected Lua string stack traceback: [C]: in function 'nvim_buf_add_highlight' /usr/share/nvim/runtime/lua/man.lua:205: in function 'highlight_man_page' /usr/share/nvim/runtime/lua/man.lua:632: in function 'init_pager' /usr/share/nvim/runtime/plugin/man.lua:9: in function </usr/share/nvim/runtime/plugin/man.lua:6>
| * fix(diagnostic): improve current_line refresh logic #32275Tristan Knight2025-02-02
| | | | | | | | | | | | | | | | | | | | | | Problem: The current implementation uses a global augroup for virtual lines in diagnostics, which can lead to conflicts and unintended behavior when multiple namespaces/buffers are involved. Solution: Refactor the code to use a namespace-specific augroup for virtual lines. This ensures that each namespace has its own augroup. Scope the clear commands to only the relevant buffer.
| * vim-patch:9.1.1068: getchar() can't distinguish between C-I and Tab (#32295)zeertzjq2025-02-02
| | | | | | | | | | | | | | | | | | | | | | | | Problem: getchar() can't distinguish between C-I and Tab. Solution: Add {opts} to pass extra flags to getchar() and getcharstr(), with "number" and "simplify" keys. related: vim/vim#10603 closes: vim/vim#16554 https://github.com/vim/vim/commit/e0a2ab397fd13a71efec85b017d5d4d62baf7f63 Cherry-pick tv_dict_has_key() from patch 8.2.4683.
| * vim-patch:a5d19aa: runtime(hyprlang): fix string recognition (#32290)zeertzjq2025-02-02
| | | | | | | | | | | | | | | | fixes: vim/vim#16064 closes: vim/vim#16527 https://github.com/vim/vim/commit/a5d19aa44d97151d572362a24efccbfa09d560ae Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
| * vim-patch:9.1.1065: no digraph for "Approaches the limit" (#32289)zeertzjq2025-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no digraph for "Approaches the limit" Solution: Add the digraph using .= (Hans Ginzel) Add digraph Approaches the Limit ≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm closes: vim/vim#16508 https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6 Co-authored-by: Hans Ginzel <hans@matfyz.cz>
| * fix(treesitter): nil access when running string parser asyncRiley Bruins2025-02-01
| |
| * docs: miscdundargoc2025-01-30
| | | | | | | | | | | | | | | | | | Co-authored-by: Dustin S. <dstackmasta27@gmail.com> Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when ↵zeertzjq2025-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completing (#32251) Problem: Vim doesn't highlight to be inserted text when completing Solution: Add support for the "preinsert" 'completeopt' value (glepnir) Support automatically inserting the currently selected candidate word that does not belong to the latter part of the leader. fixes: vim/vim#3433 closes: vim/vim#16403 https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886 Co-authored-by: glepnir <glephunter@gmail.com>
| * fix(treesitter): stop async parsing if buffer is invalidnotomo2025-01-29
| | | | | | | | | | Problem: Error occurs if delete buffer in the middle of parsing. Solution: Check if buffer is valid in parsing.
| * fix(treesitter) Set modeline=false in TSHighlighter:destroy (#32234)Daniel Petrovic2025-01-29
| | | | | | | | | | | | | | | | | | | | Problem: `TSHighlighter:destroy()` causes double-processing of the modeline and failure of `b:undo_ftplugin`. Solution: Disable modeline in `TSHighlighter:destroy()` by setting `modeline=false` if executing `syntaxset` autocommands for the `FileType` event. Co-authored-by: Daniel Petrovic <daniel.petrovic@ebcont.com>
| * feat(treesitter): support modelines in `query.set()` (#30257)Maria José Solano2025-01-29
| |
| * fix(treesitter): recalculate folds on VimEnter #32240Riley Bruins2025-01-28
| | | | | | | | | | | | | | | | | | | | **Problem:** In the case where the user sets the treesitter foldexpr upon startup in their `init.lua`, the fold info will be calculated before the parser has been loaded in, meaning folds will be properly calculated until edits or `:e`. **Solution:** Refresh fold information upon `VimEnter` as a sanity check to ensure that a parser really doesn't exist before always returning `'0'` in the foldexpr.
| * fix(treesitter): empty queries can disable injections (#31748)Riley Bruins2025-01-28
| | | | | | | | | | | | | | | | | | | | | | | | **Problem:** Currently, if users want to efficiently disable injections, they have to delete the injection query files at their runtime path. This is because we only check for existence of the files before running the query over the entire buffer. **Solution:** Check for existence of query files, *and* that those files actually have captures. This will allow users to just comment out existing queries (or better yet, just add their own injection query to `~/.config/nvim` which contains only comments) to disable running the query over the entire buffer (a potentially slow operation)
| * fix(treesitter): avoid computing foldlevels for reloaded buffer #32233luukvbaal2025-01-28
| |
| * fix(runtime): "E121 Undefined variable s:termguicolors" #32209Judit Novak2025-01-28
| | | | | | | | | | | | | | Problem: dircolors syntaxt termguicolors support was not taking dynamic termguicolors changes into account. Solution: initializing missing script-internal data on dynamic termguicolors change.
| * docs(treesitter): fix TSNode:range() type signature #32224Riley Bruins2025-01-27
| | | | | | | | Uses an overload to properly show the different return type based on the input parameter.
| * fix: resolve all remaining LuaLS diagnosticsLewis Russell2025-01-27
| |
| * ci(release): add linux-arm64 appimage and tarballChristian Clason2025-01-27
| | | | | | | | | | | | | | Problem: No releases for ARM Linux. Solution: Provide appimages and tarballs for `linux-arm64`. Rename x86 releases to `linux-x86_64` for consistency.
| * build(deps)!: bump tree-sitter to HEAD, wasmtime to v29.0.1 (#32200)Christian Clason2025-01-27
| | | | | | | | | | Breaking change: `ts_node_child_containing_descendant()` was removed Breaking change: tree-sitter 0.25 (HEAD) required
| * vim-patch:db23436: runtime(asm): add byte directives to syntax scriptChristian Clason2025-01-27
| | | | | | | | | | | | | | | | closes: vim/vim#16523 https://github.com/vim/vim/commit/db23436b92a1b08e91146ef462482f2c1a79dfe8 Co-authored-by: Nir Lichtman <nir@lichtman.org>
| * feat(diagnostic): virtual_lines #31959Maria José Solano2025-01-26
| |
| * feat(api): nvim_get_autocmds filter by id#31549glepnir2025-01-26
| | | | | | | | | | | | | | Problem: nvim_get_autocmds cannot filter by id. Solution: Support it.
| * vim-patch:fb49e3c: runtime(filetype): commit 99181205c5f8284a3 breaks V lang ↵Christian Clason2025-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detection so make the regex more strict and have it check for a parenthesis. See: https://github.com/vlang/v/blob/master/examples/submodule/mymodules/submodule/sub_functions.v related: vim/vim#16513 https://github.com/vim/vim/commit/fb49e3cde79de4ce558c86d21a56eb9d60aeabd5 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9918120: runtime(filetype): Improve Verilog detection by checking ↵Christian Clason2025-01-25
| | | | | | | | | | | | | | | | | | | | | | | | for modules definition While at it, also increase the maximum number of lines to check to 500. fixes: vim/vim#16513 https://github.com/vim/vim/commit/99181205c5f8284a30f839107a12932924168f17 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:509a8d5: runtime(just): fix typo in syntax fileChristian Clason2025-01-25
| | | | | | | | | | | | | | | | closes: vim/vim#16515 https://github.com/vim/vim/commit/509a8d58f9a8ce00744114c1f21f0d951a559ecd Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
| * vim-patch:9.1.1049: insert-completed items are always sortedzeertzjq2025-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: insert-completed items are always sorted, although the LSP spec[1] standard defines sortText in the returned completionitem list. This means that the server has sorted the results. When fuzzy is enabled, this will break the server's sorting results. Solution: disable sorting of candidates when "nosort" is set in 'completeopt' [1] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem closes: vim/vim#16501 https://github.com/vim/vim/commit/f400a0cc41113eb75516bdd7f38aeaa15208ba2c Co-authored-by: glepnir <glephunter@gmail.com>
| * feat(extmarks): virtual text can be right-aligned, truncated #31921georgev932025-01-24
| | | | | | | | | | | | | | | | | | Problem: Right aligned virtual text can cover up buffer text if virtual text is too long Solution: An additional option for `virt_text_pos` called `eol_right_align` has been added to truncate virtual text if it would have otherwise covered up buffer text. This ensures the virtual text extends no further left than EOL.
| * ci(tests): add arm64 runnerChristian Clason2025-01-24
| | | | | | | | | | | | | | Problem: Linux `aarch64`/`arm64` builds are not tested. Solution: Add `ubuntu-arm` runners to test matrix (using `RelWithDebInfo` build).
| * fix(lsp): prefer `on_list` over `loclist` in default handlerEvgeni Chasnovski2025-01-23
| | | | | | | | | | | | | | | | | | | | Problem: setting `loclist = true` makes `on_list` being ignored. This was not a problem before, but with `vim.lsp.buf.document_symbol` using `loclist = true` as default it is needed to explicitly pass `loclist = false` in order to use custom `on_list`. Solution: prefer `on_list` over `loclist` and document the latter as taking effect only in the default handler.
| * feat(api): combined highlights in nvim_eval_statusline()Luuk van Baal2025-01-23
| | | | | | | | | | | | | | | | | | | | | | Problem: Combined highlighting was not applied to nvim_eval_statusline(), and 'statuscolumn' sign segment/numhl highlights. Solution: Add an additional `groups` element to the return value of `nvim_eval_statusline()->highlights`. This is an array of stacked highlight groups (highest priority last). Also resolve combined highlights for the 'statuscolumn' sign segment/numhl highlights. Expose/synchronize some drawline.c logic that is now mimicked in three different places.
| * vim-patch:9.1.1042: filetype: just files are not recognizedChristian Clason2025-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: just files are not recognized Solution: adjust filetype detection pattern, detect just shebang line, include just ftplugin, indent and syntax plugin (Peter Benjamin) closes: vim/vim#16466 https://github.com/vim/vim/commit/72755b3c8e91ec90447969b736f080e0de36003d Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
| * vim-patch:9.1.1045: filetype: N-Tripels and TriG files are not recognized ↵zeertzjq2025-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | (#32170) Problem: filetype: N-Tripels and TriG files are not recognized Solution: detect '*.nt' files as ntriples filetype and '*.trig' files as trig filetype (Gordian Dziwis) closes: vim/vim#16493 https://github.com/vim/vim/commit/c04334c33f543a6b84a4442cf235d84f5eaef6bb Co-authored-by: Gordian Dziwis <gordian@dziw.is>
| * fix(checkhealth): failed if 'lua' in plugin namephanium2025-01-23
| |