Skip to content

Change function support for golang #3

Description

@abhipranay

Thanks for the plugin. Can you please share steps how I can extend the plugin for golang.
I tried to read the readme but couldn't figure out exactly what is needed to add any new language support.

I tried to add below queries to identify simple functions and their parameters.

I have below simple code. I want to change order of parameters of the function A.

func A(p1 int, p2 string) {
	fmt.Println("hello")
}

func main() {
	A(1, "2")
}
(call_expression
  function: (identifier) @function
  arguments: (argument_list (_) @argument.inner)
)

(function_declaration
  name: (identifier)
  parameters: (parameter_list (_) @parameter.inner)
)

(call_expression
  function: (selector_expression 
              field: (field_identifier) @method
              )
  arguments: (argument_list (_) @argument.inner)
)

I can see the popup and parameters are identified properly.
image

But when i Confirm in dialog nothing happens.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions