Commit graph

16 commits

Author SHA1 Message Date
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