Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ ext-build:
# Format all code
fmt:
cargo fmt --all
ts_query_ls format languages

# Run clippy on both crates
clippy:
cargo clippy --all-targets --fix --allow-dirty
cd proxy && cargo clippy --all-targets --fix --allow-dirty --target {{ native_target }}

# Build everything: fmt, clippy, extension, proxy install
all: fmt clippy ext-build proxy-install
# Format and lint all code
lint: fmt clippy

# Build everything: lint, extension, proxy install
all: lint ext-build proxy-install
23 changes: 17 additions & 6 deletions languages/java/brackets.scm
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
("{" @open "}" @close)
("[" @open "]" @close)
("(" @open ")" @close)
("<" @open ">" @close)
("\"" @open "\"" @close)
("\"\"\"" @open "\"\"\"" @close)
("{" @open
"}" @close)

("[" @open
"]" @close)

("(" @open
")" @close)

("<" @open
">" @close)

("\"" @open
"\"" @close)

("\"\"\"" @open
"\"\"\"" @close)
5 changes: 2 additions & 3 deletions languages/java/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@

; Fields
(field_declaration
declarator:
(variable_declarator
name: (identifier) @property))
declarator: (variable_declarator
name: (identifier) @property))

(field_access
field: (identifier) @property)
Expand Down
14 changes: 11 additions & 3 deletions languages/java/indents.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
(_ "{" "}" @end) @indent
(_ "[" "]" @end) @indent
(_ "(" ")" @end) @indent
(_
"{"
"}" @end) @indent

(_
"["
"]" @end) @indent

(_
"("
")" @end) @indent
14 changes: 6 additions & 8 deletions languages/java/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@

((method_invocation
name: (identifier) @_method
arguments:
(argument_list
arguments: (argument_list
.
(string_literal
.
(string_literal
.
(_) @injection.content)))
(_) @injection.content)))
(#any-of? @_method "format" "printf")
(#set! injection.language "printf"))

((method_invocation
object:
(string_literal
(string_fragment) @injection.content)
object: (string_literal
(string_fragment) @injection.content)
name: (identifier) @_method)
(#eq? @_method "formatted")
(#set! injection.language "printf"))
10 changes: 4 additions & 6 deletions languages/java/locals.scm
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@
name: (identifier) @local.definition.method)

(local_variable_declaration
declarator:
(variable_declarator
name: (identifier) @local.definition.var))
declarator: (variable_declarator
name: (identifier) @local.definition.var))

(enhanced_for_statement
; for (var item : items) {
Expand All @@ -92,9 +91,8 @@
(#has-ancestor? @local.definition.import import_declaration))

(field_declaration
declarator:
(variable_declarator
name: (identifier) @local.definition.field))
declarator: (variable_declarator
name: (identifier) @local.definition.field))

; REFERENCES
(identifier) @local.reference
Expand Down
Loading
Loading