aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-04-18 02:17:56 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2021-04-23 16:03:18 +0200
commit88e8eefb2d9c6a60e34419f2a07c428c937536d6 (patch)
tree6a1e747aefb5c46686bcbe70a2921034c5b6a44c
parentAdd Fortran queries from @oponkork (diff)
downloadnvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar.gz
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar.bz2
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar.lz
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar.xz
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.tar.zst
nvim-treesitter-88e8eefb2d9c6a60e34419f2a07c428c937536d6.zip
highlights(fortran): extend queries
-rw-r--r--queries/fortran/highlights.scm84
1 files changed, 64 insertions, 20 deletions
diff --git a/queries/fortran/highlights.scm b/queries/fortran/highlights.scm
index e31981efa..05b10a7a9 100644
--- a/queries/fortran/highlights.scm
+++ b/queries/fortran/highlights.scm
@@ -1,4 +1,4 @@
-;; by @oponkork
+;; by @oponkork with extensions by @theHamsta
(identifier) @variable
(string_literal) @string
@@ -24,39 +24,48 @@
] @type
[
- "bind"
- "call"
+ "module"
+ "endmodule"
"contains"
- "continue"
- "cycle"
+ "public"
+ "private"
+] @include
+
+[
+"implicit"
+(none)
+] @annotation
+
+[
+ "function"
"endfunction"
- "endmodule"
"endprogram"
+ "subroutine"
"endsubroutine"
+] @keyword.function
+
+[
+ "bind"
+ "call"
+ "continue"
+ "cycle"
"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
[
@@ -75,18 +84,53 @@
] @repeat
[
+ "*"
+ "+"
+ "-"
+ "/"
+ "="
"<"
">"
"<="
">="
"=="
"/="
+] @operator
+
+[
+ "\\.and\\."
+ "\\.or\\."
+ "\\.lt\\."
+ "\\.gt\\."
+ "\\.ge\\."
+ "\\.le\\."
+ "\\.eq\\."
+ "\\.eqv\\."
+ "\\.neqv\\."
] @keyword.operator
-; ;; Brackets
-; [
-; "("
-; ")"
-; "["
-; "]"
-; ] @punctuation.bracket
+ ;; Brackets
+ [
+ "("
+ ")"
+ "["
+ "]"
+ ] @punctuation.bracket
+
+ ;; Delimiter
+ [
+ "::"
+ ","
+ ] @punctuation.bracket
+
+(parameters
+ (identifier) @parameter)
+
+(subroutine_statement
+ (name) @function)
+
+(subroutine_call
+ (name) @function)
+
+(module_statement
+ (name) @namespace)