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>
This commit is contained in:
Thomas Vigouroux
2022-07-18 14:21:40 +02:00
committed by Lewis Russell
parent 05893aea39
commit 75adfefc85
21 changed files with 313 additions and 95 deletions

View File

@@ -162,9 +162,11 @@
;; Literals
(string_literal) @string
(string_literal) @spell
(integer_literal) @number
(float_literal) @float
(comment) @comment
(comment) @spell
(pattern) @string.special
(pattern_multi) @string.regex
(filename) @string