Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang Config (golangconfig) integration #11

Closed
miquella opened this issue Aug 23, 2019 · 3 comments
Closed

Golang Config (golangconfig) integration #11

miquella opened this issue Aug 23, 2019 · 3 comments

Comments

@miquella
Copy link

With how far GoSublime has languished, I was (and remain!) very excited to try your plugin!

Unfortunately, my Go toolchain is installed to a non-standard location, so the plugin fails to find it. But then I realized that some of the other Go plugins I use were detecting it just fine. 😕

That's when I remembered about the official plugin for Sublime Text called Golang Config that helps auto-detect Go environments! It invokes your login shell to pull in your PATH, GOPATH, and any other environment variables you have set.

From the project's own description:

golangconfig is a Sublime Text dependency designed to be a common API for configuration of Go environment variables. It is intended to be used by any and all Go-related Sublime Text packages in an effort to help reduce duplication of user configuration.

Would integration with that package be something you might consider? It would likely need to be added through a dependencies.json file. I plan to make such an attempt if I can find some free time in the next few weeks. 😄

@miquella miquella changed the title golangconfig integration Golang Config (golangconfig) integration Aug 23, 2019
@yields
Copy link
Owner

yields commented Aug 24, 2019

Glad you're interested in the project Mark!

Yeah, one of the goals of this project is to simplify Golang integration with ST3 by figuring out the environment for you, (no configuration madness/timeouts etc..).

The project you linked to seems interesting, but I'm always suspicious of adding dependencies, they always seem beneficial but can also add needless complexity, my goal is a single install that just works, I don't want users to know what golangconfig is and deal with dependency issues.

That said, I believe we can learn from Golangconfig and simplify configuration for users, can you tell me more about what your environment looks like? specifically, can go(1) binary be found from your sublime text $PATH?

BTW, with regular software, I have nothing against dependencies, but when it comes to a background tool I use daily (such as a language plugin), I just want to reduce the risk of breakage.

@miquella
Copy link
Author

I apologize for the delayed response. Apparently the month has gotten away from me!

Wholehearted agreement regarding the goal of simplicity and great defaults. These are some of the core reasons why I continue to stick with Sublime Text year after year!

As all dependencies add complexity, each must be carefully considered before accepting it into a project. A very healthy approach that is often skirted. To that end, I considered very carefully before suggesting adoption of golangconfig 😄

My confidence in the project was primarily garnered by two facts:

  • The project is hosted under the official golang GitHub organization.
  • The implementation was done by Will Bond who now works for SublimeHQ.

But I am still more than happy to further describe my environment!

The go binary is installed via Linuxbrew (part of the Homebrew project) and is installed to /home/linuxbrew/.linuxbrew/bin/.

Unfortunately, that directory is not included in Sublime Text's $PATH when launched by GNOME Shell.

However, the directory is included in my login shell's $PATH. This is actually how golangconfig is picking it up. It invokes the login shell to scrape additional directories added to the $PATH by rc scripts.

Happy to provide any other information you think would be helpful!

@yields yields mentioned this issue Apr 5, 2020
@yields
Copy link
Owner

yields commented Apr 18, 2020

@miquella I've added a simple setting that allows you to set the go root, feel free to re-open if that doesn't work for you :)

@yields yields closed this as completed Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants