chore: sync highlights back with nvim-treesitter (#148)

pull/481/head
Chris Kipp 2023-01-15 12:16:57 +07:00 committed by GitHub
parent 73d5a6680c
commit b49a1fca34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 27 deletions

@ -1,22 +1,22 @@
; CREDITS @stumash (stuart.mashaal@gmail.com)
(class_definition
name: (identifier) @type.definition)
name: (identifier) @type)
(enum_definition
name: (identifier) @type.definition)
name: (identifier) @type)
(object_definition
name: (identifier) @type.definition)
name: (identifier) @type)
(trait_definition
name: (identifier) @type.definition)
name: (identifier) @type)
(full_enum_case
name: (identifier) @type.definition)
name: (identifier) @type)
(simple_enum_case
name: (identifier) @type.definition)
name: (identifier) @type)
;; variables
@ -96,8 +96,6 @@
(generic_function
function: (identifier) @function.call)
;; I think this is broken
; function definitions
(function_definition
@ -111,7 +109,6 @@
; expressions
(field_expression field: (identifier) @property)
(field_expression value: (identifier) @type
(#lua-match? @type "^[A-Z]"))
@ -161,6 +158,7 @@
"var"
"with"
"given"
"using"
"end"
"implicit"
"extension"
@ -170,18 +168,13 @@
[
"abstract"
"final"
"using"
"lazy"
"sealed"
] @type.qualifier
(inline_modifier) @storageclass
[
"private"
"protected"
] @storageclass
] @type.qualifier
(inline_modifier) @storageclass
(null_literal) @constant.builtin

@ -1,6 +1,6 @@
object Hello {
// ^ keyword
// ^ type.definition
// ^ type
val x = if (true) (25 * 1.0) else "hello"
// ^keyword
// ^variable
@ -17,7 +17,7 @@ object Hello {
trait Test {
// ^ keyword
// ^ type.definition
// ^ type
def meth(i: Int)(implicit x: Boolean) = ???
// ^keyword.function
// ^keyword
@ -27,7 +27,7 @@ object Hello {
}
protected abstract class Bla(test: String)
// ^storageclass
// ^type.qualifier
// ^keyword
// ^type.qualifier
// ^parameter
@ -40,7 +40,7 @@ object Hello {
class A {
// ^ keyword
// ^ type.definition
// ^ type
self: X =>
// ^constant
// ^type

@ -1,7 +1,7 @@
// Optional braces syntax
class C:
// ^keyword
// ^type.definition
// ^type
def test(aaaa: A): Int =
//^keyword.function
@ -17,7 +17,7 @@ class C:
object O1:
//^keyword
// ^type.definition
// ^type
def test: Unit = ()
//^keyword.function
@ -63,16 +63,16 @@ enum Test(a: Int) derives Codec:
// ^type
// ^keyword
// ^type
// ^type.definition
// ^type
// ^parameter
case Test(b: String)
// ^keyword
// ^type
// ^type.definition
// ^type
// ^parameter
case Hello, Bla
// ^type.definition
// ^type.definition
// ^type
// ^type
case Bla extends Test(256)
// ^keyword
@ -98,7 +98,7 @@ inline given Test = new Test {
object A:
// ^ keyword
// ^type.definition
// ^type
::(123)
//^function.call