zed-industries / extensions

Extensions for the Zed editor
926 stars 411 forks source link

Syntax recognition gradle #801

Open Angelk90 opened 5 months ago

Angelk90 commented 5 months ago

Check for existing issues

Misc notes

Vscode:

Screenshot 2024-05-28 alle 20 26 44

Zed:

Screenshot 2024-05-28 alle 20 26 50

Possible example of highlights.scm:

;; highlights.scm for Gradle files
(module
  (gradle
    ((assignment
      name: (identifier) @variable
      value: (string) @string)

     (section
      name: (identifier) @function
      body: (block (expression) @block))

     (block
      (expression (identifier) @method))

     (method_call
      name: (identifier) @function.call
      arguments: (argument_list (string) @string))

     (variable_definition
      name: (identifier) @variable.builtin)

     (literal
      (integer) @number
      (float) @number
      (string) @string))))
jovezhong commented 1 month ago

I noticed there is an extension at https://github.com/Asrat001/Zed-gradle

Angelk90 commented 1 month ago

@jovezhong : @Asrat001 is not yet released in the official store so I can't install it and try it to tell you if it works.

jovezhong commented 1 month ago

I am also waiting for a built-in support for gradle file format. Not a blocking issue for sure

liushuai42 commented 1 week ago

@Angelk90 There's a Groovy language extension and which supports android's build.gradle files.