A Golang plugin collection for SublimeText 3, providing code completion and other IDE-like features.

Overview

GoSublime Backers on Open Collective Sponsors on Open Collective Build Status

Intro

GoSublime is an IDE-like plugin for Sublime Text 3 mainly, but not limited to, providing integration for most of your Go/Golang development tools.

See https://margo.sh/b/hello-margo/ for a brief introduction to margo, the engine behind GoSublime.

Installation & Support

See https://margo.sh/b/migrate/ for instructions on how to install GoSublime.

See SUPPORT.md for details about what level of support you can expect while using GoSublime.

Features

  • code completion from Gocode (fork);
  • context aware snippets via the code-completion popup;
  • sublime build system(ctrl+b) integrating with GoSublime 9o command prompt with live command output;
  • lint/syntax check as you type or on save;
  • quickly jump to any linter error reported in any open file or package;
  • quickly fmt your source or automatically on save to conform with your coding standards;
  • easily create a new go file and run it without needing to save it first (9o replay);
  • share your snippets (anything in the loaded file) on play.golang.org;
  • list declarations in the current file or package;
  • automatically add/remove package imports;
  • quickly jump your import section(automatically goes to the last import) where you can easily edit the pkg alias and return to where you were before;
  • go to definition of a package function or constant, etc.;
  • create your own margo extensions in Go to e.g. add context-aware commands to the command palette.

Demo

Copyright, License & Contributors

margo and GoSublime are released under the MIT license. See LICENSE.md

Thanks to all the people who contribute. [Contribute].

Supporters

GoSublime has received support from many kind individuals and as a thank you I've added most to THANKS.md file as a way of saying Thank You. Some donors donated anonymously and so are not listed, however. If you have donated and would like to add an entry to this file, feel free to open a pull request.

Donations

See https://margo.sh/funding/ for ways in which you can help support future development of margo and GoSublime.


Become a backer or a sponsor on OpenCollective

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]


