gopls supports custom configs, either global or for each workspace folder: https://github.com/golang/tools/blob/master/gopls/doc/user.md#settings These config values will probably be passed in as a JSON string or file.