aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | Merge pull request #31408 from jamessan/vterm-test-fixtureJames McCoy2024-12-03
|\ \ | | | | | | test(vterm): move test functions into vterm_test fixture
| * | test(vterm): move test functions into vterm_test fixtureJames McCoy2024-12-02
|/ / | | | | | | | | | | | | In order to run unittests with a release build, we need the test functions to be accessible when NDEBUG is defined. Moving the functions into the test fixture ensures they are available and only available for use by the unit tests.
* | vim-patch:9.1.0900: Vim9: digraph_getlist() does not accept bool arg (#31431)zeertzjq2024-12-03
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: digraph_getlist() does not accept bool argument (Maxim Kim) Solution: accept boolean as first argument (Yegappan Lakshmanan) fixes: vim/vim#16154 closes: vim/vim#16159 https://github.com/vim/vim/commit/198ada3d9f48c6556d20c4115ec500555b118aad Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | docs: provide example for configuring LSP foldexpr (#31411)Gregory Anders2024-12-02
| | | | | | | | | | Using the "supports_method" function with a client capability inside of an LspAttach autocommand is the preferred method to do this, so we should be showing users how to do it.
* | fix(extmark): builtin completion can still affect nearby extmarks #31387luukvbaal2024-12-02
| | | | | | | | | | | | | | Problem: Built-in completion can still affect nearby extmarks. #31384 Solution: Restore extmarks when completion leader changes.
* | test(treesitter): global highlight definitions and fold test #31407luukvbaal2024-12-02
| | | | | | | | Add test for foldtext= highlighting. Change file to global highlight definitions while at it.
* | fix(api): deprecate nvim_subscribe, nvim_unsubscribe #30456Justin M. Keyes2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - nvim_subscribe, nvim_unsubscribe were deprecated in aec4938a21a02d279d13a9eb64ef3b7cc592c374 but this wasn't set in the API metadata. - The function annotations ``` FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY FUNC_API_DEPRECATED_SINCE(13) ``` cause this test to fail: ``` RUN T3 api metadata functions are compatible with old metadata or have new level: 3.00 ms ERR test/functional/api/version_spec.lua:135: function vim_subscribe was removed but exists in level 0 which nvim should be compatible with stack traceback: test/functional/api/version_spec.lua:135: in function <test/functional/api/version_spec.lua:128> ``` Solution: - Set the API metadata. - Rearrange the annotations so that FUNC_API_DEPRECATED_SINCE is 2nd: ``` FUNC_API_SINCE(1) FUNC_API_DEPRECATED_SINCE(13) FUNC_API_REMOTE_ONLY ```
* | vim-patch:768728b: runtime(doc): Update documentation for "noselect" in ↵dundargoc2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | 'completeopt' In particular, make the distinction and interaction between "noinsert" and "noselect" clearer as it was very confusing before. closes: vim/vim#16148 https://github.com/vim/vim/commit/768728b48751c5e937409d12d98bfa1fb4c37266 Co-authored-by: dundargoc <gocdundar@gmail.com>
* | vim-patch:9a39483: runtime(typst): provide a formatlistpat in ftpluginChristian Clason2024-12-02
| | | | | | | | | | | | | | | | closes: vim/vim#16134 https://github.com/vim/vim/commit/9a39483adb418e37c672000a58792c0f0e8aa662 Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* | fix(ui): clamp 'cmdheight' for other tabpages on screen resize (#31419)zeertzjq2024-12-02
| |
* | fix(api): make `nvim_set_hl()` respect all `cterm` attributes (#31390)Evgeni Chasnovski2024-12-02
| |
* | vim-patch:9.1.0899: default for 'backspace' can be set in C code (#31416)zeertzjq2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: default for 'backspace' can be set in C code Solution: promote the default for 'backspace' from defaults.vim to the C code (Luca Saccarola) closes: vim/vim#16143 https://github.com/vim/vim/commit/959ef61430bdd8fb982b38bd3347d90251255cfc N/A patches: vim-patch:9.1.0895: default history value is too small vim-patch:075aeea: runtime(doc): document changed default value for 'history' Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
* | docs: example keybind for :Inspect #31391C.D. MacEachern2024-12-01
| |
* | Merge pull request #31370 from glepnir/vim-9.1.0867zeertzjq2024-11-30
|\ \ | | | | | | vim-patch:9.1.{0867,0891,0896}
| * | vim-patch:9.1.0896: completion list wrong after v9.1.0891glepnir2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: completion list wrong after v9.1.0891 Solution: update compl_mach_array after leader change (glepnir) compl_shown_match update not correct after refactoring in v9.1.0891 Unfortunately, this regressed what item is selected after leader change. So generate compl_match_array before updating compl_shown_match range, and split generate compl_match_array into range match_head fixes: https://github.com/vim/vim/issues/16128 closes: https://github.com/vim/vim/pull/16129 https://github.com/vim/vim/commit/a49c077a883b2566882df9069385ed1e1277ca64
| * | vim-patch:9.1.0891: building the completion list array is inefficientglepnir2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: building the completion list array is inefficient Solution: refactor and improve ins_compl_build_pum() func (glepnir) current time complexity is O(n^2). I guess garray is not used here to save memory and avoid efficiency is caused by heap memory allocation. A simple way is to add an extra pointer as a single linked list to store the matching compl_T, and traverse this single linked list to generate compl_match_array. The time complexity is O(n x m). The worst case is m=n, but we can still get a little improvement. Because the if condition does not need to be run at one time. This should be a good solution for now. Later we may be able to complete it in O(lgn) time. But this requires more reconstruction. So this is the first step. closes: #16125 https://github.com/vim/vim/commit/80b662009c0fe8f1728a3f3a2c8013b7eebf6745
| * | vim-patch:9.1.0867: ins_compl_add() has too many argsglepnir2024-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ins_compl_add() has too many args Solution: refactor it and use an int array instead of 2 separate int args (glepnir) closes: vim/vim#16062 https://github.com/vim/vim/commit/5c66e23c624717216d380d938d0bba5d34a004fe Co-authored-by: glepnir <glephunter@gmail.com>
* | | vim-patch:9.1.0898: runtime(compiler): pytest compiler not includedChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: runtime(compiler): pytest compiler not included Solution: include pytest compiler, update the compiler completion test (Konfekt) closes: vim/vim#16130 https://github.com/vim/vim/commit/3c2596a9e967910143d41fbb9615614ab36d43a7 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* | | vim-patch:9.1.0897: filetype: pyrex files are not detectedChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: pyrex files are not detected Solution: detect '*.pxi' and '*.pyx+' as pyrex filetype (user202729) References: https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/using_with_c++.html closes: vim/vim#16136 https://github.com/vim/vim/commit/aa16b30552f0c6a00dcc761e3954cd5266bf106a Co-authored-by: user202729 <25191436+user202729@users.noreply.github.com>
* | | vim-patch:dd21c89: runtime(compiler): update eslint compilerChristian Clason2024-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compact formatter is no longer distributed with eslint, so: - switch to '--format stylish' in makeprg - update 'errorformat' for the 'stylish' format output fixes: vim/vim#16126 closes: vim/vim#16137 https://github.com/vim/vim/commit/dd21c8962680ba726ac1bf78ae106a4b6071450f Co-authored-by: Romain Lafourcade <romainlafourcade@gmail.com>
* | | docs(diagnostics): location list / quickfix example #31371Yochem van Rosmalen2024-11-29
| | |
* | | refactor: gen_declarations.luaLewis Russell2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: gen_declarations.lua is complex and has duplicate logic with c_grammar.lua Solution: Move all lpeg logic to c_grammar.lua and refactor gen_declarations.lua.
* | | feat(lsp): support `textDocument/foldingRange` (#31311)Yi Ming2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(shared): extract `vim._list_insert` and `vim._list_remove` * feat(lsp): add `vim.lsp.foldexpr()` * docs(lsp): add a todo for state management * feat(lsp): add `vim.lsp.folding_range.foldclose()` * feat(lsp): schedule `foldclose()` if the buffer is not up-to-date * feat(lsp): add `vim.lsp.foldtext()` * feat(lsp): support multiple folding range providers * refactor(lsp): expose all folding related functions under `vim.lsp.*` * perf(lsp): add `lsp.MultiHandler` for do `foldupdate()` only once
* | | build(deps): bump luajit to HEAD - 19878ec05Christian Clason2024-11-29
| | |
* | | vim-patch:511eb84: runtime(po): remove poDiffOld/New, add po-format flags to ↵Christian Clason2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syntax file fixes: vim/vim#16120 closes: vim/vim#16132 https://github.com/vim/vim/commit/511eb84c08ea28a0a1363a4e780ee4311818f459 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* | | vim-patch:9.1.0892: the max value of 'cmdheight' is limited by other ↵zeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tabpages (#31378) Problem: the max value of 'cmdheight' is limited by other tabpages Solution: Limit the maximum value of 'cmdheight' to the current tabpage only. (Milly) The Help says that cmdheight is local to the tab page, but says nothing about the maximum value depending on the state of all tab pages. Users may wonder why they can't increase cmdheight when there are still rows available on the current tab page. This PR changes the behavior of cmdheight so that its maximum value depends only on the state of the current tab page. Also, since magic numbers were embedded in various places with the minimum value of cmdheight being 1, we defined a constant to make it easier to understand. closes: vim/vim#16131 https://github.com/vim/vim/commit/2cddf0e85a7f8304476397e1c51dcd0e41835ac3 Cherry-pick Test_cmdheight_not_changed() from patch 9.0.0187. Co-authored-by: Milly <milly.ca@gmail.com>
* | | vim-patch:8.2.2993: 'fileencodings' default value should depend on ↵zeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'encoding' (#31379) Problem: 'fileencodings' default value should depend on 'encoding'. (Gary Johnson) Solution: When 'encoding' is "utf-8" use a different default value for 'fileencodings'. https://github.com/vim/vim/commit/5ffefbb35aba2448099314a9e09714d2f3b2b1bd Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | | Merge pull request #31377 from zeertzjq/vim-65311c6zeertzjq2024-11-29
|\ \ \ | |_|/ |/| | vim-patch: :compiler spotbugs
| * | vim-patch:9.1.0894: No test for what the spotbug compiler parseszeertzjq2024-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No test for what the spotbug compiler parses (after commit: 65311c6f472de67b368) Solution: Test &makeprg for the SpotBugs compiler plugin (Aliaksei Budavei) closes: vim/vim#16096 https://github.com/vim/vim/commit/60ddb1a14025dc061908a1b7a0a3a82b4bbed223 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
| * | vim-patch:65311c6: runtime(compiler): include spotbugs Java linterzeertzjq2024-11-29
|/ / | | | | | | | | | | | | | | | | closes: vim/vim#16001 https://github.com/vim/vim/commit/65311c6f472de67b368d83441ca5e93da86161f4 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com> Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* | docs(lsp): update example, optional parameters #31299Yi Ming2024-11-28
| |
* | docs: more accurate typing for LSP references contextRiley Bruins2024-11-28
| | | | | | | | | | | | | | **Problem:** The `context` parameter for `references()` is just typed as a table, which is unhelpful. **Solution:** Properly type it as an `lsp.ReferenceContext`!
* | vim-patch:9.1.0890: %! item not allowed for 'rulerformat' (#31369)zeertzjq2024-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: %! item not allowed for 'rulerformat' (yatinlala) Solution: also allow to use %! for rulerformat option (Yegappan Lakshmanan) fixes: vim/vim#16091 closes: vim/vim#16118 https://github.com/vim/vim/commit/ac023e8baae65584537aa3c11494dad6f71770af Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | docs: add tag `vim.fs.exists()` and document suggested replacementdundargoc2024-11-27
| |
* | fix(lsp): mention function name in warning #31301glepnir2024-11-27
| | | | | | | | | | | | Problem: The warning message is the same in different functions. It is not convenient to locate the specific function name Solution: add function name in warning message
* | ci: remove myself from lsp reviewersMathias Fussenegger2024-11-27
| |
* | vim-patch:7e501f4: runtime(gzip): load undofile if there exists oneChristian Clason2024-11-27
| | | | | | | | | | | | | | | | | | fixes: vim/vim#16102 closes: vim/vim#16122 https://github.com/vim/vim/commit/7e501f4d9986866382888e67d8f11faf5767c8f4 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | feat(tui): update 'background' on theme change events (#31350)Gregory Anders2024-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Enabling private DEC mode 2031 tells the terminal to notify Nvim whenever the OS theme changes (i.e. light mode to dark mode or vice versa) or the terminal emulator's palette changes. When we receive one of these notifications we query the terminal color's background color again to see if it has changed and update the value of 'background' if it has. We only do this though if the user has not explicitly set the value of 'bg' themselves. The help text is updated slightly to hint to users that they probably shouldn't set this value: on modern terminal emulators Nvim is able to completely determine this automatically.
* | perf(vim.text): use lookup table implementation for hex encoding (#30080)Gregory Anders2024-11-26
| | | | | | Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.0889: Possible unnecessary redraw after adding/deleting lines ↵zeertzjq2024-11-26
| | | | | | | | | | | | | | | | | | | | | | (#31356) Problem: Possible unnecessary redraw after adding/deleting lines. Solution: Check b_mod_set before using b_mod_xlines to avoid using stale b_mod_xlines value (zeertzjq). closes: vim/vim#16124 https://github.com/vim/vim/commit/9f25a3a237156889df3df78dbd8f12ee6059e332
* | fix(lua): remove vim.loader.disable() #31344Justin M. Keyes2024-11-26
|/ | | | | | | | | | | | | | Problem: `vim.loader.disable` does not conform to `:help dev-name-common` and `:help dev-patterns`. Solution: - Add `enable` parameter to `vim.loader.enable` - Remove `vim.loader.disable` - Note the change in `:help news-breaking-dev` (HEAD changes). - This is not a breaking change (except to "HEAD") because `vim.loader` is marked "experimental". previous: 26765e8461c1ba1e9a351632212cf89900221781
* vim-patch:9.1.0888: leftcol property not available in getwininfo() (#31349)zeertzjq2024-11-26
| | | | | | | | | | Problem: leftcol property not available in getwininfo() Solution: add leftcol property property (glepnir) closes: vim/vim#16119 https://github.com/vim/vim/commit/0a850673e3d4193d55f47bcbbc0b0da5f155307d Co-authored-by: glepnir <glephunter@gmail.com>
* fix(defaults): omit empty line from unimpaired mapping messages (#31347)Marcus Caisey2024-11-25
| | | | | | | | | | | | | | | | | | | | | Problem: The default unimpaired mappings display an empty line after the command's output. This results (with default configuration) in the `Press ENTER or type command to continue` prompt to be displayed, like so: ``` (2 of 16): item2 Press ENTER or type command to continue ``` Solution: The cause is that we're checking the second return value from `pcall(vim.api.nvim_cmd, opts, {})` to determine whether the call was successful. `nvim_cmd` returns an empty string on success, so this value is an empty string in the successful path which we then display. The fix is simple: check the first return value instead which is the "status code" of the call.
* fix(tui): also reset cursor color if it was invisible (#31348)Gregory Anders2024-11-25
|
* fix(lsp): retrigger diagnostics request on server cancellation (#31345)Gregory Anders2024-11-25
| | | Co-authored-by: Jesse <github@jessebakker.com>
* feat(keysets): teach Union and LuaRefOfLewis Russell2024-11-25
|
* feat(diagnostic): inherit parent 'path' option in open_float (#31273)Mathias Fußenegger2024-11-25
| | | | | Diagnostics sometimes contain stack traces, it's useful being able to use `CTRL-W F` on them to open related files from within the diagnostic window.
* refactor(lsp): rename `offset_encoding` to `position_encoding` #31286Yi Ming2024-11-25
| | | | | | | | Problem: LSP spec uses the term "position encoding" where we say "offset encoding". Solution: - Rename it everywhere except `vim.lsp.Client.offset_encoding` (which would be breaking). - Mention "position encoding" in the documentation for `vim.lsp.Client.offset_encoding`.
* fix(tui): only reset cursor color if it was changed (#31337)Gregory Anders2024-11-25
| | | | We already track this information so we might as well use it. This eliminates a bunch of unnecessary OSC sequences.
* fix(grid): double grid_line_start() with ext_messages #31292luukvbaal2024-11-25
| | | | | | Problem: Hit double grid_line_start() assert when redrawing from ext_messages msg_ruler event. Solution: Do not start() batched grid calls when win_redr_ruler() will not puts() anything.