Skip to content

Function Naming

Sidekick can suggest names for functions based on the function content. The suggested names tend to be better when the quality of information contained in the function is higher. Sidekick supports the following operations for suggesting names for functions:

  • Request for Specific Suggestion Type
  • General for General Suggestion

Request for Specific Suggestion Type

To name the current function using this method, perform the following actions:

  • Select Suggest Function Name from the hamburger menu in the Sidekick Suggestions sidebar, or select Suggest Function Name for Current Function from the Plugins->Sidekick main menu
  • Right-click on the suggestion for function name and select Apply

Request for General Suggestion Types

As a result of requesting general suggestions for the current function, Sidekick may generate a suggestion to name the current function or name callees in the current function. To apply these naming suggestions, right-click on the suggestion and select Apply.

Note: If the suggestion to name callees is applied, the naming operation follows the process described here.

How to customize it

The sidekick.suggestions.function_naming_convention setting controls the naming convention. The following options are available:

Value Description
any Use whatever names are generated by the model.
snake Formats the variable name as snake_case.
camel Formats the variable name as camelCase.
pascal Formats the variable name as PascalCase.