GoLand plugin for highlighting gorm-gen SQL written as Go line comments before mapper methods.
The plugin injects the IDE SQL language into consecutive // comment blocks that start with a SQL keyword, for example:
//select *
//from activity_company_info
//where store_id = @storeId
ListByStoreId(storeId string) ([]*custom.ActivityCompanyInfo, error)./gradlew buildPluginThe built plugin ZIP is created under build/distributions/.
By default the Gradle build uses the local GoLand installation at /Applications/GoLand.app. Override it if needed:
./gradlew buildPlugin -PlocalIdePath=/path/to/GoLand.app./gradlew runIdeOpen a mapper file such as sales-trade/cmd/ormgen/activity_company_info_mapper.go in the sandbox IDE and the SQL comment block should be highlighted as SQL.