feat(queries): modeline mechanism for base langs

This implements https://github.com/neovim/neovim/pull/13059#issuecomment-704414189

This behaves like modelines and remove the use of the base_language map.
Also, this allows to fine-tune what we actually want to include per
query, which is better IMO.
This commit is contained in:
Thomas Vigouroux 2020-10-06 20:03:39 +02:00
parent 9ad47c65bd
commit c055899dc0
17 changed files with 73 additions and 32 deletions

View file

@ -1,3 +1,5 @@
; inherits: c
[
(for_range_loop)
(class_specifier)

View file

@ -1,3 +1,5 @@
; inherits: c
((identifier) @field
(#match? @field "^_"))

View file

@ -1,3 +1,5 @@
; inherits: c
;; Parameters
(variadic_parameter_declaration
declarator: (variadic_declarator

View file

@ -1,3 +1,4 @@
; inherits: (jsx)
[
(for_in_statement)
(for_statement)

View file

@ -1,3 +1,4 @@
; inherits: (jsx)
; Types
; Javascript

View file

@ -1,3 +1,5 @@
; inherits: (jsx)
; Scopes
;-------

View file

@ -0,0 +1 @@
; inherits: ocaml

View file

@ -0,0 +1 @@
; inherits: ocaml

View file

@ -0,0 +1 @@
; inherits: ocaml

1
queries/tsx/folds.scm Normal file
View file

@ -0,0 +1 @@
; inherits: typescript,jsx

View file

@ -0,0 +1 @@
; inherits: typescript,jsx

1
queries/tsx/locals.scm Normal file
View file

@ -0,0 +1 @@
; inherits: typescript,jsx

View file

@ -1,3 +1,5 @@
; inherits: javascript
[
(interface_declaration)
(internal_module)

View file

@ -1,3 +1,4 @@
; inherits: javascript
[
"abstract"
"declare"

View file

@ -1,2 +1,4 @@
; inherits: javascript
(required_parameter (identifier) @definition)
(optional_parameter (identifier) @definition)