All Projects → alvarolm → Goguru

alvarolm / Goguru

Licence: mit
GoGuru is a Golang plugin for SublimeText 3 that integrates the Go guru tool.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Goguru

Laravel Whoops Editor
Laravel Whoops Editor helps to open your code editor from exception stack trace.
Stars: ✭ 83 (+6.41%)
Mutual labels:  editor, sublime-text
Suplemon
🍋 Console (CLI) text editor with multi cursor support. Suplemon replicates Sublime Text like functionality in the terminal. Try it out, give feedback, fork it!
Stars: ✭ 734 (+841.03%)
Mutual labels:  editor, sublime-text
Text Pastry
Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
Stars: ✭ 782 (+902.56%)
Mutual labels:  editor, sublime-text
React Page
Next-gen, highly customizable content editor for the browser - based on React and written in TypeScript. WYSIWYG on steroids.
Stars: ✭ 8,704 (+11058.97%)
Mutual labels:  editor
Animockup
Create animated mockups in the browser 🔥
Stars: ✭ 1,152 (+1376.92%)
Mutual labels:  editor
Vue Dataflow Editor
Vue 2 dataflow graph editor
Stars: ✭ 73 (-6.41%)
Mutual labels:  editor
Consolewrap
This plugin helps you to work easily with log statements
Stars: ✭ 75 (-3.85%)
Mutual labels:  sublime-text
Playlisteditortv
IPTV m3u list Editor/Player for Windows with Kodi support
Stars: ✭ 65 (-16.67%)
Mutual labels:  editor
Markdownxiaoshujiang
markdownxiaoshujiang
Stars: ✭ 1,188 (+1423.08%)
Mutual labels:  editor
Vuejs Snippets Sublime
Vuejs Snippets for Sublime Text
Stars: ✭ 70 (-10.26%)
Mutual labels:  sublime-text
Learn Vim
Vim 实操教程(Learning Vim)Vim practical tutorial.
Stars: ✭ 1,166 (+1394.87%)
Mutual labels:  editor
Gaea Editor
Design websites in your browser. A smart web editor!
Stars: ✭ 1,154 (+1379.49%)
Mutual labels:  editor
Wyg
A new WYSIWYG editing experience for the modern web
Stars: ✭ 73 (-6.41%)
Mutual labels:  editor
Web Editor
Web可视化组态编辑器(Angular8)
Stars: ✭ 67 (-14.1%)
Mutual labels:  editor
Insert
A (potentially) great code editor for iOS, targeting the iPad. Likely written in Swift.
Stars: ✭ 74 (-5.13%)
Mutual labels:  editor
Turbo Editor
Simple and powerful File Editor for Android. All is licensed under the GPLv3 license.
Stars: ✭ 1,139 (+1360.26%)
Mutual labels:  editor
Exco
Extensible GUI text editor written in Python
Stars: ✭ 73 (-6.41%)
Mutual labels:  editor
Clover Configurator Pro
A free Plist Editor with some optional facilities for Clover UEFI boot loader
Stars: ✭ 70 (-10.26%)
Mutual labels:  editor
Asblocks
Share content as blocks
Stars: ✭ 70 (-10.26%)
Mutual labels:  editor
Ueditor Plus
Create By Xie Xianbin. RePackage ueditor for spring and other object storage service.
Stars: ✭ 71 (-8.97%)
Mutual labels:  editor

donate GoGuru documentation

GoGuru is a Golang plugin for SublimeText 3 that integrates the Go guru tool.

Please report any issues or improvements here https://github.com/alvarolm/GoGuru/issues

based on previous work from waigani.

the guru tool still is on development, check out the plan, the official git repo and the code review if you want to keep up:

Usage

Select, or place your cursor over, a symbol (function, variable, constant etc) and press ctrl+shift+g. You will be presented with the following modes of analysis to choose from:

	callees	  	show possible targets of selected function call
	callers	  	show possible callers of selected function
	callstack 	show path from callgraph root to selected function
	definition	show declaration of selected identifier
	describe  	describe selected syntax: definition, methods, etc
	freevars  	show free variables of selection
	implements	show 'implements' relation for selected type or method
	peers     	show send/receive corresponding to selected channel op
	pointsto	show variables the selected pointer may point to
	referrers 	show all refs to entity denoted by selected identifier
	what		show basic information about the selected syntax node
	whicherrs	show possible values of the selected error variable

