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

Sublime Text 3 plugin usage #473

Closed
jostyee opened this issue Sep 13, 2017 · 4 comments
Closed

Sublime Text 3 plugin usage #473

jostyee opened this issue Sep 13, 2017 · 4 comments

Comments

@jostyee
Copy link

jostyee commented Sep 13, 2017

Hi,
I'm on a Mac and have no idea how to use this plugin, tried to copy the subl3 folder to ~/Library/Application Support/Sublime Text 3/Packages , restart ST3, got a reloading plugin gocode.gocode message, but it doesn't look like working properly, There's no command palette, no auto popup after inputting a ., and triggering it by hotkey the popup window shows lots of messy stuffs.
screen shot 2017-09-13 at 11 56 04 pm

console log has error:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/yee/Library/Application Support/Sublime Text 3/Packages/gocode/gocode.py", line 132, in on_query_completions
    stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'gocode'
using gpu buffer for window
Unable to open /Users/yee/Library/Application Support/Sublime Text 3/Packages/Default/Preferences.sublime-settings
using gpu buffer for window
Unable to open /Users/yee/Library/Application Support/Sublime Text 3/Packages/Default/Default (OSX).sublime-keymap
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/yee/Library/Application Support/Sublime Text 3/Packages/gocode/gocode.py", line 132, in on_query_completions
    stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'gocode'

I've already go get gocode:

which gocode
/Users/yee/dev/go/bin/gocode

So I wonder how to make this plugin working, should I start gocode process by hand first? Thanks in advance.

@nsf
Copy link
Owner

nsf commented Sep 13, 2017

If "which" shows the gocode it only means there are correct enviornment variables in your shell. But you also need to add them to your text editor. Google it. Not sure if that's how you do it: https://packagecontrol.io/packages/Environment%20Settings

On my machine I set it for the whole system. X11 is started by shell and shell has the right env vars set. Don't know how to do it on mac.

@jostyee
Copy link
Author

jostyee commented Sep 14, 2017

@nsf Thanks you for responding, I've modified the gocode.py, reading gocode path via sublime-config and it's working now.

@jostyee jostyee closed this as completed Sep 14, 2017
@wsszh
Copy link

wsszh commented Oct 26, 2018

Hi, could you please tell me how you modified the gocode.py? I have the same problem. @jostyee

@jostyee
Copy link
Author

jostyee commented Dec 25, 2018

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

3 participants