Commit graph

46 commits

Author SHA1 Message Date
kmarius
8adb2e0352 fix typo: Enviroment -> Environment 2021-06-22 07:27:00 +02:00
Munif Tanjim
1cc06ac8ba highlight: add 'comment' to hlmap 2021-04-24 16:52:37 +02:00
Stephan Seitz
712cc78a1e Add text.reference and text.environment 2021-03-30 19:26:37 +02:00
Stephan Seitz
0556edf5f3 latex: add TSMath that behaves like vimtex math highlighting 2021-03-30 19:26:37 +02:00
Stephan Seitz
7dacd66aec feat: Allow tables for additional_vim_regex_highlighting 2021-03-18 12:03:37 +01:00
Stephan Seitz
ff9bf6dc2b feat: Allow to configure to use syntax and tree-sitter together 2021-03-18 12:03:37 +01:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
Dennis B
aca33c0aca [highlights] Add TSSymbol highlight group
Addresses issue #892

Ruby and Dart literal symbols will now be highlighted by the new
TSSymbol highlight group, which itself will, by default, link to the Vim
Identifier highlight group. Vim theme authors can then set their
TSSymbol colors.

Symbol highlighting can apply to a number of languages as noted in the
following Wikipedia page: https://en.wikipedia.org/wiki/Symbol_(programming)

