diff --git a/languages.toml b/languages.toml index ec95725f..75442307 100644 --- a/languages.toml +++ b/languages.toml @@ -3880,7 +3880,7 @@ language-servers = ["fsharp-ls"] [[grammar]] name = "fsharp" -source = { git = "https://github.com/ionide/tree-sitter-fsharp", rev = "996ea9982bd4e490029f84682016b6793940113b" } +source = { git = "https://github.com/ionide/tree-sitter-fsharp", rev = "cfc12456941da47b64b7a3994f8dccdc9fe7d2c9", subpath = "fsharp" } [[language]] name = "t32" diff --git a/runtime/queries/fsharp/highlights.scm b/runtime/queries/fsharp/highlights.scm index 43905c88..48441034 100644 --- a/runtime/queries/fsharp/highlights.scm +++ b/runtime/queries/fsharp/highlights.scm @@ -15,7 +15,7 @@ (primary_constr_args (_) @variable.parameter) -((identifier_pattern (long_identifier (identifier) @special)) +((identifier_pattern (long_identifier_or_op (identifier) @special)) (#match? @special "^\_.*")) ((long_identifier @@ -30,10 +30,13 @@ (type_name type_name: (_) @type) +; The generic `type` node was split into concrete type nodes; colour named +; type references (simple_type) and the head of a generic application. [ - (type) + (simple_type) (atomic_type) ] @type +(generic_type (long_identifier) @type) (member_signature . @@ -300,8 +303,6 @@ "in" "do" "do!" - "event" - "field" "fun" "function" "get" @@ -309,8 +310,6 @@ "lazy" "new" "of" - "param" - "property" "struct" "val" "module" @@ -324,7 +323,7 @@ (match_expression "with" @keyword.control.conditional) -((type +((simple_type (long_identifier (identifier) @type.builtin)) (#any-of? @type.builtin "bool" "byte" "sbyte" "int16" "uint16" "int" "uint" "int64" "uint64" "nativeint" "unativeint" "decimal" "float" "double" "float32" "single" "char" "string" "unit")) diff --git a/runtime/queries/fsharp/injections.scm b/runtime/queries/fsharp/injections.scm index 54b89c5a..2d7d3432 100644 --- a/runtime/queries/fsharp/injections.scm +++ b/runtime/queries/fsharp/injections.scm @@ -4,5 +4,5 @@ ] @injection.content (#set! injection.language "comment")) -((xml_doc (xml_doc_content) @injection.content) +((xml_doc) @injection.content (#set! injection.language "xml"))