aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api.lua
Commit message (Collapse)AuthorAge
* Merge pull request #26249 from bfredl/concealcharbfredl2023-11-28
|\ | | | | feat(decoration): allow conceal_char to be a composing char
| * feat(decoration): allow conceal_char to be a composing charbfredl2023-11-28
| | | | | | | | | | | | | | | | decor->text.str pointer must go. This removes it for conceal char, in preparation for a larger PR which will also handle the sign case. By actually allowing composing chars for a conceal chars, this becomes a feature and not just a refactor, as a bonus.
* | docs(lua): don't include remote-only API functions (#26266)zeertzjq2023-11-28
|/
* Merge pull request #25724 from luukvbaal/signmergebfredl2023-11-18
|\ | | | | refactor(sign): move legacy signs to extmarks
| * refactor(sign): move legacy signs to extmarksLuuk van Baal2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The legacy signlist data structures and associated functions are redundant since the introduction of extmark signs. Solution: Store signs defined through the legacy commands in a hashmap, placed signs in the extmark tree. Replace signlist associated functions. Usage of the legacy sign commands should yield no change in behavior with the exception of: - "orphaned signs" are now always removed when the line it is placed on is deleted. This used to depend on the value of 'signcolumn'. - It is no longer possible to place multiple signs with the same identifier in a single group on multiple lines. This will now move the sign instead. Moreover, both signs placed through the legacy sign commands and through |nvim_buf_set_extmark()|: - Will show up in both |sign-place| and |nvim_buf_get_extmarks()|. - Are displayed by increasing sign identifier, left to right. Extmark signs used to be ordered decreasingly as opposed to legacy signs.
* | feat(tui): support DCS responses in TermResponse event (#26061)Gregory Anders2023-11-16
|/
* Merge pull request #25767 from luukvbaal/signdelbfredl2023-11-08
|\ | | | | feat(extmarks): add 'invalidate' property
| * feat(extmarks): add 'invalidate' property to extmarksLuuk van Baal2023-11-08
| | | | | | | | | | | | | | | | Problem: No way to have extmarks automatically removed when the range it is attached to is deleted. Solution: Add new 'invalidate' property that will hide a mark when the entirety of its range is deleted. When "undo_restore" is set to false, delete the mark from the buffer instead.
* | feat(tui): use TermResponse event for OSC responses (#25868)Gregory Anders2023-11-06
|/ | | | | | | | | | | | | When the terminal emulator sends an OSC sequence to Nvim (as a response to another OSC sequence that was first sent by Nvim), populate the OSC sequence in the v:termresponse variable and fire the TermResponse event. The escape sequence is also included in the "data" field of the autocommand callback when the autocommand is defined in Lua. This makes use of the already documented but unimplemented TermResponse event. This event exists in Vim but is only fired when Vim receives a primary device attributes response. Fixes: https://github.com/neovim/neovim/issues/25856
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* docs: miscellaneous doc and type fixes (#25554)Maria José Solano2023-10-10
|
* Merge pull request #25455 from bfredl/highlight_namespace_gettersbfredl2023-10-01
|\ | | | | feat(ui): allow to get the highlight namespace. closes #24390
| * feat(ui): allow to get the highlight namespaceDaniel Steinberg2023-10-01
| |
* | feat(float): support toggle show float windowglepnir2023-09-30
|/
* Merge pull request #25229 from glepnir/20323bfredl2023-09-26
|\ | | | | fix(highlight): add force in nvim_set_hl
| * fix(highlight): add force in nvim_set_hlglepnir2023-09-26
| |
* | docs: do not use deprecated functions #25334Maria José Solano2023-09-24
| |
* | docs: misc #24561Justin M. Keyes2023-09-20
| | | | | | | | fix #24699 fix #25253
* | Merge pull request #25214 from bfredl/glyphcachebfredl2023-09-19
|\ \ | | | | | | refactor(grid): change schar_T representation to be more compact
| * | refactor(grid): change schar_T representation to be more compactbfredl2023-09-19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a screen cell would occupy 28+4=32 bytes per cell as we always made space for up to MAX_MCO+1 codepoints in a cell. As an example, even a pretty modest 50*80 screen would consume 50*80*2*32 = 256000, i e a quarter megabyte With the factor of two due to the TUI side buffer, and even more when using msg_grid and/or ext_multigrid. This instead stores a 4-byte union of either: - a valid UTF-8 sequence up to 4 bytes - an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a glyph cache This avoids allocating space for huge composed glyphs _upfront_, while still keeping rendering such glyphs reasonably fast (1 hash table lookup + one plain index lookup). If the same large glyphs are using repeatedly on the screen, this is still a net reduction of memory/cache consumption. The only case which really gets worse is if you blast the screen full with crazy emojis and zalgo text and even this case only leads to 4 extra bytes per char. When only <= 4-byte glyphs are used, plus the 4-byte attribute code, i e 8 bytes in total there is a factor of four reduction of memory use. Memory which will be quite hot in cache as the screen buffer is scanned over in win_line() buffer text drawing A slight complication is that the representation depends on host byte order. I've tested this manually by compling and running this in qemu-s390x and it works fine. We might add a qemu based solution to CI at some point.
* | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
|\ \ | |/ |/| fix(float): add fixed option
| * fix(float): add fixd optionglepnir2023-09-18
| |
* | docs: replace <pre> with ``` (#25136)Gregory Anders2023-09-14
|/
* 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(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(api): more intuitive cursor updates in nvim_buf_set_textSergey Slipchenko2023-09-11
| | | | Fixes #22526
* fix(highlight): add create param in nvim_get_hlglepnir2023-09-09
|
* feat(highlight): add `FloatFooter` highlight groupEvgeni Chasnovski2023-08-26
| | | | | | Problem: No clear separation of floating title and footer highlighting. Solution: Add new `FloatFooter` highlight group.
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | Problem: Now way to show text at the bottom part of floating window border (a.k.a. "footer"). Solution: Allows `footer` and `footer_pos` config fields similar to `title` and `title_pos`.
* docs(msgpack_rpc): add "msgpack-rpc" client typeAlisue2023-08-26
|
* docs: miscJustin M. Keyes2023-08-03
| | | | Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
* feat(lua-types): types for vim.api.* (#24523)Lewis Russell2023-08-01