aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | | | | feat(ui): add support for OSC 8 hyperlinks (#27109)Gregory Anders2024-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extmarks can contain URLs which can then be drawn in any supporting UI. In the TUI, for example, URLs are "drawn" by emitting the OSC 8 control sequence to the TTY. On terminals which support the OSC 8 sequence this will create clickable hyperlinks. URLs are treated as inline highlights in the decoration subsystem, so are included in the `DecorSignHighlight` structure. However, unlike other inline highlights they use allocated memory which must be freed, so they set the `ext` flag in `DecorInline` so that their lifetimes are managed along with other allocated memory like virtual text. The decoration subsystem then adds the URLs as a new highlight attribute. The highlight subsystem maintains a set of unique URLs to avoid duplicating allocations for the same string. To attach a URL to an existing highlight attribute we call `hl_add_url` which finds the URL in the set (allocating and adding it if it does not exist) and sets the `url` highlight attribute to the index of the URL in the set (using an index helps keep the size of the `HlAttrs` struct small). This has the potential to lead to an increase in highlight attributes if a URL is used over a range that contains many different highlight attributes, because now each existing attribute must be combined with the URL. In practice, however, URLs typically span a range containing a single highlight (e.g. link text in Markdown), so this is likely just a pathological edge case. When a new highlight attribute is defined with a URL it is copied to all attached UIs with the `hl_attr_define` UI event. The TUI manages its own set of URLs (just like the highlight subsystem) to minimize allocations. The TUI keeps track of which URL is "active" for the cell it is printing. If no URL is active and a cell containing a URL is printed, the opening OSC 8 sequence is emitted and that URL becomes the actively tracked URL. If the cursor is moved while in the middle of a URL span, we emit the terminating OSC sequence to prevent the hyperlink from spanning multiple lines. This does not support nested hyperlinks, but that is a rare (and, frankly, bizarre) use case. If a valid use case for nested hyperlinks ever presents itself we can address that issue then.
| * | | | | | build: various build improvementsdundargoc2024-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove "ran-" prefix from touch files as it's redundant since the they're already in the directory named `touches`. - Include `contrib` when formatting with `make formatlua`. - Use TARGET_FILE generator expression instead of assuming the executable location. - reuse logic that determines whether to use lua or luajit. - add translations to the `nvim` target. Makefile improvements: - rename variable `CMAKE_PRG` to `CMAKE` to make it more consistent with the builtin `MAKE` variable. - stop propagating flags to generator. Users should use cmake for non-standard use cases. - remove `+` prefix from targets. If the user for whatever reason wants to dry-run a target then they should be able to.
| * | | | | | fix(spell): always accept ':' as filename char in 'spellfile' (#27172)zeertzjq2024-01-24
| | | | | | | | | | | | | | | | | | | | | Follow-up to #25236
| * | | | | | fix(options): use a union for def_val (#27169)zeertzjq2024-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: APIs get wrong boolean option default values on big-endian platforms. Solution: Use a union for def_val. Cannot use OptVal or OptValData yet as it needs to have the same types as option variables.
| * | | | | | vim-patch:9.1.0046: :drop does not re-use empty buffer (#27165)zeertzjq2024-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :drop does not re-use empty buffer (Rocco Mao) Solution: Make :drop re-use an empty buffer (Rocco Mao) fixes: vim/vim#13851 closes: vim/vim#13881 https://github.com/vim/vim/commit/f96dc8d07f752ddd96d1447d85278a85255a1462 Co-authored-by: Rocco Mao <dapeng.mao@qq.com>
| * | | | | | fix(sign): avoid deleting from sign map while looping over it (#27158)luukvbaal2024-01-24
| | | | | | |
| * | | | | | fix(colorscheme): link LSP semantic tokens to treesitter groupsJohn Drouhard2024-01-23
| | | | | | |
| * | | | | | Merge pull request #27147 from bfredl/crash2bfredl2024-01-23
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | fix(extmark): another "step out" case
| | * | | | | | fix(extmark): fix crash when stepping out from internal nodebfredl2024-01-23
| | | | | | | |
| * | | | | | | fix(treesitter): update @markup default linksChristian Clason2024-01-23
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use `Special` as default for `@markup.*`, especially `@markup.raw` and `@markup.math` (`@markup` itself is never used) * use `Structure` for `@markup.environment` * highlight all of `@markup.link` as Underlined (otherwise concealed links are invisible)
| * | | | | | fix(extmarks): crash with sign after many marksbfredl2024-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #27137
| * | | | | | vim-patch:9.1.0043: ml_get: invalid lnum when :s replaces visual selection ↵zeertzjq2024-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27140) Problem: ml_get: invalid lnum when :s replaces visual selection (@ropery) Solution: substitute may decrement the number of lines in a buffer, so validate, that the bottom lines of the visual selection stays within the max buffer line fixes: vim/vim#13890 closes: vim/vim#13892 https://github.com/vim/vim/commit/7c71db3a58f658b4329b82ab603efa928d17bdbc Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | fix(column): clear "b_signcols" when marktree is clearedLuuk van Baal2024-01-22
| | | | | | |
| * | | | | | perf(extmarks): add metadata for efficient filtering of special decorationsbfredl2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This expands on the global "don't pay for what you don't use" rules for these special extmark decorations: - inline virtual text, which needs to be processed in plines.c when we calculate the size of text on screen - virtual lines, which are needed when calculating "filler" lines - signs, with text and/or highlights, both of which needs to be processed for the entire line already at the beginning of a line. This adds a count to each node of the marktree, for how many special marks of each kind can be found in the subtree for this node. This makes it possible to quickly skip over these extra checks, when working in regions of the buffer not containing these kind of marks, instead of before where this could just be skipped if the entire _buffer_ didn't contain such marks.
| * | | | | | docs(options): remove misleading sentence (#27129)zeertzjq2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting 'verbose' to 1 doesn't cause Nvim to produce messages. It adds more information to existing messages, which is documented above.
| * | | | | | feat(fold): transparent foldtextLewis Russell2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'foldtext' can be set to an empty string to disable and render the line with: - extmark highlight - syntax highlighting - search highlighting - no line wrapping - spelling - conceal - inline virtual text - respects `fillchars:fold` Currently normal virtual text is not displayed Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | | | | Merge pull request #27076 from glepnir/extmark_hlgroupbfredl2024-01-22
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | refactor(api): use hl id directly in nvim_buf_set_extmark
| | * | | | | | refactor(api): give "hl_group" more accurate _meta typebfredl2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These can either be number or string in lua, so we can specify this directly as "number|string".
| | * | | | | | refactor(api): use hl id directly in nvim_buf_set_extmarkglepnir2024-01-20
| | | | | | | |
| * | | | | | | fix(eval): properly support checking v:lua function in exists() (#27124)Raphael2024-01-22
| | | | | | | |
| * | | | | | | refactor: use "csarg" for CharsizeArg variables (#27123)zeertzjq2024-01-22
| | | | | | | |
| * | | | | | | Merge pull request #26813 from VanaIgr/screen-pos-speedupzeertzjq2024-01-22
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | perf: make screen size and position calculations more efficient N/A patches for version.c: vim-patch:9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol vim-patch:9.1.0038: Unnecessary loop in getvcol()
| | * | | | | | | perf: reuse fast character size calculation algorithm from getvcol()VanaIgr2024-01-22
| | | | | | | | |
| | * | | | | | | perf: don't decode utf8 character multiple times in getvcol()VanaIgr2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optimized virtual column calculation loop in getvcol() was decoding the current character twice: once in ptr2cells() and the second time in utfc_ptr2len(). For combining charcters, they were decoded up to 2 times in utfc_ptr2len(). Additionally, the function used to decode the character could be further optimised.
| | * | | | | | | perf: remove loop for computing last position in getvcol()VanaIgr2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function computed the start of the multibyte character and iterated until the current character reached this position. The loop at the start of the function handed the case where the index passed to the function was past the end of the line. This loop can be removed if the function instead compares the next position against the end position end exits the loop if it is greater than the end position.
| | * | | | | | | perf: cache breakindent/showbreak width in win_lbr_chartabsizeVanaIgr2024-01-18
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | breakindent was recomputed on every call to win_lbr_charbabsize() when the character is past the end of the first row of a wrapped line. Even though the function for computing breakindent cached the last result, reusing the cached value required strcmp of the cached line with the given line.
| * | | | | | | fix(rpc): assertion failure due to invalid msgpack inputnwounkn2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: rbuffer_consumed assertion fails if Unpacker fails to parse msgpack, because it doesn't consume bytes on errors Solution: Call rbuffer_consumed_compact only if Unpacker isn't closed
| * | | | | | | build: create BINARY_LIB_DIR directory before adding parserdundargoc2024-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -E copy_directory behaves differently depending on if the directory in question exists or not. Always create it to ensure it behaves consistently.
| * | | | | | | fix(extmarks): missing "spell" and "conceal" in details (#27116)zeertzjq2024-01-22
| | | | | | | |
| * | | | | | | build: fix parser installation locationdundargoc2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cmake's `install()` functions like rsync where a trailing slash changes whether the directory or its contents will be copies.
| * | | | | | | feat(treesitter)!: new standard capture namesChristian Clason2024-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sharing queries with upstream and Helix is difficult due to different capture names. Solution: Define and document a new set of standard captures that matches tree-sitter "standard captures" (where defined) and is closer to Helix' Atom-style nested groups. This is a breaking change for colorschemes that defined highlights based on the old captures. On the other hand, the default colorscheme now defines links for all standard captures (not just those used in bundled queries), improving the out-of-the-box experience.
| * | | | | | | build: create separate targets for nvim with and without runtime filesdundargoc2024-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This distinction is important for correct dependency management, as the nvim binary is used to create some runtime files. The nvim binary (and the target to build it) is thus called `nvim_bin` and the target to build all of nvim (binary+runtime) is called `nvim`.
| * | | | | | | feat(api): support getting abbreviations (#26868)Raphael2024-01-20
| | | | | | | |
| * | | | | | | feat(ui): add chdir UI event (#27093)Gregory Anders2024-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an embedded Nvim instance changes its current directory a "chdir" UI event is emitted. Attached UIs can use this information however they wish. In the TUI it is used to synchronize the cwd of the TUI process with the cwd of the embedded Nvim process.
| * | | | | | | Merge pull request #27061 from luukvbaal/extmarkbfredl2024-01-19
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | fix(extmarks): do not remove invalid marks from decor upon deletion
| | * | | | | | refactor(extmarks): remove unused new pos from ExtmarkSavePosLuuk van Baal2024-01-18
| | | | | | | |
| | * | | | | | docs(extmarks): add undocumented "details" array fieldsLuuk van Baal2024-01-18
| | | | | | | |
| | * | | | | | fix(extmarks): do not remove invalid marks from decor upon deletionLuuk van Baal2024-01-17
| | | | | | | |
| * | | | | | | fix(inccommand): improve preview buffer number handling (#27087)zeertzjq2024-01-19
| | | | | | | |
| * | | | | | | refactor(drawline): get_rightmost_vcol()Lewis Russell2024-01-18
| | | | | | | |
| * | | | | | | refactor(drawline): add more constsLewis Russell2024-01-18
| | | | | | | |
| * | | | | | | refactor(drawline): localise more variables in win_line()Lewis Russell2024-01-18
| | | | | | | |
| * | | | | | | refactor(drawline): more win_line() improvementsLewis Russell2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `win_line()` previously used a conspicuous `ptrdiff_t v` variable in many different places for different reasons. The change encapsulates those uses and introduces local variables in each with a reduced scope. Also add `const` to some fields in winlinevars_T.
| * | | | | | | docs: various #25289Justin M. Keyes2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com> Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
| * | | | | | | fix(drawline): update prev_ptr after getting syntax attrs (#27072)zeertzjq2024-01-18
| | | | | | | |
| * | | | | | | vim-patch:9.1.0040: issue with prompt buffer and hidden buffer (#27071)zeertzjq2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Modifying a hidden buffer still interferes with prompt buffer mode changes. Solution: Save and restore b_prompt_insert. (zeertzjq) closes: vim/vim#13875 Modifying hidden buffer still interferes with prompt buffer mode changes https://github.com/vim/vim/commit/f267847017976ab85117bdf75b45e769836f8d69
| * | | | | | | vim-patch:9.1.0039: too vague errors for 'listchars'/'fillchars' (#27070)zeertzjq2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too vague errors for 'listchars'/'fillchars' Solution: Include the field name in error message. (zeertzjq) related: #27050 closes: vim/vim#13877 https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7 Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
| * | | | | | | fix(column): remove sign from line it was previously on with undoLuuk van Baal2024-01-17
| |/ / / / / /
| * | | | | | fix(column): pass kFalse when initializing "b_signcols.count"Luuk van Baal2024-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong "clear" argument passed to buf_signcols_count_range when initializing "b_signcols.count" for the first time. Solution: Pass kFalse so that the "nested" counter is not incorrectly decremented.
| * | | | | | docs: various fixes (#26929)dundargoc2024-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Patrick Bollinger <owner@pjbollinger.com> Co-authored-by: vilo1839 <139687192+vilo1839@users.noreply.github.com>