diff options
| author | oponkork <oponkork@tutanota.com> | 2021-05-21 07:49:14 +0530 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-05-23 10:23:49 +0200 |
| commit | 6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953 (patch) | |
| tree | 369105d09d444e5aae98eb116ee830f48b34c7ec /queries/fortran | |
| parent | HTML: remove `@combined` from injections (diff) | |
| download | nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar.gz nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar.bz2 nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar.lz nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar.xz nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.tar.zst nvim-treesitter-6b6bf4db3fed12166a02f3bcdbfdf24ff4b49953.zip | |
feat(fortran): Improve highlighting
Diffstat (limited to 'queries/fortran')
| -rw-r--r-- | queries/fortran/highlights.scm | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/queries/fortran/highlights.scm b/queries/fortran/highlights.scm index 140ab982c..846c25842 100644 --- a/queries/fortran/highlights.scm +++ b/queries/fortran/highlights.scm @@ -1,5 +1,3 @@ -;; by @oponkork with extensions by @theHamsta - (identifier) @variable (string_literal) @string (number_literal) @number @@ -8,7 +6,6 @@ [ (intrinsic_type) - ; (primitive_type_qualifier) "dimension" "intent" "in" @@ -21,11 +18,10 @@ "device" "host" "grid_global" + "pointer" ] @type [ - "module" - "endmodule" "contains" "public" "private" @@ -45,8 +41,11 @@ ] @keyword.function [ + "module" + "endmodule" "bind" "call" + "class" "continue" "cycle" "enumerator" @@ -56,14 +55,20 @@ "goto" "include" "interface" + "endinterface" + "only" "parameter" + "procedure" "print" "program" + "endprogram" "read" "return" "stop" "use" "write" + "enum" + "endenum" (default) (procedure_qualifier) ] @keyword @@ -74,6 +79,8 @@ "else" "elseif" "endif" + "where" + "endwhere" ] @conditional [ @@ -121,16 +128,41 @@ [ "::" "," - ] @punctuation.bracket + "%" + ] @punctuation.delimiter (parameters (identifier) @parameter) +(program_statement + (name) @namespace) + +(module_statement + (name) @namespace) + +(function_statement + (name) @function) + (subroutine_statement (name) @function) +(end_program_statement + (name) @namespace) + +(end_module_statement + (name) @namespace) + +(end_function_statement + (name) @function) + +(end_subroutine_statement + (name) @function) + (subroutine_call (name) @function) -(module_statement - (name) @namespace) +(keyword_argument + name: (identifier) @keyword) + +(derived_type_member_expression + (type_member) @property) |
