Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions GoSublime.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
// note: this feature only comes into effect when autocomplete was triggered after a dot, e.g. `fmt.|`
"autocomplete_suggest_imports": false,

// if set to true, completion will not insert snippet with function arguments.
"autocomplete_func_name_only": false,

// whether or not to show function call tip in the status bar
// the same can be achieved ctrl+dot,ctrl+space using an output panel
"calltips": true,
Expand Down
1 change: 1 addition & 0 deletions gosubl/gs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"autocomplete_closures": False,
"autocomplete_filter_name": "",
"autocomplete_suggest_imports": False,
"autocomplete_func_name_only": False,
"on_save": [],
"shell": [],
"default_snippets": [],
Expand Down
3 changes: 2 additions & 1 deletion gscomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def on_query_completions(self, view, prefix, locations):
return ([], AC_OPTS)

nc = view.substr(sublime.Region(pos, pos+1))
cl = self.complete(fn, offset, src, nc.isalpha() or nc == "(")
func_name_only = gs.setting('autocomplete_func_name_only', False)
cl = self.complete(fn, offset, src, nc.isalpha() or nc == "(" or func_name_only)

pc = view.substr(sublime.Region(pos-1, pos))
if show_snippets and (pc.isspace() or pc.isalpha()):
Expand Down