Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: helix-editor/helix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: JordanForks/helix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 29, 2024

  1. Update html grammar to the latest version

    The version used here is extremely old and fails to compile on Linux due
    to conflicts with other parsers.
    
    The bug in question was fixed in:
    tree-sitter/tree-sitter-html@e5d7d7d.
    w4 committed Sep 29, 2024
    Copy the full SHA
    d4baf39 View commit details

Commits on Sep 30, 2024

  1. Bump version of tree-sitter-java

    w4 committed Sep 30, 2024
    Copy the full SHA
    1603715 View commit details
Showing with 24 additions and 102 deletions.
  1. +2 −2 languages.toml
  2. +22 −100 runtime/queries/java/highlights.scm
4 changes: 2 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
@@ -845,7 +845,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "html"
source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "29f53d8f4f2335e61bf6418ab8958dac3282077a" }
source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "14bdaf0da9e26e2de9b30178c2242539d2b0b285" }

[[language]]
name = "python"
@@ -1159,7 +1159,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "java"
source = { git = "https://github.com/tree-sitter/tree-sitter-java", rev = "09d650def6cdf7f479f4b78f595e9ef5b58ce31e" }
source = { git = "https://github.com/tree-sitter/tree-sitter-java", rev = "245b05c6ba900fa708242835f6168ef76f9d951e" }

[[language]]
name = "smali"
122 changes: 22 additions & 100 deletions runtime/queries/java/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
; Variables

(identifier) @variable

; Methods

(method_declaration
@@ -13,14 +17,16 @@
(marker_annotation
name: (identifier) @attribute)

"@" @operator

; Types

(type_identifier) @type

(interface_declaration
name: (identifier) @type)
(class_declaration
name: (identifier) @type)
(record_declaration
name: (identifier) @type)
(enum_declaration
name: (identifier) @type)

@@ -30,13 +36,15 @@
((scoped_identifier
scope: (identifier) @type)
(#match? @type "^[A-Z]"))
((method_invocation
object: (identifier) @type)
(#match? @type "^[A-Z]"))
((method_reference
. (identifier) @type)
(#match? @type "^[A-Z]"))

(constructor_declaration
name: (identifier) @type)
(compact_constructor_declaration
name: (identifier) @type)

(type_identifier) @type

[
(boolean_type)
@@ -46,15 +54,12 @@
(void_type)
] @type.builtin

(type_arguments
(wildcard "?" @type.builtin))

; Variables
; Constants

((identifier) @constant
(#match? @constant "^_*[A-Z][A-Z\\d_]+$"))

(identifier) @variable
; Builtins

(this) @variable.builtin

@@ -64,107 +69,26 @@
(hex_integer_literal)
(decimal_integer_literal)
(octal_integer_literal)
(binary_integer_literal)
] @constant.numeric.integer

[
(decimal_floating_point_literal)
(hex_floating_point_literal)
] @constant.numeric.float

(character_literal) @constant.character
] @number

[
(character_literal)
(string_literal)
(text_block)
] @string
(escape_sequence) @string.escape

[
(true)
(false)
(null_literal)
] @constant.builtin

(line_comment) @comment
(block_comment) @comment

; Punctuation

[
"::"
"."
";"
","
] @punctuation.delimiter

[
"@"
"..."
] @punctuation.special

[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket

(type_arguments
[
"<"
">"
] @punctuation.bracket)

(type_parameters
[
"<"
">"
] @punctuation.bracket)

; Operators

[
"="
">"
"<"
"!"
"~"
"?"
":"
"->"
"=="
">="
"<="
"!="
"&&"
"||"
"++"
"--"
"+"
"-"
"*"
"/"
"&"
"|"
"^"
"%"
"<<"
">>"
">>>"
"+="
"-="
"*="
"/="
"&="
"|="
"^="
"%="
"<<="
">>="
">>>="
] @operator
(line_comment)
(block_comment)
] @comment

; Keywords

@@ -197,7 +121,6 @@
"open"
"opens"
"package"
"permits"
"private"
"protected"
"provides"
@@ -220,5 +143,4 @@
"volatile"
"while"
"with"
"yield"
] @keyword