aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
diff options
context:
space:
mode:
authorThomas Vigouroux <thomas.vigouroux@protonmail.com>2022-07-18 14:21:40 +0200
committerLewis Russell <lewis6991@gmail.com>2022-09-06 10:14:11 +0100
commit75adfefc85bcf0d62d2c0f51a951e6003b595cea (patch)
tree98e20f97a5c5ce818ade4f330bca45ca1d4d26bf /src/nvim/extmark.c
parent05893aea391d91e159a41f03acc20049c7049510 (diff)
downloadrneovim-75adfefc85bcf0d62d2c0f51a951e6003b595cea.tar.gz
rneovim-75adfefc85bcf0d62d2c0f51a951e6003b595cea.tar.bz2
rneovim-75adfefc85bcf0d62d2c0f51a951e6003b595cea.zip
feat(extmarks,ts,spell): full support for spelling
- Added 'spell' option to extmarks: Extmarks with this set will have the region spellchecked. - Added 'noplainbuffer' option to 'spelloptions': This is used to tell Neovim not to spellcheck the buffer. The old behaviour was to spell check the whole buffer unless :syntax was set. - Added spelling support to the treesitter highlighter: @spell captures in highlights.scm are used to define regions which should be spell checked. - Added support for navigating spell errors for extmarks: Works for both ephemeral and static extmarks - Added '_on_spell_nav' callback for decoration providers: Since ephemeral callbacks are only drawn for the visible screen, providers must implement this callback to instruct Neovim which regions in the buffer need can be spell checked. The callback takes a start position and an end position. Note: this callback is subject to change hence the _ prefix. - Added spell captures for built-in support languages Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r--src/nvim/extmark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index 8e780f4aaa..290d20b749 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -70,7 +70,8 @@ void extmark_set(buf_T *buf, uint32_t ns_id, uint32_t *idp, int row, colnr_T col
|| kv_size(decor->virt_lines)
|| decor->conceal
|| decor_has_sign(decor)
- || decor->ui_watched) {
+ || decor->ui_watched
+ || decor->spell) {
decor_full = true;
decor = xmemdup(decor, sizeof *decor);
}