These are chat archives for nelsam/vidar

18th
Oct 2016
Samuel Nelson
@nelsam
Oct 18 2016 00:54

@Kvaz1r That would be ideal, but maybe difficult. I haven't had a chance to see how hard it is to move the suggestion provider to commands, yet. For now, I would recommend:

  1. Update NewGoCodeProvider so that instead of taking gopath string as an argument, it takes environ []string as an argument and stores that in a field.
  2. In SuggestionAt, set cmd.Env = p.environ.
  3. In the calls to Open in the TabbedEditor and SplitEditor, take in the environ []string and pass it to the GoCodeProvider.
  4. In the Open method on the ProjectEditor, pass in the p.project.Environ() as the environ argument.

I think that this solution will work on OS X, linux, and Windows, and it won't take ages. Long term, I'd like the GoCodeProvider to go away and instead have a commands.GoCode which does all this; but that's a difficult thing to do right now.

Kvaz1r
@Kvaz1r
Oct 18 2016 14:23
I followed this recomendations and updated the PR. Thanks for the help.