uvelichitel2021-03-11 01:28:17
uvelichitel, 2021-03-11 01:28:17

After Go1.16, how do you write Go sketches in vim?

After 1.16 modules became default. Accordingly, gopls(Go language server) only works with go.mod go.sum. I used to write sketches, just to see what the code is running in the $GOPATH/scratch tree and all the vim+gopls(show definition, autocompletion) conveniences worked. Now they don't work. Obviously gopls (Go's language server protocol implementation) wants to see go.mod. What is it, to start a separate module for each draft? Am I just uncomfortable or how do you deal with it? Suggest best practices.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Alexander Pavlyuk, 2021-03-11

I just have one go.mod for all drafts, which I copy.
module temp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question