I open the vscode language server gopls
. And use Format Tool default
(because prompts said others are not applicable when language server is enabled).
and config set:
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
but my code imports are:
import (
"net/http"
"private.com/error"
"github.com/gin-gonic/gin"
)
When I save it, it doesn't add blank line between private.com/error
and github.com/gin-gonic/gin
automatically, even though the vscode prompts it
How can I set it, it will organize import automatically ?