Commit graph

419 commits

Author SHA1 Message Date
Nils
fb445fa2ae feat: (s)css multiline support 2023-04-24 20:13:12 +01:00
Nils
388fceb5e9 feat: swift support 2023-04-24 19:40:06 +01:00
Nils
5c279e5a6c
feat: added css & scss queries (#244)
* feat: keyframes

* add zig queries

* feat: scss rule_set

* feat: media

* feat: css and scss inherits

* chore: update readme
2023-04-24 09:08:00 +01:00
Nils
8cd25630a4 chore: update readme & bash test file 2023-04-23 19:40:47 +01:00
Nils
69fb92edec feat: bash switch-case & while 2023-04-23 19:40:47 +01:00
Nils
2d1dadab5c feat: support for fish 2023-04-23 19:40:47 +01:00
uchars
27a725e034 add zig queries 2023-04-23 14:41:35 +01:00
Luuk van Baal
8b6861ebf0 fix: use TreesitterContextLineNumber for statuscolumn 2023-04-20 07:31:06 +01:00
Luuk van Baal
0d730df898 fix: off-by-one bug for statuscolumn highlights 2023-04-12 12:07:43 +01:00
Luuk van Baal
6e218a3db5 feat: render statuscolumn highlights for context window
Follow-up to #235
2023-04-12 11:08:52 +01:00
Akin Sowemimo
38203f5e6c feat: render statuscolumn for context window
feat: add use_statuscol to ensure signs are expanded

chore: add TODO comment about readonly relnum

fix: check if nvim 0.9 before using statuscolumn
2023-04-07 22:13:58 +01:00
Robin Björklin
97bf4752de feat: add initial OCaml support 2023-04-07 20:28:44 +01:00
romamihalich
68eaeb8673 feat: add c# support 2023-04-04 18:09:34 +01:00
Farhan Mustar
9e23f06d4c fix: delete bufs if cannot close window (#188) 2023-04-04 10:12:49 +01:00
Lewis Russell
959265a5d4 fix(yaml): remove block_mapping 2023-03-31 09:43:38 +01:00
Miguel Oliva
fc7db28056
feat: adding generator to js/ts/tsx and improvements for ts (#234)
* feat: adding generator to js/ts/tsx and improvements for ts

* reverting tests
2023-03-25 23:04:56 +00:00
Robert Brunhage
3a48e2d3c9
feat: add dart support
* feat: add class class definition

* feat: add try and if statement for dart

* feat: add support for methods/functions

* feat: add for_statement in dart

* chore: update readme to showcase dart support
2023-03-24 16:32:33 +00:00
Lewis Russell
09ed254950 fix: 0.9 deprecations 2023-03-24 15:11:38 +00:00
Benjamin Brownlee
88d1627285 feat(cpp): add linkage specification context 2023-03-20 17:14:59 +00:00
Frank
446a463500 add R queries 2023-03-20 11:20:24 +00:00
Cheuk Yin Ng
c1fa596988
feat: add php switch/case statements to context (#228)
* feat: add php switch/case statements to context

* Adopt simplified suggestion on switch statement

Co-authored-by: Lewis Russell <me@lewisr.dev>

* cleanup: adopt simplified suggestion on case stmnt

---------

Co-authored-by: Lewis Russell <me@lewisr.dev>
2023-03-19 09:38:24 +00:00
Denis Cornehl
35829162f6 remove expression_statement from python context 2023-03-18 11:42:01 +00:00
Lewis Russell
cb6252b00d update README 2023-03-13 14:04:53 +00:00
ArtisticZhao
8771984a94 Support verilog. 2023-03-13 14:02:06 +00:00
Andy Bell
f35bc54731
add java queries (#225)
* add java queries

* remove unused alternation in java

* add example java test file
2023-03-11 22:55:52 +00:00
Damian Senn
67dcaf9d91
Align TypeScript and tsx with JavaScript (#219)
* align ts and tsx with js

* add tsx test example file
2023-03-11 11:13:10 +00:00
Lewis Russell
f314f42d99 perf: implement cache for is_valid 2023-03-11 11:11:32 +00:00
Tobias Schmitz
982bd8ada2
feat: additional rust queries (#222)
* feat: additional rust queries

* test: update tests
2023-03-11 00:24:08 +00:00
Mitchell Hanberg
6183524ec0 feat(elixir): add queries 2023-03-11 00:23:11 +00:00
Damian Senn
e00d0545bf
feat: add typescriptreact support 2023-03-10 11:58:15 +00:00
Benjamin Brownlee
757f79afdc
feat(c/cpp): add preprocessor directives 2023-03-10 11:19:48 +00:00
Lewis Russell
02d25fcf56 Revert "feat(c/cpp): handle else"
This reverts commit 0421dd87d9.
2023-03-10 10:36:48 +00:00
Lewis Russell
0421dd87d9 feat(c/cpp): handle else 2023-03-09 22:43:44 +00:00
Gasol Wu
0b4481cc2e
fix(php): Add context for method declaration (#213) 2023-03-09 08:16:42 +00:00
Benjamin Brownlee
36ae3bdbed
feat: add query for latex (#214) 2023-03-09 08:16:19 +00:00
Denis Cornehl
a7463ae4a5
add queries for go, javascript, extend toml queries (#212)
* extend toml queries

* add javascript queries

* add go queries
2023-03-08 16:08:11 +00:00
Cameron
55d459e36e
Add context queries for ruby (#209)
* Add context queries for ruby

* Update readme to include ruby
2023-03-08 14:13:59 +00:00
Lewis Russell
6e53eecca4
feat!: (BREAKING PLEASE READ) use queries for determining context (#198)
This plugin has been significantly rewritten to use Treesitter
queries instead of patterns for determining context regions for
languages.

The main benefits of this change are:
- it is a much simpler implementation since we can leverage core APIs.
- it fits in more generally with the Treesitter eco-system.
- it allows configuration of contexts to be provided from multiples sources.
- it allows more sophisticated configuration of contexts since queries
  (with directives and predicates) are much more powerful than patterns.
- the query format should be usable for other editors.

The major downside of this new implementation is that it requires each
language to provide it's own query as opposed to using the general
purpose patterns. This means that some languages which had contexts
before may not have them now. If this is the case then please raise an
issue. Adding queries for a specific language is fairly simple but too
much work to implement for all 170+ parsers that exist.

This commits provides explicit support for:
  - bash
  - c
  - cpp
  - typescript
  - rust
  - json
  - lua
  - markdown
  - python
  - yaml
  - php
  - scala
  - teal
  - toml
  - vim

Please see the README for instructions on how to add support for other
languages.

This commit also drops explicit support for Nvim 0.7. If you still need
support for this version then you can use the `compat/0.7` release.
2023-03-08 13:17:20 +00:00
Lewis Russell
895ec44f5c Revert "feat: show virtual text in context bar (#203)"
This reverts commit 373c2e0d1e.
2023-02-13 12:53:23 +00:00
Ben Lubas
373c2e0d1e
feat: show virtual text in context bar (#203) 2023-02-13 10:52:31 +00:00
Avishay Matayev
cacee48281 feat: support python's with statement
Example:
```python
def example_func():
    file_name = "tmp/secrets.txt"
    with open(file_name, "rb+") as f:
      # ...
      # cursor here
```

Will show both the function definition and the `with` line as context.
2023-01-06 08:38:57 +00:00
Robin Skahjem-Eriksen
4842abe5bd chore: sort DEFAULT_TYPE_PATTERNS
Alphabetically sort DEFAULT_TYPE_PATTERNS language entries, to quickly
assess included languages as the list of languages grow.
2023-01-03 12:42:17 +00:00
Robin Skahjem-Eriksen
aaf635a016 add: Verilog defaults
Add to DEFAULT_TYPE_PATTERNS, treesitter syntax node types utilized by
Verilog.

The list of added node types are probably not exhaustive, but these seem
to be the ones needed for basic use.
2023-01-03 12:42:17 +00:00
dundargoc
d28654b012 ci: bump action versions 2022-12-18 14:10:25 +01:00
BoltlessEngineer
5d0367be74 fix: close window in right way (#191)
use `close()` function to close window instead of `M.close()`.
2022-12-14 17:07:46 +00:00
Raymond Ha
5fda0b9a2a Update readme pattern defaults 2022-11-23 00:33:06 +00:00
Lewis Russell
c61464bafb add issue template 2022-11-22 16:41:08 +00:00
Genco Levi
76157752e7 add typescript export statements 2022-11-22 15:54:20 +00:00
Arthur Skobara
76296f856d fix: skip leading types before highlighting contexts 2022-11-22 15:03:06 +00:00
Max Coplan
e14e5965a9 🔧 [default]: Add enum and struct to default patterns
I think `enum` and `struct`, in addition to `class` makes sense for default groups that apply to many programming languages
2022-11-22 15:02:20 +00:00