Comments
  • Code completion not working

    Code completion not working

    I am using bf2ead85bfddd7e442ae89ec4b332ae22fb9dbfd on go1.11beta2 (but also go1.10.3).

    Code completion brings up a list of words, some of which are possibly relevant, but the vast majority are not. These are entirely unrelated to the package or import context.

    Here is the console output, though I don't see anything useful here.

    DPI scale (detected): 1
    startup, version: 3175 linux x64 channel: dev
    executable: /opt/sublime_text/sublime_text
    working dir: /
    packages path: /home/userredacted/.config/sublime-text-3/Packages
    state path: /home/userredacted/.config/sublime-text-3/Local
    zip path: /opt/sublime_text/Packages
    zip path: /home/userredacted/.config/sublime-text-3/Installed Packages
    ignored_packages: ["Vintage"]
    pre session restore time: 0.07466
    loading dictionary Packages/Language - English/en_US.dic
    startup time: 0.162235
    first paint time: 0.178941
    reloading plugin Default.arithmetic
    reloading plugin Default.auto_indent_tag
    reloading plugin Default.block
    reloading plugin Default.colors
    reloading plugin Default.comment
    reloading plugin Default.convert_color_scheme
    reloading plugin Default.convert_syntax
    reloading plugin Default.copy_path
    reloading plugin Default.delete_word
    reloading plugin Default.detect_indentation
    reloading plugin Default.duplicate_line
    reloading plugin Default.echo
    reloading plugin Default.exec
    reloading plugin Default.fold
    reloading plugin Default.font
    reloading plugin Default.goto_line
    reloading plugin Default.history_list
    reloading plugin Default.indentation
    reloading plugin Default.install_package_control
    reloading plugin Default.kill_ring
    reloading plugin Default.mark
    reloading plugin Default.new_templates
    reloading plugin Default.open_context_url
    reloading plugin Default.open_in_browser
    reloading plugin Default.pane
    reloading plugin Default.paragraph
    reloading plugin Default.paste_from_history
    reloading plugin Default.profile
    reloading plugin Default.quick_panel
    reloading plugin Default.rename
    reloading plugin Default.run_syntax_tests
    reloading plugin Default.save_on_focus_lost
    reloading plugin Default.scroll
    reloading plugin Default.set_unsaved_view_name
    reloading plugin Default.settings
    reloading plugin Default.show_scope_name
    reloading plugin Default.side_bar
    reloading plugin Default.sort
    reloading plugin Default.swap_line
    reloading plugin Default.switch_file
    reloading plugin Default.symbol
    reloading plugin Default.transform
    reloading plugin Default.transpose
    reloading plugin Default.trim_trailing_white_space
    reloading plugin Default.ui
    reloading plugin CSS.css_completions
    reloading plugin Diff.diff
    reloading plugin HTML.encode_html_entities
    reloading plugin HTML.html_completions
    reloading plugin ShellScript.ShellScript
    reloading plugin 0_package_control_loader.00-package_control
    reloading plugin 0_package_control_loader.01-ssl-linux
    Package Control: Linux SSL: successfully loaded _ssl module for libssl.so.1.0.0
    Package Control: Linux SSL: unloading http module so ssl will be available
    Package Control: Linux SSL: unloading urllib module so ssl will be available
    reloading plugin 0_package_control_loader.02-bz2
    reloading plugin FileDiffs.file_diffs
    reloading plugin Find++.DirectoryPanel
    reloading plugin Find++.FindPlusPlus
    reloading plugin Git.git_commands
    reloading plugin GoTests.GoTests
    reloading plugin GoToTest.GoToTest
    reloading plugin Package Control.1_reloader
    reloading plugin Package Control.2_bootstrap
    reloading plugin Package Control.Package Control
    reloading plugin VCS Gutter.gutter_handlers
    reloading plugin VCS Gutter.vcs_gutter
    reloading plugin VCS Gutter.vcs_gutter_change
    reloading plugin VCS Gutter.vcs_gutter_events
    reloading plugin VCS Gutter.vcs_helpers
    reloading plugin VCS Gutter.view_collection
    reloading plugin GoSublime._after
    reloading plugin GoSublime._before
    reloading plugin GoSublime.GoSublime
    reloading plugin GoSublime.gs9o
    reloading plugin GoSublime.gscommands
    reloading plugin GoSublime.gscomplete
    reloading plugin GoSublime.gsdoc
    reloading plugin GoSublime.gsev
    reloading plugin GoSublime.gslint
    reloading plugin GoSublime.gspalette
    reloading plugin GoSublime.gstest
    reloading plugin GoSublime.margo_sublime
    reloading plugin LaTeXTools.01_reload_submodules
    reloading plugin LaTeXTools.02_temp_file_cleanup
    reloading plugin LaTeXTools.biblatex_crossref_completions
    reloading plugin LaTeXTools.biblatex_field_name_completions
    reloading plugin LaTeXTools.biblatex_name_completions
    reloading plugin LaTeXTools.biblatex_snippet_completions
    reloading plugin LaTeXTools.biblatex_syntax_listener
    reloading plugin LaTeXTools.change_environment
    reloading plugin LaTeXTools.create_mousemap
    reloading plugin LaTeXTools.delete_temp_files
    reloading plugin LaTeXTools.detect_spellcheck
    reloading plugin LaTeXTools.getRegion
    reloading plugin LaTeXTools.getTeXRoot
    reloading plugin LaTeXTools.jumpto_anywhere
    reloading plugin LaTeXTools.jumpto_tex_file
    reloading plugin LaTeXTools.jumpToPDF
    reloading plugin LaTeXTools.kpsewhich
    reloading plugin LaTeXTools.latex_cite_completions
    reloading plugin LaTeXTools.latex_cwl_completions
    reloading plugin LaTeXTools.latex_env_completions
    reloading plugin LaTeXTools.latex_fill_all
    reloading plugin LaTeXTools.latex_input_completions
    reloading plugin LaTeXTools.latex_installed_packages
    reloading plugin LaTeXTools.latex_own_command_completions
    reloading plugin LaTeXTools.latex_ref_completions
    reloading plugin LaTeXTools.latexCommand
    reloading plugin LaTeXTools.latexDocumentationViewer
    reloading plugin LaTeXTools.latexEnvCloser
    reloading plugin LaTeXTools.latexEnvironment
    reloading plugin LaTeXTools.latextools_default_settings
    reloading plugin LaTeXTools.latextools_plugin
    reloading plugin LaTeXTools.makePDF
    reloading plugin LaTeXTools.migrate
    reloading plugin LaTeXTools.parseTeXlog
    reloading plugin LaTeXTools.texcount
    reloading plugin LaTeXTools.texMacro
    reloading plugin LaTeXTools.texSections
    reloading plugin LaTeXTools.texSyntaxListener
    reloading plugin LaTeXTools.toggle_auto
    reloading plugin LaTeXTools.toggle_focus
    reloading plugin LaTeXTools.toggle_fwdsync
    reloading plugin LaTeXTools.toggle_show
    reloading plugin LaTeXTools.toggle_view_on_build
    reloading plugin PlainTasks.PlainTasks
    reloading plugin PlainTasks.PlainTasksDates
    reloading plugin PlainTasks.PlainTasksToHTML
    reloading plugin PlainTasks.plist_parser
    plugins loaded
    Loading LaTeXTools plugins...
    Loaded LaTeXTools plugins ['base_viewer'] from path /home/userredacted/.config/sublime-text-3/Packages/LaTeXTools/viewers/base_viewer.py
    Loaded LaTeXTools plugins ['zathura_viewer', 'evince_viewer', 'okular_viewer', 'sumatra_viewer', 'preview_viewer', 'command_viewer', 'skim_viewer'] from path /home/userredacted/.config/sublime-text-3/Packages/LaTeXTools/viewers
    Loaded LaTeXTools plugins [] from path /home/userredacted/.config/sublime-text-3/Packages/User
    Loaded LaTeXTools plugins ['pdf_builder'] from path /home/userredacted/.config/sublime-text-3/Packages/LaTeXTools/builders/pdfBuilder.py
    Loaded LaTeXTools plugins ['traditional_builder', 'simple_builder', 'script_builder', 'basic_builder'] from path /home/userredacted/.config/sublime-text-3/Packages/LaTeXTools/builders
    Loaded LaTeXTools plugins [] from path /home/userredacted/.config/sublime-text-3/Packages/User
    Loaded LaTeXTools plugins ['new_bibliography', 'traditional_bibliography'] from path /home/userredacted/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins
    Loaded LaTeXTools plugins [] from path /home/userredacted/.config/sublime-text-3/Packages/User
    GoSublime r18.05.19-1: _before.init()
    GoSublime r18.05.19-1: gs.init()
    GoSublime r18.05.19-1: sh.init()
    GoSublime r18.05.19-1 sh: using shell env GOPATH=/home/userredacted
    GoSublime r18.05.19-1 sh: using shell env GOROOT=/home/userredacted/go
    GoSublime r18.05.19-1 sh: using shell env PATH=/home/userredacted/bin:/home/userredacted/.config/sublime-text-3/Packages/GoSublime/bin:/home/userredacted/.config/sublime-text-3/Packages/User/GoSublime/bin:/home/userredacted/bin:/home/userredacted/src/perkeep.org/bin:/home/userredacted/go/bin:/home/userredacted/Development/android-studio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/usr/local/opt/go/bin
    GoSublime r18.05.19-1 sh: go version: `devel..c814ac4` (raw version string `devel +c814ac4 Thu Jul 19 21:30:27 2018 +0000`)
    GoSublime r18.05.19-1 sh: shell bootstrap took 0.067s
    GoSublime r18.05.19-1: margo.init()
    GoSublime r18.05.19-1: mg9.init()
    [22:18:03] margo: agent#007: starting
    GoSublime r18.05.19-1: _after.init()
    
    ** 2018-08-02 22:18:03.894940 **:
    GoSublime init r18.05.19-1 (0.002s)
    |   install margo: no
    |   install state: done
    | sublime.version: 3175
    | sublime.channel: dev
    |       about.ann: a18.07.17-1
    |   about.version: r18.05.19-1
    |         version: r18.05.19-1
    |        platform: linux-x64
    |            ~bin: ~/.config/sublime-text-3/Packages/User/GoSublime/linux-x64/bin
    |       margo.exe: ~bin/gosublime.margo_r18.05.19-1_devel..c814ac4.exe (ok)
    |          go.exe: ~/go/bin/go (ok)
    |      go.version: devel..c814ac4
    |          GOROOT: ~/go
    |          GOPATH: /home/userredacted
    |           GOBIN: (not set)
    |       set.shell: []
    |       env.shell: /bin/bash
    |       shell.cmd: ['/bin/bash', '-l', '-c', '${CMD}']
    |    sh.bootstrap: 
    |                > 	using shell env GOPATH=/home/userredacted
    |                > 	using shell env GOROOT=~/go
    |                > 	using shell env PATH=~/bin:~/.config/sublime-text-3/Packages/GoSublime/bin:~/.config/sublime-text-3/Packages/User/GoSublime/bin:~/bin:...yada yada....
    |                > 	go version: `devel..c814ac4` (raw version string `devel +c814ac4 Thu Jul 19 21:30:27 2018 +0000`)
    |                > 	shell bootstrap took 0.067s
    |                >
    --------------------------------
    
    [22:18:04] margo: agent#007: ['/home/userredacted/.config/sublime-text-3/Packages/GoSublime/bin/margo.sh', 'start', 'margo.sublime', '-codec', 'msgpack']
    [22:18:04] margo: agent#007: log: ``` go install -v -tags=margo -i margo.sh/cmd/margo.sublime ```
    [22:18:04] margo: agent#007: log: ``` /home/userredacted/.config/sublime-text-3/Packages/GoSublime/bin/margo.sublime -codec msgpack ```
    [22:18:04] margo: agent#007: log: store.go:137: started
    

    The values for GOPATH and GOROOT are correct.

    opened by kortschak 52
  • MarGo & Gocode

    MarGo & Gocode

    An issue to track the dependency and integration of MarGo and Gocode in GS

    • Why the update prompt keeps appearing when you restart ST2: It's designed to remind you to update gocode and MarGo. Most of the GS functionality is being pushed into MarGo (think gofmt, lint, doc, package imports, etc.). If MarGo has a breaking change and you update GS it will very likely have broken functionality until you update. It only appears if the CHANGELOG version string is different. In the future, instructions to install via git directly, It behaves slightly odd currently if you install manually because your settings don't contain a changelog version. Just choose the option to update and it will handle the rest. If it still appears after that then something probably went wrong so please file a bug report, including any errors in the console (ctrl+` (baktick) or ctrl+' (single quote)) and we can try to get to the bottom of it.
    STICKY 
    opened by DisposaBoy 52
  • autocomplete not working for local packages

    autocomplete not working for local packages

    I'm using ST3 on windows with the gosublime plugin. I'm developing an app engine application. Auto-complete works fine for packages from the standard library as well as from the app engine SDK. But it does not for local packages.

    I've gone through a couple of issues related to this topic but to no avail. Appreciate your help.

    Thanks, Keyur

    opened by keyurva 51
  • Code completion for appengine packages

    Code completion for appengine packages

    I've read all previous issues but none of the solutions work for me. I'll try to be as precise as possible.

    • My projects are in ~/gocode
    • App Engine is in ~/src/go_appengine
    • $GOPATH set in .bash_profile is ~/gocode/:~/src/go_appengine/goroot/

    I've made the following changes to the GoSublime User Settings in Sublime Text 2:

    {
            "shell": ["/bin/bash"],
            "env": {"GOPATH": "$HOME/gocode/:$HOME/src/go_appengine/goroot/"},
            "fmt_cmd": ["goimports"]
    }
    

    Unfortunately, code completion does not work. If I invoke the documentation hints via Cmd-. + Cmd-h, I do get help hints even for appengine packages. E.g. if the cursor is anywhere within appengine.NewContext() and I press Cmd-. + Cmd-h I do get

    // appengine.NewContext func
    //
    // NewContext returns a context for an in-flight HTTP request.
    // Repeated calls will return the same value.
    func NewContext(req *http.Request) Context {
        return appengine_internal.NewContext(req)
    }
    

    Don't know whether this helps or means anything, but I'd love to get this resolved.

    opened by ralfr 40
  • Fixes #114 - Integrate GoRename command

    Fixes #114 - Integrate GoRename command

    Refs #114

    I've added a GsGorename command that uses gorename for either currently selection or the expanded word under the cursor.

    The check for a dirty file has been left disabled, as I am not sure if it should be prevented or not. Also, I have not yet given it a key mapping since all the good ones are taken :-)

    opened by justinfx 36
  • [Feature Request] Integrate bradfitz/goimports

    [Feature Request] Integrate bradfitz/goimports

    bradfitz/goimports is a replacement for gofmt that adds/removes standard library imports. I have been using it for a long time (from emacs) and it works great.

    Might you consider integrating that, or is there an easy way to accomplish that replacement for end-users?

    Thanks!

    opened by robfig 34
  • Infinite loop of reinstalling standard library packages

    Infinite loop of reinstalling standard library packages

    I noticed my laptop getting warm this evening whilst writing some go code.

    htop shows gosublime.margo_r14.12.06-1_go?.exe repeatedly running go install on all of the packages I've imported in my program! It's generating a system load greater than 1 and making my fan spin all evening.

    It seems like an infinite loop of go install bufio, go install io, go install ....

    Is there a quick fix to stop this? I rely on gosublime!

    opened by pwaller 28
  • MarGo: Can't find the MarGo binary at `C:\Users\...

    MarGo: Can't find the MarGo binary at `C:\Users\...

    MarGo: Cannot start MarGo: Can't find the MarGo binary at C:\Users\Wing7\AppData\Roaming\Sublime Text 2\Packages\User\GoSublime\windows-x64\bin\gosublime.margo_r13.06.22-1_go1.1.1.exe

    I can't find the exe in such folder, what should i do? the GoSublime init info has below:

    GoSublime init r13.06.22-1 (0.583s) | install margo: ok 0.570s | install state: done | sublime.version: 2217 | sublime.channel: stable | about.ann: a13.06.22-1 | about.version: r13.06.22-1 | version: r13.06.22-1 | platform: windows-x64 | ~bin: ~\AppData\Roaming\Sublime Text 2\Packages\User\GoSublime\windows-x64\bin | margo.exe: ~bin\gosublime.margo_r13.06.22-1_go1.1.1.exe (missing) | go.exe: E:\Go\bin\go.exe (ok) | go.version: go1.1.1 | GOROOT: E:\Go
    | GOPATH: D:\Work\go\src\github.com\wingao | GOBIN: E:\Go\bin (should usually be (not set)) | set.shell: [] | env.shell: | shell.cmd: ['C:\Windows\system32\cmd.exe', '/C', '${CMD}']

    opened by WingGao 24
  • goimports doesn't run automatically on save

    goimports doesn't run automatically on save

    Hi, I'm having trouble running goimports automatically when I save a file on Sublime Text 3. It doesn't auto format (gofmt) or do any goimports tasks.

    Hi, I've installed correctly GoSublime + goimports

    which goimports
    /Users/fabrice/workspace/Go/bin/goimports
    

    I've also set correctly my GOPATH and PATH :

    echo $GOPATH
    /Users/fabrice/workspace/Go
    

    I've set my GoSublime custom config like that :

    {
      "env": {
        "GOPATH": "/Users/fabrice/workspace/Go"
      },
      "fmt_cmd": ["goimports"]
    }
    

    Any advice?

    opened by fabdarice 23
  • GoSublime on saves not occurring - Margo Panic

    GoSublime on saves not occurring - Margo Panic

    None of the GoSublime onsave functionality appears to be working for me. Please find the GoSublime Sanity Check results attached:

    gosublime-sanity.txt

    opened by jhurwich 23
  • MarGo installation fails for snap packaged go 1.10

    MarGo installation fails for snap packaged go 1.10

    [23:41:29] margo: agent#007: log: run["go" "install" "-v" "-tags=margo" "-i" "disposa.blue/margo/cmd/margo.sublime"]
    [23:41:29] margo: agent#007: log: go install runtime/cgo: open /snap/go/2130/pkg/linux_amd64/runtime/cgo.a: read-only file system
    [23:41:29] margo: agent#007: log: cannot install margo.sublime: exit status 1
    

    The reason seems to be that the -i flag is included in the go install command which causes a reinstallation of cgo because it's seen as stale. See this comment for more info: https://github.com/golang/go/issues/24674#issuecomment-379919460

    Is there any particular reason that you explicitly add the -i flag for go 1.10 here? This suggests the opposite:

    The go build command now maintains a cache of recently built packages, separate from the installed packages in $GOROOT/pkg or $GOPATH/pkg. The effect of the cache should be to speed builds that do not explicitly install packages or when switching between different copies of source code (for example, when changing back and forth between different branches in a version control system). The old advice to add the -i flag for speed, as in go build -i or go test -i, is no longer necessary: builds run just as fast without -i. For more details, see go help cache.

    opened by simonklb 22
  • motd: cannot parse server tag: EOF

    motd: cannot parse server tag: EOF

    It happened in Sublime text 3.2.2 full log

    ** 2021-09-05 17:40:13.815383 **:
    GoSublime init r20.06.14-1 (0.003s)
    |   install margo: no
    |   install state: done
    | sublime.version: 3211
    | sublime.channel: stable
    |       about.ann: a20.06.14-1
    |   about.version: r20.06.14-1
    |         version: r20.06.14-1
    |        platform: linux-x64
    |            ~bin: ~/.config/sublime-text-3/Packages/User/GoSublime/linux-x64/bin
    |       margo.exe: ~bin/gosublime.margo_r20.06.14-1_go1.16.5.exe (ok)
    |          go.exe: /usr/local/go/bin/go (ok)
    |      go.version: go1.16.5
    |          GOROOT: /usr/local/go
    |          GOPATH: ~/go
    |           GOBIN: (not set)
    |       set.shell: []
    |       env.shell: /bin/bash
    |       shell.cmd: ['/bin/bash', '-l', '-c', '${CMD}']
    |    sh.bootstrap: 
    |                > 	GOPATH is not set... setting it to the default: ~/go
    |                > 	using shell env GOPATH=~/go
    |                > 	using shell env GOROOT=/usr/local/go
    |                > 	using shell env PATH=~/.serverless/bin:~/.config/sublime-text-3/Packages/GoSublime/bin:~/.config/sublime-text-3/Packages/User/GoSublime/bin:~/go/bin:~/.serverless/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/usr/lib/node-v6.10.1/bin:~/bin:/usr/local/opt/go/bin:/usr/local/go/bin:~/go/bin:/usr/lib/node-v6.10.1/bin
    |                > 	go version: `go1.16.5` (raw version string `go1.16.5`)
    |                > 	shell bootstrap took 31.808s
    |                >
    --------------------------------
    
      margo: agent#007: ['go', 'install', '-v', '-x', 'margo.sh']:
      WORK=/tmp/go-build2925051689
      
    [17:40:23] margo: agent#007: ['/home/rpchen1228/.config/sublime-text-3/Packages/GoSublime/bin/margo.sh', 'start', 'margo.sublime', '-codec', 'msgpack']
    [17:40:24] margo: agent#007: log: Using margo extension: /home/rpchen1228/.config/sublime-text-3/Packages/User/GoSublime/src/margo
    [17:40:24] margo: agent#007: log: ``` go install -v -tags="margo margo_extension" margo.sh/cmd/margo.sublime ```
    [17:40:27] margo: agent#007: log: ``` /home/rpchen1228/.config/sublime-text-3/Packages/GoSublime/bin/margo.sublime -codec msgpack ```
    [17:40:28] margo: agent#007: log: oom_nix.go:25: SetMemoryLimit: limit=2048MiB, RLIMIT_DATA={Cur: 2048MiB, Max:17592186044415MiB}
    [17:40:28] margo: agent#007: log: store.go:137: started
    [17:40:28] margo: agent#007: log: motd.go:207: motd: cannot parse server tag: EOF
    
    opened by RPing 0
  • State of this project and future plans

    State of this project and future plans

    Hi! I love this project but was wondering about the current status of development because it seems inactive.

    If it is, are there plans to get new maintainers onboard?

    opened by dvcrn 0
  • Unable to find package margo

    Unable to find package margo

    Hi guys,

    Hope you are all well !!!

    [13:13:33] margo: agent#007: ['/Users/x0rzkov/Library/Application Support/Sublime Text 3/Packages/GoSublime/bin/margo.sh', 'start', 'margo.sublime', '-codec', 'msgpack']
    [13:13:33] margo: agent#007: log: ``` go install -v -tags=margo margo.sh/cmd/margo.sublime ```
    [13:13:40] margo: agent#007: log: press ` super+. `,` super+x ` to configure margo or check console for errors
    [13:13:40] margo: agent#007: log: *Not* using margo extension: Error: cannot find package "margo" in any of:
    [13:13:40] margo: agent#007: log: 	/usr/local/go/src/margo (from $GOROOT)
    [13:13:40] margo: agent#007: log: 	/Users/x0rzkov/Library/Application Support/Sublime Text 3/Packages/User/GoSublime/src/margo (from $GOPATH)
    [13:13:40] margo: agent#007: stopping
    

    I have margo.sh in /Users/x0rzkov/Library/Application Support/Sublime Text 3/Packages/User/GoSublime/src/

    How to sort it out ? thanks

    Cheers, X

    opened by x0rzkov 1
  • Unable to install GoSublime

    Unable to install GoSublime

    After fetching repo from git with git clone https://margo.sh/GoSublime to Packages directory of Sublime Text 3 installation, I restart SublimeText and nothing happens. Nothing on the status bar, ctrl+., ctrl+x does nothing Where to look?

    opened by i-i-denisov 3
  • Errors you may encounter when upgrading the library

    Errors you may encounter when upgrading the library

    (The purpose of this report is to alert DisposaBoy/GoSublime to the possible problems when DisposaBoy/GoSublime try to upgrade the following dependencies)

    An error will happen when upgrading library urfave/cli:

    github.com/urfave/cli

    -Latest Version: v2.2.0 (Latest commit d648edd on 6 Mar) Master branch -Where did you use it: https://github.com/DisposaBoy/GoSublime/search?l=Go&q=github.com%2Furfave%2Fcli -Detail:

    github.com/urfave/cli/go.mod

    module github.com/urfave/cli/v2
    go 1.11
    require (
    	github.com/BurntSushi/toml v0.3.1
    	github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
    	gopkg.in/yaml.v2 v2.2.2
    ) 
    

    github.com/urfave/cli/docs.go

    package cli
    import (
    	"github.com/cpuguy83/go-md2man/v2/md2man"
    	…
    ) 
    

    This problem was introduced since urfave/cli v1.22.1(Latest commit 534d60b on 10 Sep 2019) . Now you used version v1.22.0. If you try to upgrade urfave/cli to version v1.22.1 and above, you will get an error--- no package exists at "github.com/cpuguy83/go-md2man/v2/md2man"

    I investigated the libraries (urfave/cli >= v1.22.1) release information and found the root cause of this issue is that----

    1. These dependencies all added Go modules in the recent versions.

    2. They all comply with the specification of "Releasing Modules for v2 or higher" available in the Modules documentation. Quoting the specification:

    A package that has migrated to Go Modules must include the major version in the import path to reference any v2+ modules. For example, Repo github.com/my/module migrated to Modules on version v3.x.y. Then this repo should declare its module path with MAJOR version suffix "/v3" (e.g., module github.com/my/module/v3), and its downstream project should use "github.com/my/module/v3/mypkg" to import this repo’s package.

    1. This "github.com/my/module/v3/mypkg" is not the physical path. So earlier versions of Go (including those that don't have minimal module awareness) plus all tooling (like dep, glide, govendor, etc) don't have minimal module awareness as of now and therefore don't handle import paths correctly See golang/dep#1962, golang/dep#2139.

    Note: creating a new branch is not required. If instead you have been previously releasing on master and would prefer to tag v3.0.0 on master, that is a viable option. (However, be aware that introducing an incompatible API change in master can cause issues for non-modules users who issue a go get -u given the go tool is not aware of semver prior to Go 1.11 or when module mode is not enabled in Go 1.11+). Pre-existing dependency management solutions such as dep currently can have problems consuming a v2+ module created in this way. See for example dep#1962. https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

    Solution

    1. Migrate to Go Modules.

    Go Modules is the general trend of ecosystem, if you want a better upgrade package experience, migrating to Go Modules is a good choice.

    Migrate to modules will be accompanied by the introduction of virtual paths(It was discussed above).

    This "github.com/my/module/v3/mypkg" is not the physical path. So Go versions older than 1.9.7 and 1.10.3 plus all third-party dependency management tools (like dep, glide, govendor, etc) don't have minimal module awareness as of now and therefore don't handle import paths correctly.

    Then the downstream projects might be negatively affected in their building if they are module-unaware (Go versions older than 1.9.7 and 1.10.3; Or use third-party dependency management tools, such as: Dep, glide, govendor…).

    2. Maintaining v2+ libraries that use Go Modules in Vendor directories.

    If DisposaBoy/GoSublime want to keep using the dependency manage tools (like dep, glide, govendor, etc), and still want to upgrade the dependencies, can choose this fix strategy. Manually download the dependencies into the vendor directory and do compatibility dispose(materialize the virtual path or delete the virtual part of the path). Avoid fetching the dependencies by virtual import paths. This may add some maintenance overhead compared to using modules.

    As the import paths have different meanings between the projects adopting module repos and the non-module repos, materialize the virtual path is a better way to solve the issue, while ensuring compatibility with downstream module users. A textbook example provided by repo github.com/moby/moby is here: https://github.com/moby/moby/blob/master/VENDORING.md https://github.com/moby/moby/blob/master/vendor.conf In the vendor directory, github.com/moby/moby adds the /vN subdirectory in the corresponding dependencies. This will help more downstream module users to work well with your package.

    3. Request upstream to do compatibility processing.

    The urfave/cli have 1694 module-unaware users in github, such as: alena1108/cluster-controller, nathan-jenan-rancher/example-kontainer-engine-driver, containerd/containerd… https://github.com/search?q=urfave%2Fcli+filename%3Avendor.conf+filename%3Avendor.json+filename%3Aglide.toml+filename%3AGodep.toml+filename%3AGodep.json

    Summary

    You can make a choice when you meet this DM issues by balancing your own development schedules/mode against the affects on the downstream projects.

    For this issue, Solution 1 can maximize your benefits and with minimal impacts to your downstream projects the ecosystem.

    References

    • https://github.com/golang/go/wiki/Modules#semantic-import-versioning
    • https://golang.org/cmd/go/#hdr-Module_compatibility_and_semantic_versioning
    • https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

    Do you plan to upgrade the libraries in near future? Hope this issue report can help you ^_^ Thank you very much for your attention.

    Best regards, Kate

    opened by KateGo520 4
Releases(v20.06.14)
  • v20.06.14(Jun 14, 2020)

    20.06.14

    This release contains a number of features and bug fixes that have been worked on over the last few months.

    You will need to restart Sublime Text for all changes to take effect

    • Add new GoCmd{} option Humanize to make go test and go re/play (in test mdoe) output more readable (using https://github.com/dustin/go-humanize).

      • large numbers are split up using commas
      • 123456 ns/op is converted to µs/op, etc.
      • 123456 B/op is converted to KiB/op, etc.

      To enabled it, use:

      &golang.GoCmd{
          Humanize: true,
      }
      

      e.g. output:

      goos: linux
      goarch: amd64
      pkg: margo.sh/vfs
      BenchmarkPoke/Miss-8            388,868       2.952 µs/op
      BenchmarkPoke/Hit-8            1,739,704         684 ns/op
      PASS
      

      Known bugs:

      • The output fields are not aligned
    • Add new reducer golang.GoGenerate

      It adds a UserCmd (cord ctrl/cmd+.,ctrl/cmd+.c) named Go Generate that calls go generate in the closest go package (current dir or parent dirs).

      It can be enabled with:

      &golang.GoGenerate{
          Args: []string{"-v", "-x"},
      },
      
    • Auto-completion now works when the line ends with a dot (.)

    • Add new reducer golang.AsmFmt

      It does code fmt'ing for .s files using https://github.com/klauspost/asmfmt

      It formats .s files when they are saved, or the fmt cord ctrl+.,ctrl.f is pressed.

    • Add new reducer &web.Prettier{}

      It does code fmt'ing using https://github.com/prettier/prettier By default It fmt's CSS, HTML, JS, JSON, JSX, SVG, TS, TSX and XML files.

      To specify the list of langs to fmt set the Langs field:

      &web.Prettier{
          // Langs: []mg.Lang{mg.JS}, // only fmt .js files
          Langs: web.PrettierDefaultLangs,
      },
      

      You might also need to import "margo.sh/web".

      You will need to install prettier separately.

    • Add new Lang constants: mg.HTML, mg.SVG and mg.XML

    • Add mgutil.SplitWriter a writer that writes to an underlying writer in split chunks e.g. lines somewhat similar to bufio.scanner

    • go.play and go.replay (cord ctrl/cmd+.,ctrl/cmd+r) now works in in unsaved _test.go files.

    • go.replay now runs the Benchmark* func surrounding the cursor.

      Compared to ctrl/cmd+shift+left-click, it also runs tests.

      Known bugs:

      • It currently ignores the TestArgs and BenchmarkArgs options of the golang.TestCmds reducer.
    • mg.CmdCtx supports a new option Verbose,

      When cx.Verbose = truethe commands that are run are printed to the output prefixed with #.

      e.g. output:

      [ `replay` | done ]
      # go test -test.run=. -test.bench=^BenchmarkPoke$
      goos: linux
      [...]
      

      It's enabled for go.play and go.replay (cord ctrl/cmd+.,ctrl/cmd+r).

    • Issues without a valid tag are now defaulted to mg.Error instead of being ignored.

      This fixes some cases where the error palette shows errors, but the status and HUD doesn't.

    • Fix some cases where issues are reported in the wrong file or incorrectly anchored to the current file.

    • goutil.IsPkgDir() and other functions now use the VFS, so should touch the disk less.

    Source code(tar.gz)
    Source code(zip)
  • v20.03.09(Mar 9, 2020)

    This release fixes a couple bugs:

    • GO111MODULE=off is set after building, in cases where GO111MODULE wasn't already set by the user.
    • An update message is shown even when the local GoSublime version is greater than that reported by the server.
    Source code(tar.gz)
    Source code(zip)
  • v20.03.01(Mar 1, 2020)

  • v20.02.01(Feb 1, 2020)

    This release focuses on fixing a performance issue due to a failure to resetting all cached data prematurely.

    • Cache some files in memory to avoid re-reading from disk every time.

    • The &nodejs.PackageScripts{} reducer now uses yarn instead of npm if the yarn.lock file is present.

    Source code(tar.gz)
    Source code(zip)
  • v20.01.01(Jan 1, 2020)

    This release mainly focuses on under-the-hood improvements for module support.

    • The default auto-completion import mode has been changed to Kim-Porter, our solution for auto-completion and package/module going forward.

      One side-effect of this change is that unimported-packages support is less reliable but we feel this is a small drawback when compared to the much improved auto-completion support.

      We plan to remove support for switching import modes in the future, but if you would like to revert to the previous default (bearing in mind auto-completion might stop working), configure the MarGocodeCtl reducer as follows:

          &golang.MarGocodeCtl{
            ImporterMode: golang.SrcImporterWithFallback,
          }
      
    • The Go/TypeCheck linter is now more complete and should be able to type-check (without failure) all packages for which auto-completion is available. This linter offers typechecking (like the gotype tool) but can work on unsaved files and while you type and is faster a full go install lint.

      To enable add the following reducer to your margo.go file:

        &golang.TypeCheck{},
      
    • Some HTTP handler snippets have been added and are offered in files that import "net/http".

    Source code(tar.gz)
    Source code(zip)
  • v19.10.22(Oct 22, 2019)

    • API BREAKAGE: ParseWithMode and ParseWithMode now takes a *mg.Ctx instead of a mg.KVStore.

    • Add experimental support for auto-completion and type-checking in go modules.

    • Add experimental reducer &golang.TypeCheck{}. It's a linter that does a full type-check as you type (even in unsaved files). It can be thought of as a replacement for the gotype binary of old.

      NOTE: This is purely an experiment used primarily for testing the package importer and type-checking and will probably break randomly, if it works at all.

      With that said, the plan is to clean it up and develop it further in the future.

    • The Ariana color scheme has been tweaked to improve readability.

    • Add a prefix to status items and reduce the space between them.

    • Add langs mg.GoMod and mg.GoSum for go.mod and go.sum files, respectively. For convenience, goutil.Langs now holds the list of all Go-related langs and Go linters are now available in go.mod and go.sum.

    • The tasks count styled has been changed to Tasks ➊➋➌. The status animates between Tasks ➊➋➌ and Tasks ➀➁➂ while there are tasks less than 16s old.

    • The issue count styled has been changed to Error ➊ꞏ🄋.

      NOTE: The meanings of the numbers have been reverted.

      Previously, given 1/2 Errors, there was 1 issue with tag Error in this view, and there was a total 2 errors in all views. The new meanings Error ➊ꞏ🄋 is: ➊ is the number issues in the current view and 🄋 is the number issues in other views.

      Only first number is highlighted if there are issues in the current view. Likewise, when there are issues, but none in the current view, only the second number is highlighted.

    • Don't show the func prefix in the calltip status. The parens already make it obviously a function.

    Source code(tar.gz)
    Source code(zip)
  • v19.06.16(Jun 16, 2019)

    • Fix a deadlock/freeze (seen on Mac OS) when starting up with multiple windows open.
    • Fix an issue where the active window loses focus when starting up.
    Source code(tar.gz)
    Source code(zip)
  • v18.11.28(Nov 28, 2018)

    This release introduces the HUD and comes with many improvements to snippets and a tweaked version of the Mariana color scheme named Ariana.

    Source code(tar.gz)
    Source code(zip)
  • v18.09.30(Sep 30, 2018)

  • v18.07.31(Jul 31, 2018)

  • v18.07.22(Jul 22, 2018)

  • v18.07.17(Jul 18, 2018)

  • v18.07.12(Jul 14, 2018)

  • v18.05.19(May 19, 2018)

  • v18.04.30-1(Apr 30, 2018)

  • v18.04.19-1(Apr 19, 2018)

  • v18.03.26-1(Mar 26, 2018)

    • update gocode
    • fix gocode completion showing duplicate function parameter names
    • add support for restricting the files in which events are triggered
    • (hopefully) fix an issue where some users were experiencing laggy input
    Source code(tar.gz)
    Source code(zip)
  • v18.03.23-1(Mar 23, 2018)

    • GOPATH is automatically set to the internal GOPATH when editing margo source files this allows for things like linters and gocode to work when editing margo.go

    • margo is now only automatically restarted if go test succeeds this further supports linters by not restarting when margo.go compilation fails

    • add a default linter pattern for gometalinter the following reducer/linter should now work without any additional setup

      	&golang.Linter{Name: "gometalinter", Args: []string{"--fast"}},
      
      
    • add support for sending settings to margo in the GoSublime settings, Sublime Text preferences or project settings the entry "margo": {...} will be send to margo where reducers can make use of it by accessing mx.Editor.Settings e.g.

      gosublime settings:

      	"margo": {
      		"message": "hello world from the GoSublime settings",
      	}
      

      project settings:

      	"margo": {
      		"message": "hello world from the project settings",
      	}
      

      margo.go

      	mg.Reduce(func(mx *mg.Ctx) *mg.State {
      		var settings struct {
      			// due to limitations in the codec pkg we need to add struct tags
      			// unless we use the exact (capitalized name) in the editor settings
      			Status string `codec:"status"`
      		}
      		err := mx.Editor.Settings(&settings)
      		switch err {
      		case mg.ErrNoSettings:
      			// when the `Started` action is dispatched, no client data is present
      			// and we therefore have no settings
      			return mx.State
      		case nil:
      			return mx.AddStatus(settings.Status)
      		default:
      			return mx.AddStatusf("cannot decode settings: %v", err)
      		}
      	}),
      
    Source code(tar.gz)
    Source code(zip)
  • v18.03.21-1(Mar 21, 2018)

  • v18.03.20-1(Mar 20, 2018)

    • fix a case where (old) margo compilation fails because the Go version cannot be determined, but the sanity check shows the correct version
    • move some initializations off the ui thread to avoid ui freezes on startup
    • fix the golang.GoInstallDiscardBinaries linter failing due to invalid dirname
    Source code(tar.gz)
    Source code(zip)
  • v18.03.19-1(Mar 19, 2018)

    • disable the autoinst setting by default
    • fix a Python buffering issue that sometimes caused the ui to freeze
    • speedup sh-bootstrap/Sublime Text startup
    Source code(tar.gz)
    Source code(zip)
  • v18.03.16-1(Mar 16, 2018)

    support for context-aware snippets have now been added in the new version of margo. just add golang.Snippets, to your reducers to enable it.

    see https://github.com/disposablue/margo/blob/master/extension-example/extension-example.go

    Source code(tar.gz)
    Source code(zip)
  • r18.03.05-1(Mar 5, 2018)

    • if no status is set, the status markers (dots) are no longer shown

    • sh-bootstrap.go is now built with go build to improve startup time in go1.10

    • path handling on Windows was improved

    • linter support should now be almost complete.

      • add support for displaying issues via ctrl+.,ctrl+e or cmd+.,cmd+e
      • errors for all files in the package are tracked
      • the error count in the status bar is always visible if there are errors in other files

      see the example extension https://github.com/disposablue/margo/blob/master/extension-example/extension-example.go for examples of builtin linters.

    Source code(tar.gz)
    Source code(zip)
  • r18.02.17-2(Feb 17, 2018)

  • r18.02.17-1(Feb 17, 2018)

  • r18.02.16-1(Feb 16, 2018)

  • 18.02.09-1(Feb 9, 2018)

  • 18.02.04-1(Feb 4, 2018)

  • r18.01.14-1(Jan 14, 2018)

  • r17.12.17-1(Dec 21, 2017)

Owner
null
gide is an IDE framework in pure Go, using the GoGi gui. It extensively adopts emacs keybindings.

Gide Gide is a flexible IDE (integrated development environment) framework in pure Go, using the GoGi GUI (for which it serves as a continuous testing

GoKi 118 Aug 16, 2022
Eclipse IDE for the Go programming language:

Project website: http://goclipse.github.io/ As of 2017, Goclipse is no longer actively maintained, see this blog post for more information. If you are

null 844 Aug 25, 2022
Web-based IDE for the Go language

Welcome to godev! The aim of this project is to develop a premier Go language IDE hosted in a web interface. This was inspired by the way that the god

Chris McGee 347 Aug 26, 2022
The Fyne IDE

DEFyne This repo contains the work-in-progress Fyne IDE. Features Embedded terminal TODO Various types of editor Syntax highlighting Standard run/test

Fyne.io 83 Sep 21, 2022
VS Code code snippet generator

VS Code code snippets generator.

Randy 63 Sep 2, 2022
Vim compiler plugin for Go (golang)

Vim compiler file for Go (golang) Compiles Go files in the background and usefully underlines and reports errors to the QuickFix window: Installation:

Richard Johnson 87 Jun 30, 2022
Vim plugin for https://github.com/hexdigest/gounit

gounit-vim Vim plugin for gounit tool that allows you to generate Go tests easily. Demo Installation gounit-vim requires gounit to be available in you

Max Chechel 23 Jul 22, 2022
Go development plugin for Vim

vim-go Features This plugin adds Go language support for Vim, with the following main features: Compile your package with :GoBuild, install it with :G

Fatih Arslan 14.9k Sep 21, 2022
MdEdit is a Vi-like markdown editor built using Gio

MdEdit MdEdit is a Vi-like markdown editor built using Gio. It is extremely early stage software. The Vi editor lacks most functionality and might be

Steve Russo 3 Jun 29, 2022
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.

tabby Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files. screenshot: depend

Mikhail Trushnikov 49 Dec 30, 2021
Go extension for VS Code

Go for Visual Studio Code The VS Code Go extension provides rich language support for the Go programming language. Quick Start Welcome! ???? Whether y

Go 3k Sep 25, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Zachary Yedidia 20.3k Sep 17, 2022
Watches for changes in a directory tree and reruns a command in an acme win or just on the terminal.

Watch Usage: Watch [-v] [-t] [-p <path>] [-x <regexp>] <command> Watches for changes in a directory tree, and runs a command when something changed. B

Ethan Burns 194 Sep 10, 2022
bash completion written in go + bash completion for go command

complete Package complete is everything for bash completion and Go. The main development is done on the master branch, please follow the link to see a

Eyal Posener 859 Sep 14, 2022
🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

?? Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

Rob Muhlestein 2 Apr 12, 2022
Library providing opanapi3 and Go types for store/validation and transfer of ISO-4217, ISO-3166, and other types.

go-types This library has been created with the purpose to facilitate the store, validation, and transfer of Go ISO-3166/ISO-4217/timezones/emails/URL

Mikalai Konan 14 Aug 19, 2022
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin

Simple DNS log Server,easy to ACME DNS challenge log easy send to elasticsearch https://github.com/hktalent/DNS_Server go4Hacker Automated penetration

51pwn 49 Sep 24, 2022
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

gore Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. (Screencast taken with cho45/KeyCast) Usage gore Af

Hironao OTSUBO 4.6k Sep 16, 2022
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

gore Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. (Screencast taken with cho45/KeyCast) Usage gore Af

Hironao OTSUBO 4.6k Sep 22, 2022