I have this go
code snippet that I am working on in vim with vim-go
enabled. |
is where my cursor is at.
// PlayerServer is a HTTP interface for player information
type PlayerServer struct {
store PlayerStore |
router *http.ServeMux
}
When I hit return, the cursor goes 8 spaces indented in the next line.
// PlayerServer is a HTTP interface for player information
type PlayerServer struct {
store PlayerStore
|
router *http.ServeMux
}
What setting should I be looking at to see what causes this?
:set filetype?
say? Is the file correctly recognized as Go source code? What about:set indentexpr?
, does it match the Go plug-in you're using? (Just making sure everything is as expected to be in your environment.) Feel free to answer these with edits to your question.filetype plugin indent on
. That solved the issue. Thanks a bunch! If you add that as an answer I'd be happy to mark it solved.