Select one of the modes and the output will be displayed in a new tab. double click on the file name in the results to jump directly to it.

You also can hold the ctrl key and right-click on a symbol to jump right to the definition.

Install

Install Sublime Package Control (if you haven't done so already) from http://wbond.net/sublime_packages/package_control. Be sure to restart ST to complete the installation.

Bring up the command palette (default ctrl+shift+p or cmd+shift+p) and start typing Package Control: Install Package then press return or click on that option to activate it. You will be presented with a new Quick Panel with the list of available packages. Type GoGuru and press return or on its entry to install GoGuru. If there is no entry for GoGuru, you most likely already have it installed.

GoGuru has several variables to be set in order to work. These are explained in the comments of the default settings Preferences > Package Settings > GoGuru > Settings-Default:

{
	// use golangconfig, if false then shellenv will be used to get golang environment variables
	"goguru_use_golangconfig": false,

	// adds to the guru_scope the current package of the the working file
	"goguru_use_current_package" : true,

	// besides showing the result, jump directly to the definition
	"goguru_jumpto_definition": false,

	// The output can either be one of: 'buffer', 'output_panel'
	// Buffers can hold results from more than one invocation
	// Output panels sit underneath the editor area and are easily dismissed
	"goguru_output": "output_panel",

	// print debug info to the terminal
	"goguru_debug": false,

	// Set guru's output to json
	"goguru_json": false,

	// an array of scopes of analysis for guru.
	// e.g (for github.com/juju/juju) "guru_scope": ["github.com/juju/juju/cmd/juju", "github.com/juju/juju/cmd/jujud"]
	"goguru_scope": [],

	// an array of build tags of analyzed source files
	"goguru_tags": [],

	// env overwrites the default shell environment vars
	// e.g "env": { "GOPATH": "$HOME/go/bin:$PATH" }
	// not used when goguru_use_golangconfig is set to true
	"goguru_env": {},
}

You set your own variables in Preferences > Package Settings > GoGuru > Settings-User.

You can also make project specific settings. First save your current workspace as a project Project > Save as project ..., then edit your project Project > Edit Project. Below is an example which sets up GoGuru to be used on the github.com/juju/juju codebase:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "/home/user/go/src/github.com/juju/juju"
        }
    ],
    "settings":
    {
        "GoGuru": {
            "goguru_scope": ["github.com/juju/juju/cmd/juju", "github.com/juju/juju/cmd/jujud"],
            "goguru_output": "output_panel"
        }
    },
}

Default key binding:

[
    { "keys": ["ctrl+shift+g"], "command": "go_guru"},
    { "keys": ["ctrl+alt+shift+g"], "command": "go_guru_show_results"},
    { "keys": ["ctrl+.+ctrl+g"], "command": "go_guru_goto_definition", "context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }] },
]

You can set your own key binding by copying the above into Preferences > Keybindings - User and replacing ctrl+shift+g with your preferred key(s).

You can also set a key binding for a specific mode by adding a "mode" arg, e.g.:

    ...
    { "keys": ["ctrl+super+c"], "command": "go_guru", "args": {"mode": "callers"} },
    { "keys": ["ctrl+super+i"], "command": "go_guru", "args": {"mode": "implements"} },
    { "keys": ["ctrl+super+r"], "command": "go_guru", "args": {"mode": "referrers"} },
    { "keys": ["ctrl+.+ctrl+g"], "command": "go_guru", "args": {"mode": "definition", output=false}},
    ...

Default mouse bindings:

[
    {
        "button": "button2",
        "modifiers": ["ctrl"],
        "press_command": "drag_select",
        "command": "go_guru",
        "args": {
            "mode": "definition",
            "output": false
        },
    },
]

Dependencies

GoGuru relies on the guru tool. You must install it in order for GoGuru to work. Run the following on your command line:

go get -u golang.org/x/tools/cmd/guru

Copyright, License & Contributors

GoGuru is released under the MIT license. See LICENSE.md

GoGuru is the copyrighted work of The GoGuru Authors i.e me (alvarolm) and all contributors. If you submit a change, be it documentation or code, so long as it's committed to GoGuru's history I consider you a contributor. See AUTHORS.md for a list of all the GoGuru authors/contributors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].