Not just for Ruby and Dart.
2021-03-04 06:19:40 +01:00
Santos Gallegos
b86555d9c3 HTML: improve highlights & injections 2021-02-11 07:42:19 +01:00
Thomas Vigouroux
7edf1d1c2b fix(highlight): fix detach function
Fixes #798
2021-01-14 12:11:32 +01:00
Thomas Vigouroux
a48c440f2b fix(highlight): remove unneeded query management 2021-01-14 12:11:32 +01:00
delphinus
b938e4f0fe Remove deprecated highlights 2020-12-21 22:32:17 +01:00
rockerBOO
d8d90909a9 typo 2020-12-07 21:50:47 +01:00
rockerBOO
3a337e0b3c cleanup: Add additional context 2020-12-07 21:50:47 +01:00
rockerBOO
07e86b1553 docs: Update docs for missing groups, re-order alphabetically 2020-12-07 21:50:47 +01:00
Thomas Vigouroux
808765a6c8
fix: update interface following languagetree merge (#687) 2020-11-23 12:46:27 -06:00
Thomas Vigouroux
f7d92f663c feat(languagetree): implement language tree
Allow the LanguageTree to be used as an option for highlighting.

Co-authored-by: Santos Gallegos <stsewd@protonmail.com>
Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
2020-10-19 18:28:45 +02:00
Thomas Vigouroux
06452845d6 fix(highlights): use new highlighter interface 2020-10-13 09:25:09 +02:00
Thomas Vigouroux
2c8d401bb8 highlight: use new highlighter interface 2020-10-12 20:04:31 +02:00
Stephan Seitz
45397ebbd9 fix(highlights): Add TSNamespace highlight
Start adding highlights for
     - C++
     - Rust (including other scoped_identifier/scoped_type_identifier fixes)
     - JS (only namespace_import)

Addresses #516
2020-10-10 15:31:51 +02:00
Stephan Seitz
7e3c4f8089 Add @keyword.operator for operators that are English words and add @exception for Java/JS 2020-09-19 07:30:49 +02:00
Akin Sowemimo
3652bed53e Re-add attribute highlight 2020-09-18 21:30:13 +02:00
TravonteD
c366a041c8 Add TSTag and TSTagDelimiter groups
These groups will be added for use with xml-like tags such as html and
jsx.
2020-09-18 17:09:43 +02:00
kiyan42
71ba2afc70 add TSNone 2020-09-15 00:19:04 +02:00
Steven Sojka
3fe8bbcf9c fix(modules): do not reattach if already attached 2020-08-22 06:07:21 -05:00
Steven Sojka
579c9936d6 feat(highlights): add is predicate 2020-08-16 09:04:07 -05:00
Thomas Vigouroux
98b7515014 fix: refactor after upstream refactor 2020-08-14 15:00:13 +02:00
Thomas Vigouroux
5a7579c8f5 fix(highlight): Use TSParameter 2020-08-10 14:17:55 +02:00
Akin Sowemimo
1427c43cf0 Change capture groups and add variable highlights 2020-08-09 19:12:26 +02:00
Santos Gallegos
429036317a Lua: highlight function name 2020-08-09 18:38:00 +02:00
Santos Gallegos
6f01384cb2 Parsers: add reStructuredText 2020-07-27 09:16:26 +02:00
Akin Sowemimo
599bec3890 Rename attribute to annotation 2020-07-23 17:17:03 +02:00
Akin Sowemimo
ee83c3bd02 Add attribute to the highlight map 2020-07-23 17:17:03 +02:00
Stephan Seitz
8cf2dc7f9a Refactor locals.lua:
- shared query group stuff -> query.lua
- local-specific stuff from ts_utils -> locals.lua
2020-07-16 09:34:31 +02:00
Stephan Seitz
a4e2692c7b Refactor: Add parsers.get_buf_lang 2020-07-16 09:34:31 +02:00
Stephan Seitz
97ad374816 Fix #167: Add custom_captures config key to set highlights for custom queries 2020-07-13 22:04:24 +02:00
Thomas Vigouroux
282e18edd1 highlight: use custom highlight groups 2020-06-26 20:56:19 +02:00
Kiyan Yazdani
2c81ec3918
Merge pull request #90 from kyazdani42/fix/parser-names-as-filetypes
refacto/fix: filetype / parser name distinction
2020-06-21 17:32:37 +02:00
Jakub Łuczyński
0b4d4b4140 Updated python highlights
* allow for digits in constant names
* removed redundant/conflicting rules
* added missing hlmap
* fixed escape_sequence
* more explicit @constructor assignment
* added rules for function decoration identifiers
2020-06-21 00:11:58 +02:00
kiyan42
df17a48c85 refactor: parser list and lang->ft/ft->lang
- move parser list in `parsers.lua`
- most `ft` variable where changed to `lang`, `ft` is only used on
  autocmd binding, and lang is used for everything else. Functions have
  been defined to make the switch between `ft` and `lang`
2020-06-20 12:31:52 +02:00
Stephan Seitz
f6bf56974e Introduce @include 2020-05-17 21:56:44 +02:00
kiyan42
45dcebb15f refacto/feat: better handling of parser updates
features:
- node_movement is moving between scopes.
- add selection initialization from normal mode
- add a decremental selection

improvements:
- attach to buffer to run tree parsing on change
- run state update on CursorMoved
- the buffer state is:
```
{
  cursor_pos = { row=row, col=col },
  current_node = node_under_cursor,
  selection = {
      range = nil, -- activates when starting a selection
      nodes = {} -- filling up when starting an incremental selection
  },
  parser = parser, -- parser for current buffer
}
```
- refacto all the modules reliant on parsing the tree, update the current nodes, get the current nodes...

fixes:
- fix has_parser to look for .so libraries
- fix should select the whole file when selection root in selection
2020-05-12 16:16:48 +02:00
Thomas Vigouroux
5dc5695413 feat: support suggested highlights 2020-05-07 14:03:29 +02:00
kiyan42
62786ec7c6 feat/refacto: improve configurations
- You should now get the configs through functions
- Configs for languages are now inside a local object called parsers
- You can get the parser installation configurations with `get_parser_configs`
- A new object has been initialized inside configs to specify module config (called config).
- Provide functions to enable/disable a module on one buffer
- Provide functions to enable/disable a module on all buffers, and if filetype is
  specified, for specific filetype
- Provide function to determine if module is activated for a specified filetype
2020-04-24 22:15:21 +02:00
Thomas Vigouroux
f7424d23a1 highlight: retain highlighters with the buffers 2020-04-22 22:03:23 +02:00
Thomas Vigouroux
d05728e155 feat: syntax highlighting 2020-04-22 22:02:42 +02:00