mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -04:00
Add Fortran queries from @oponkork
This commit is contained in:
parent
3b8d23ca30
commit
9820c8ca7d
3 changed files with 105 additions and 1 deletions
|
|
@ -147,7 +147,8 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm)
|
- [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm)
|
||||||
- [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera)
|
- [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera)
|
||||||
- [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD)
|
- [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD)
|
||||||
- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @Shatur95)
|
- [ ] [fortran](https://github.com/stadelmanma/tree-sitter-fortran)
|
||||||
|
- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by not @tjdevries)
|
||||||
- [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @alexlafroscia)
|
- [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @alexlafroscia)
|
||||||
- [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268)
|
- [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268)
|
||||||
- [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley)
|
- [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley)
|
||||||
|
|
|
||||||
11
queries/fortran/folds.scm
Normal file
11
queries/fortran/folds.scm
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
;; by @oponkork
|
||||||
|
[
|
||||||
|
(if_statement)
|
||||||
|
(where_statement)
|
||||||
|
(enum_statement)
|
||||||
|
(do_loop_statement)
|
||||||
|
(derived_type_definition)
|
||||||
|
(function)
|
||||||
|
(subroutine)
|
||||||
|
(interface)
|
||||||
|
] @fold
|
||||||
92
queries/fortran/highlights.scm
Normal file
92
queries/fortran/highlights.scm
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
;; by @oponkork
|
||||||
|
|
||||||
|
(identifier) @variable
|
||||||
|
(string_literal) @string
|
||||||
|
(number_literal) @number
|
||||||
|
(boolean_literal) @boolean
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
(intrinsic_type)
|
||||||
|
; (primitive_type_qualifier)
|
||||||
|
"dimension"
|
||||||
|
"intent"
|
||||||
|
"in"
|
||||||
|
"out"
|
||||||
|
"inout"
|
||||||
|
"type"
|
||||||
|
"endtype"
|
||||||
|
"attributes"
|
||||||
|
"global"
|
||||||
|
"device"
|
||||||
|
"host"
|
||||||
|
"grid_global"
|
||||||
|
] @type
|
||||||
|
|
||||||
|
[
|
||||||
|
"bind"
|
||||||
|
"call"
|
||||||
|
"contains"
|
||||||
|
"continue"
|
||||||
|
"cycle"
|
||||||
|
"endfunction"
|
||||||
|
"endmodule"
|
||||||
|
"endprogram"
|
||||||
|
"endsubroutine"
|
||||||
|
"enumerator"
|
||||||
|
"equivalence"
|
||||||
|
"exit"
|
||||||
|
"format"
|
||||||
|
"function"
|
||||||
|
"goto"
|
||||||
|
"include"
|
||||||
|
"interface"
|
||||||
|
"module"
|
||||||
|
"parameter"
|
||||||
|
"print"
|
||||||
|
"program"
|
||||||
|
"read"
|
||||||
|
"return"
|
||||||
|
"stop"
|
||||||
|
"subroutine"
|
||||||
|
"use"
|
||||||
|
"write"
|
||||||
|
"implicit"
|
||||||
|
(none)
|
||||||
|
(default)
|
||||||
|
(procedure_qualifier)
|
||||||
|
(private_statement)
|
||||||
|
(public_statement)
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"if"
|
||||||
|
"then"
|
||||||
|
"else"
|
||||||
|
"elseif"
|
||||||
|
"endif"
|
||||||
|
] @conditional
|
||||||
|
|
||||||
|
[
|
||||||
|
"do"
|
||||||
|
"enddo"
|
||||||
|
"while"
|
||||||
|
"forall"
|
||||||
|
] @repeat
|
||||||
|
|
||||||
|
[
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
"<="
|
||||||
|
">="
|
||||||
|
"=="
|
||||||
|
"/="
|
||||||
|
] @keyword.operator
|
||||||
|
|
||||||
|
; ;; Brackets
|
||||||
|
; [
|
||||||
|
; "("
|
||||||
|
; ")"
|
||||||
|
; "["
|
||||||
|
; "]"
|
||||||
|
; ] @punctuation.bracket
|
||||||
Loading…
Add table
Add a link
Reference in a new issue