Björn Linse
4781333a7a
decorations: allow virt_text overlay at any column
2021-02-22 09:40:06 +01:00
Björn Linse
d623400cad
Merge pull request #13944 from chentau/on_bytes_doc
...
Doc: update documentation for on_bytes
2021-02-17 13:14:18 +01:00
chentau
d966e0142d
Doc: update documentation for on_bytes
2021-02-17 00:47:19 -08:00
Björn Linse
772421f6b1
Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line
...
fix_cursor: do not change line number when edit will not impact cursor row
2021-02-16 18:32:38 +01:00
Björn Linse
94622ca66b
buffer updates: add on_reload callback and handle it in treesitter parser
2021-02-10 18:58:46 +01:00
chentau
05605bfc05
correctly mark changed regions for set_text
2021-02-07 13:50:29 -08:00
Michael Lingelbach
9f2335937e
fix_cursor: do not change line number when edit will not impact cursor
...
row
2021-01-31 11:57:22 -08:00
Thomas Vigouroux
8950f4e94a
Merge pull request #13784 from runiq/get_extmark_by_id-limit_break
...
doc: remove nvim_buf_get_extmark_by_id limit opt
2021-01-28 18:27:24 +01:00
Patrice Peterson
fe02c65395
doc: remove nvim_buf_get_extmark_by_id limit opt
...
Passing any key but `details` in the opts results in an error.
2021-01-18 13:34:08 +01:00
chentau
2ac0ca2025
change end_right_gravity error behavior
2021-01-12 18:32:16 -08:00
chentau
231f75e086
change gravity to be a boolean flag, and add corresponding flag for end position of extmark
2021-01-05 00:28:34 -08:00
chentau
10b278bdae
allow for extmark gravity to be set through api
2021-01-03 13:59:24 -08:00
Björn Linse
39d098f9f9
api: set_text: fix some byte count issues
...
add byte count tests
update documentation
2021-01-01 19:51:58 +01:00
chentau
f7d01a65d5
api: set_text: more tests, and fixing lint
...
removing pending virtcol tests
Allow passing in empty array as a shorthand for array with empty string; add more documentation
add check for start_row as well
2021-01-01 19:51:58 +01:00
Tony Chen
45b14f88db
api: set_text: rebase, update to new api, and add more tests
2021-01-01 19:51:45 +01:00
Blaž Hrastnik
29ad2ebc16
api: set_text: fix validation and some issues
...
fix double free because intermediary lines weren't xmemdup'd.
NL-for-NUL dance.
Normalize row indices and perform more validation.
Adjust the cursor position if it's on the right side of the replacement.
Tests and documentation.
2021-01-01 19:51:37 +01:00
Björn Linse
9be19b770d
api: set_text: first stab at nvim_buf_set_text
2021-01-01 19:51:24 +01:00
Björn Linse
2debabb080
Merge pull request #13355 from notomo/check-textlock-in-api
...
api: add textlock check
2020-12-16 15:40:21 +01:00
Thomas Vigouroux
25e20da550
feat(buffer_updates): allow ignoring when previewing
...
Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
2020-12-15 22:29:27 +01:00
notomo
356319f356
api: add textlock check
2020-12-15 20:24:33 +09:00
Björn Linse
b1ef6de620
api: move deprecated functions to separate files
...
Most these are just calls to non-deprecated variants, and take up
unnecessary space and search hits in the other files.
2020-12-05 14:34:17 +01:00
Thomas Vigouroux
c0a6989d93
feat(luahl): add priority mechanism
...
Base priority is 0x1000, in order to stay kinda backward compatible.
Also set tree-sitter default highlight to 100 (middle-ish value)
2020-11-25 10:10:05 +01:00
Björn Linse
8497d4b3ea
decoration: split out "decoration" from "extmark" module
...
Decorations will only grow more complex. move the to a separate
file, so that extmark.c remains about extmarks.
2020-11-07 09:55:17 +01:00
Björn Linse
c146eddc8b
api: add API for themes
...
co-author: hlpr98 <hlpr98@gmail.com > (dict2hlattrs function)
orange is sus??
NOVEMBER DAWN
erase the lie that is redraw_later()
2020-11-01 19:14:56 +01:00
TJ DeVries
a83b76790b
fixup: fixup: fixup: fixup:
2020-10-22 16:21:35 -04:00
TJ DeVries
1afe6dd2f4
fixup: bfredl comments
2020-10-22 16:08:32 -04:00
TJ DeVries
78556aba7d
api: nvim_buf_delete
2020-10-22 16:08:32 -04:00
Björn Linse
0b615dae07
api: multiple decoration providers at once
2020-10-10 15:16:45 +02:00
G-flat
8972eea2e1
PVS/V1001: Remove assignment to unused variable
2020-10-05 15:17:14 +08:00
erw7
f1b39f91a5
extmark: Change nvim_buf_set_extmark to not create undo data
2020-10-02 11:41:30 +09:00
erw7
620c8fdfe9
extmark: fix decoration ploblems with extmark
...
54ce101
changed the way undo entries are created when adding decorations.
This creates all sorts of problems.This change fixes the problem by
reverting to the previous behavior.
2020-10-02 11:41:30 +09:00
Thomas Vigouroux
cecc45efb1
api(extmarks): allow extrange past final newline
2020-09-17 21:23:52 +02:00
Björn Linse
ead2fcf4ee
api: add nvim_buf_call to call function with curbuf changed to buffer
2020-09-13 09:11:38 +02:00
Björn Linse
4042975df4
luahl: global the luahl
2020-09-13 07:46:39 +02:00
Björn Linse
18a3a89822
luahl
2020-09-13 07:46:39 +02:00
Björn Linse
5f3ddb195e
lua: cleanup naming conventions of executor functions
2020-09-10 10:02:41 +02:00
Björn Linse
bc86f76c0a
api/buffer: add "on_bytes" callback to nvim_buf_attach
...
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
2020-09-09 21:22:21 +02:00
Georgy Komarov
e57ea5f2a9
doc: fix invalid help tags #12745
2020-09-05 22:10:56 -07:00
Björn Linse
866308c3de
API: be less breaking in the christmas tree decorations
2020-09-04 19:11:26 +02:00
Björn Linse
49f5b57587
decor: sketch new decorations API
...
return decorations back
lol no nvim_buf_get_virtual_text
share decorations that are hl only to avoid alloc avalanche
2020-09-03 15:40:24 +02:00
Björn Linse
d3302573ba
extmark: move id to dict in nvim_buf_set_extmark
2020-09-03 10:23:52 +02:00
Björn Linse
54ce1010e8
extmark: refiy "Decoration" abstraction
...
one very important thought
2020-09-03 10:23:52 +02:00
TJ DeVries
7b529e7912
doc: fix scripts and regenerate ( #12506 )
...
* Fix some small doc issues
* doc: fixup
* doc: fixup
* Fix lint and rebase
* Remove bad advice
* Ugh, stupid mpack files...
* Don't let people include these for now until they specifically want to
* Prevent duplicate tag
2020-07-02 07:09:17 -04:00
Hirokazu Hata
52cd8bf507
doc: fix vim.api.nvim_buf_attach callback arguments
2020-06-15 12:30:13 +09:00
Jan Edmund Lazo
69d019f3bd
pvs/v560: remove redundant line check
2020-04-13 12:00:30 -04:00
Justin M. Keyes
93c6eb4a66
PVS/V618: fix printf-style args #11888
...
We intentionally do not translate API errors.
ref: https://github.com/neovim/neovim/issues/6150
2020-02-22 12:59:39 -08:00
Bruno Roy
a26943e9b3
clang bug: Dead assignment ns_id
...
Remove a dead assignment of the `ns_id` variable in the
`src/nvim/api/buffer.c` file.
Refer: https://neovim.io/doc/reports/clang/report-f279da.html#EndPath
2020-02-13 23:09:42 -08:00
Björn Linse
48a869dc6d
shed biking: it's always extmarks, never marks extended
2020-01-20 19:36:35 +01:00
Björn Linse
ca1a00edd6
extmarks/bufhl: reimplement using new marktree data structure
...
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).
Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)
Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes complexity for little gain.
Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.
fixes #11598
2020-01-16 12:36:10 +01:00
Björn Linse
440695c296
tree-sitter: implement query functionality and highlighting prototype [skip.lint]
2019-12-22 12:51:46 +01:00