Commit graph

25 commits

Author SHA1 Message Date
ObserverOfTime
7bef1d5330 highlights(rst): don't spell check links 2023-01-22 14:11:45 +01:00
ObserverOfTime
90c44df8cb highlights(rst): disable spell for code blocks
injections(rst): add sourcecode directive
2022-10-15 08:12:55 -07:00
Lewis Russell
37398c7d68 feat(spell): support more languages 2022-09-26 13:47:12 +01:00
Lewis Russell
2a63ea5665 feat(spell): upstream spell queries from spellsitter 2022-09-06 12:44:19 +01:00
Santos Gallegos
9a98ed1f96
RST: use any-of? instead of match? (#1678) 2021-08-08 12:37:08 -05:00
Santos Gallegos
1e8016d92d
RST: add code-block to injections (#1677)
This isn't part of the rst spec,
but it's common enough on third party libs (sphinx specially).
2021-08-08 11:16:11 -05:00
Santos Gallegos
c1f61d4ca1
Improve check-queries (#1253)
- Add checks for injections.
- Allow queries that start with [A-Z] for highlights only.
- Don't stop on the first error, finish checking all queries.
2021-05-31 17:03:27 +00:00
Santos Gallegos
67f0857015 Revert "Comment: use @combined to create just one tree per buffer (#1252)"
This reverts commit 4a7a713c52.
2021-05-07 16:51:57 +02:00
Santos Gallegos
4a7a713c52
Comment: use @combined to create just one tree per buffer (#1252)
* Comment: use `@combined` to create just one tree per buffer

There is no need to create a tree per line/block for comments.
Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251

* Add injections for scss

* Fix jsonc

* Combine jsdoc
2021-04-28 07:19:07 -05:00
Stephan Seitz
712cc78a1e Add text.reference and text.environment 2021-03-30 19:26:37 +02:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
Stephan Seitz
2655fc94b0 highlights(rst): Reset highlights in doctest_block 2021-02-15 15:36:33 -05:00
Santos Gallegos
6aaf240d0c RST: update injection queries
Finally, highlight for code blocks
2021-01-02 17:19:08 -05:00
Santos Gallegos
5ffcd75ea6 RST: update parser and queries
- The directive type does not longer includes `::`.
- The content of the directives is not longer interpreted as rst,
  but it uses language injection for it.
- Fix a query to allow to capture targets without link.
- Reset the content of the math role so it can be highlighted by the
  injection instead.

Problems I found:

- Capturing the same node with @language and @content will raise an
  error.

  ```
  Error detected while processing FileType Autocommands for "*":
  E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:331: table index is nil
  ```

  Harcoding the language works, Using the offset predicate doesn't work
  either `(#offset! 0 0 1 0)` nor `(#offset! 0 0 0 5)`

- Generating the grammar using `tree-sitter-cli@0.17.x` breaks
  nvim-treesitter, `@0.16.9` works.
2021-01-01 09:49:14 -05:00
Stephan Seitz
3362f45196 Remove textobjects module 2020-10-04 14:20:20 +02:00
Santos Gallegos
5c85e6beee RST: update queries
Some nodes were renamed and added more textobjects.
2020-09-18 21:29:19 +02:00
Santos Gallegos
09c703193f RST: update locals
A title is an implicit target.
2020-09-15 20:59:02 +02:00
Santos Gallegos
c719e60266 rst: remove unused captures
This is causing an error.
2020-09-06 21:57:32 +02:00
Steven Sojka
ce43dbf54c fix(queries): use vim-match for non lua regexes 2020-08-16 18:31:56 +02:00
Santos Gallegos
8f3b601bcc RST: update textobjects 2020-08-11 20:21:03 +02:00
Santos Gallegos
81d444c498 RST: update queries 2020-08-07 10:51:00 +02:00
Santos Gallegos
5c5f4c5d54 RST: update locals 2020-08-01 19:18:54 +02:00
Santos Gallegos
8cacd5aaac RST: update highlights 2020-08-01 14:33:36 +02:00
Santos Gallegos
b1da6ad8b3 rst: update highlight queries 2020-07-29 10:04:46 +02:00
Santos Gallegos
6f01384cb2 Parsers: add reStructuredText 2020-07-27 09:16:26 +02:00