aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge pull request #25183 from llllvvuu/fix/marktree_movebfredl2023-09-16
|\ | | | | fix(marktree): off-by-one error in `marktree_move`
| * fix(marktree): off-by-one error in `marktree_move`L Lllvvuu2023-09-16
| | | | | | | | | | | | | | | | | | | | | | If you would insert element X at position j, then if you are moving that same element X from position i < j, you should move it to position j - 1, because you are losing an element. This error caused a gap to be left in the array, so that it looked like [x, null, y] instead of [x, y], where len = 2. This triggered #25147. Fixes: #25147
* | Merge pull request #25078 from glepnir/aubfredl2023-09-16
|\ \ | |/ |/| fix(float): don't trigger au event when enter is false
| * fix(ui): doesn't trigger au event when enter is falseglepnir2023-09-15
| |
* | vim-patch:c1f8bb37c6a8Christian Clason2023-09-16
| | | | | | | | | | | | | | | | | | | | runtime(forth): Fix :unlet error in ftplugin (vim/vim#13090) Fixes vim/vim#13089. https://github.com/vim/vim/commit/c1f8bb37c6a8e0babc2a41f16860763b57c23fa1 Co-authored-by: dkearns <dougkearns@gmail.com>
* | refactor(treesitter): remove duplicated diagnostic code (#24976)Maria José Solano2023-09-15
| | | | | | | | | | | | | | * refactor(treesitter): remove duplicated diagnostic code * fixup!: fix type errors * fixup!: add type namespace
* | docs(MAINTAIN): Add note about deprecation policy exceptions (#25159)Gregory Anders2023-09-15
| | | | | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | fix(extmarks): overlay virt_text position after 'showbreak' (#25175)zeertzjq2023-09-15
| | | | | | Also make virt_text_hide work properly.
* | fix: invoke changed_bytes when rewriting <Tab> char #25125Ilia Choly2023-09-15
| | | | | | | | | | | | | | When tabstop and shiftwidth are not equal, tabs are inserted as individual spaces and then rewritten as tab characters in a second pass. That second pass did not call changed_bytes which resulted in events being omitted. Fixes #25092
* | refactor(treesitter): rename "preview" => "edit" #25161Maria José Solano2023-09-15
| | | | | | | | | | | | "Edit" more closely describes the generic application than "Preview", though the buffer contents don't (yet) map to an actual file on disk. https://github.com/neovim/neovim/pull/24703#discussion_r1321719133
* | test(windows): unskip working tests (#25153)dundargoc2023-09-15
| | | | | | Also simplify home detection with os_homedir()
* | fix(extmarks): draw virt_text below diff filler lines properly (#25170)zeertzjq2023-09-15
| | | | | | fix(extmarks): draw virt_text properly below diff filler lines
* | build(deps): bump luajit to HEAD - 7a77a3cd8Christian Clason2023-09-15
| |
* | fix(extmarks): fix wrong virt_text position after wrapped TAB (#25168)zeertzjq2023-09-15
| |
* | fix(extmarks): properly handle virt_text on next screen line (#25166)zeertzjq2023-09-15
| | | | | | | | TODO: virt_text_hide doesn't work for the first char on a wrapped screen line, and it's not clear how to fix that.
* | refactor(drawline): remove unnecessary inline virt checks (#25163)zeertzjq2023-09-15
| |
* | docs: replace <pre> with ``` (#25136)Gregory Anders2023-09-14
| |
* | refactor(treesitter): deprecate for_each_child #25118LW2023-09-14
| | | | | | | | | | | | | | The name for_each_child is misleading and caused bugs. After #25111, #25115, there are no more usages of `for_each_child` in Nvim. In the future if we want to restore this functionality we can consider a generalized vim.traverse(node, key, visitor) function.
* | fix(treesitter): `language.add` - only register parser if it existsL Lllvvuu2023-09-14
| | | | | | | | Fixes: #24531
* | build(lint): use stylua without add_glob_targetdundargoc2023-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add_glob_target is our custom method to figure out whether a work needs to be done or not. This works as expected most of the time, but causes a problem with stylua. Stylua makes the decision that if a file is explicitly passed to be formatted, then it will format the file even if the file is set to be ignored in .styluaignore. This behavior breaks add_glob_target with seemingly no easy workaround. More information: https://github.com/JohnnyMorganz/StyLua/issues/751 Instead, what we can do is call stylua as you would in the command line. This will make stylua work as expected. The downside is that we no longer get a free "is this work necessary" detection, meaning that stylua will be run each time `make lint` is called, regardless if it's necessary or not. For longer lint tasks such as uncrustify and clang-tidy this would be disastrous, but this is an acceptable tradeoff since stylua is very quick.
* | feat(lsp): remove notify from vim.lsp.buf_detach_client (#25140)Mathias Fußenegger2023-09-14
| | | | | | Closes https://github.com/neovim/neovim/issues/19838
* | docs: fix typos and other small fixes (#25005)dundargoc2023-09-14
| | | | | | | | | | | | | | Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com> Co-authored-by: XTY <xty@xty.io> Co-authored-by: Empa <emanuel@empa.xyz> Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
* | fix(float): update position of anchored windows first (#25133)zeertzjq2023-09-14
| |
* | Merge pull request #25114 from bfredl/nohlbfredl2023-09-13
|\ \ | | | | | | refactor(highlight): merge redundant attr_entries and attr_entry_ids
| * | refactor(highlight): merge redundant attr_entries and attr_entry_ids structsbfredl2023-09-13
| | | | | | | | | | | | | | | An insert-only set now defines a monotonically increasing ordering by itself. It can be used to both lookup the key from index, and vice versa.
* | | vim-patch:8b2457a38198Christian Clason2023-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(swayconfig): improve syntax highlighting (vim/vim#13060) * syntax(swayconfig): improved highlighting * syntax(swayconfig): adapt to i3config structure https://github.com/vim/vim/commit/8b2457a3819826d90ad2b1677d213d9f924ec6c0 Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
* | | vim-patch:fc93594d562dChristian Clason2023-09-13
| | | | | | | | | | | | | | | | | | | | | | | | runtime(rust): sync rust runtime files with upstream (vim/vim#13075) https://github.com/vim/vim/commit/fc93594d562dbbd9da03c89754538f91efd0c7ca Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | | vim-patch:f5356bf6751fChristian Clason2023-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(i3config): syntax structure cleanup (vim/vim#13080) * syntax(i3config): improved i3config highlighting * syntax(i3config): refactor structure https://github.com/vim/vim/commit/f5356bf6751fc1af77c8d27c7286639527fde3f2 Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
* | | feat(vimdoc): support Markdown code blocks (#25127)Gregory Anders2023-09-13
| | | | | | | | | | | | | | | | | | Support Markdown code blocks in addition to <pre> blocks in Doxygen doc comments. Update doc comments in iter.lua as a test.
* | | fix(treesitter): don't update fold if tree is unchangedJaehwang Jung2023-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Folds are opened when the visible range changes even if there are no modifications to the buffer, e.g, when using zM for the first time. If the parsed tree was invalid, on_win re-parses and gets empty tree changes, which triggers fold updates. Solution: Don't update folds in on_changedtree if there are no changes.
* | | fix(treesitter): fixup for InspectTreeLewis Russell2023-09-12
| | | | | | | | | | | | Fixes #25120
* | | feat(gen_help_html): add anchors to help tags #25112Sergey Slipchenko2023-09-12
| | | | | | | | | | | | | | | Fixes #21911 Co-authored by: wispl
* | | fix(treesitter): remove more double recursionLewis Russell2023-09-12
|/ / | | | | | | Do not call `for_each_child` in functions that are already recursive.
* | Merge pull request #13243 from bfredl/intersectionbfredl2023-09-12
|\ \ | | | | | | feat(extmark): support highlighting and querying multiline ranges
| * | feat(extmark): support proper multiline rangesbfredl2023-09-12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removes the previous restriction that nvim_buf_set_extmark() could not be used to highlight arbitrary multi-line regions The problem can be summarized as follows: let's assume an extmark with a hl_group is placed covering the region (5,0) to (50,0) Now, consider what happens if nvim needs to redraw a window covering the lines 20-30. It needs to be able to ask the marktree what extmarks cover this region, even if they don't begin or end here. Therefore the marktree needs to be augmented with the information covers a point, not just what marks begin or end there. To do this, we augment each node with a field "intersect" which is a set the ids of the marks which overlap this node, but only if it is not part of the set of any parent. This ensures the number of nodes that need to be explicitly marked grows only logarithmically with the total number of explicitly nodes (and thus the number of of overlapping marks). Thus we can quickly iterate all marks which overlaps any query position by looking up what leaf node contains that position. Then we only need to consider all "start" marks within that leaf node, and the "intersect" set of that node and all its parents. Now, and the major source of complexity is that the tree restructuring operations (to ensure that each node has T-1 <= size <= 2*T-1) also need to update these sets. If a full inner node is split in two, one of the new parents might start to completely overlap some ranges and its ids will need to be moved from its children's sets to its own set. Similarly, if two undersized nodes gets joined into one, it might no longer completely overlap some ranges, and now the children which do needs to have the have the ids in its set instead. And then there are the pivots! Yes the pivot operations when a child gets moved from one parent to another.
* | fix(languagetree): remove double recursion in LanguageTree:parseL Lllvvuu2023-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `LanguageTree:parse` is recursive, and calls `LanguageTree:for_each_child`, which is also recursive. That means that, starting from the third level (child of child of root), nodes will be parsed twice. Which then means that if the tree is N layers deep, there will be ~2^N parses even if the branching factor is 1. Now, why was the tree deepening with each character inserted? And why did this only regress in #24647? These are mysteries for another time. Fixes: #25104
* | build(deps): bump luajit to HEAD - 8af63f992Christian Clason2023-09-12
| |
* | build(deps): bump tree-sitter to HEAD - 46af27796Christian Clason2023-09-12
| |
* | vim-patch:62145db91b10Christian Clason2023-09-12
| | | | | | | | | | | | | | | | syntax(i3config): improved i3config highlighting (vim/vim#13054) https://github.com/vim/vim/commit/62145db91b104075277cb3a940e18832ad106264 Co-authored-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
* | vim-patch:f787ee8451a1 (#25103)zeertzjq2023-09-12
| | | | | | | | | | | | | | | | | | runtime(doc): Add g:c_syntax_for_h to filetype-overrule docs closes: vim/vim#13074 https://github.com/vim/vim/commit/f787ee8451a1f24de4ef3de48b78d5aa77d09829 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | vim-patch:596ad66d1ddb (#25102)zeertzjq2023-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): documentation updates This is a collection of various improvements to the help pages closes vim/vim#12790 https://github.com/vim/vim/commit/596ad66d1ddb742ef349e98eb06b8e4052f68f51 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Houl <anwoku@yahoo.de> Co-authored-by: Doug Kearns <dougkearns@gmail.com> Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
* | fix(decorations): better approximation of botline #24794Jaehwang Jung2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: * The guessed botline might be smaller than the actual botline e.g. when there are folds and the user is typing in insert mode. This may result in incorrect treesitter highlights for injections. * botline can be larger than the last line number of the buffer, which results in errors when placing extmarks. Solution: * Take a more conservative approximation. I am not sure if it is sufficient to guarantee correctness, but it seems to be good enough for the case mentioned above. * Clamp it to the last line number. Co-authored-by: Lewis Russell <me@lewisr.dev>
* | fix(tests): set SHELL=sh #24941Sergey Slipchenko2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some tests fail with $SHELL=fish #6172 Related: https://github.com/neovim/neovim/pull/6176 Solution: Replace "echo -n" with "printf", because "echo" in sh may be provided as a shell builtin, which does not accept an "-n" flag to avoid a trailing newline (e.g. on macos). "printf" is more portable (defined by POSIX) and it does not output a trailing newline by itself. Fixes #6172 TODO: Other test failures may be related to "session leader" issue: https://github.com/neovim/neovim/issues/2354 Checked by running `:terminal ./build/bin/tty-test` from Nvim with `shell=/bin/fish` (inherited from `$SHELL`) and it indeed complains about "process does not own the terminal". With `shell=sh` it doesn't complain. And unsetting `$SHELL` seems to make `nvim` to fall back to `shell=sh`. FAILED test/functional/terminal/tui_spec.lua @ 1017: TUI paste: terminal mode test/functional/terminal/tui_spec.lua:1024: Row 1 did not match. Expected: |*tty ready | |*{1: } | |* | | | |{5:^^^^^^^ }| |{3:-- TERMINAL --} | |{3:-- TERMINAL --} | Actual: |*process does not own the terminal | |* | |*[Process exited 2]{1: } | | | |{5:^^^^^^^ }| |{3:-- TERMINAL --} | |{3:-- TERMINAL --} | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:622: in function '_wait' test/functional/ui/screen.lua:352: in function 'expect' test/functional/terminal/tui_spec.lua:1024: in function <test/functional/terminal/tui_spec.lua:1017> FAILED test/functional/terminal/tui_spec.lua @ 1551: TUI forwards :term palette colors with termguicolors test/functional/terminal/tui_spec.lua:1567: Row 1 did not match. Expected: |*{1:t}ty ready | | | |* | | | |{2:^^^^^^^ }| | | |{3:-- TERMINAL --} | Actual: |*{1:p}rocess does not own the terminal | | | |*[Process exited 2] | | | |{2:^^^^^^^ }| | | |{3:-- TERMINAL --} | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:622: in function '_wait' test/functional/ui/screen.lua:352: in function 'expect' test/functional/terminal/tui_spec.lua:1567: in function <test/functional/terminal/tui_spec.lua:1551>
* | refactor(usercmd.c): reduce scope of localsLewis Russell2023-09-11
| |
* | Merge pull request #25083 from bfredl/memlinetypebfredl2023-09-11
|\ \ | | | | | | refactor(memline): cleanup typedefs for memline structs
| * | refactor(memline): cleanup typedefs for memline structsbfredl2023-09-10
| | | | | | | | | | | | | | | These were used interchangedly by the struct name and the typedef name. Use standard pattern type names and use these consistently
* | | Merge pull request #24901 from faergeek/more-intuitive-cursor-updatebfredl2023-09-11
|\ \ \ | | | | | | | | fix(api): more intuitive cursor updates in nvim_buf_set_text
| * | | fix(api): more intuitive cursor updates in nvim_buf_set_textSergey Slipchenko2023-09-11
| | | | | | | | | | | | | | | | Fixes #22526
* | | | vim-patch:9.0.1891: No runtime support for MojoChristian Clason2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No runtime support for Mojo Solution: Add basic filetype and syntax plugins closes: vim/vim#13062 closes: vim/vim#13063 https://github.com/vim/vim/commit/0ce2c594d0704f27a16d2c13fce85d596cc91489 Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
* | | | vim-patch:e7833e73471aChristian Clason2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(masm): add support for AVX-2 and AVX-512 (vim/vim#13061) https://github.com/vim/vim/commit/e7833e73471a110c7c38c80935e1b840f254a3da Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>