Skip to content
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ These settings can be overridden in `Packages/User/TypeScript.sublime-settings`,
- `node_args`: array of command line arguments sent to the tsserver Node.js process before the tsserver script path (useful for e.g. changing max heap size or attaching debugger to the tsserver process)
- `tsserver_args`: array of command line arguments sent to tsserver Node.js process after the tsserver script path (useful for e.g. overriding tsserver error message locale)
- `tsserver_env`: environment variables to set for the tsserver Node.js process (useful for e.g. setting `TSS_LOG`). These variables are merged with the environment variables available to Sublime.
- `auto_complete_api_completions_only`: boolean to make the autocompletion only provides typescript suggestions and hides the standard completions (aka, all the words of the page). (Default value: `false`).

Project System
------
Expand Down
1 change: 1 addition & 0 deletions TypeScript.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"auto_complete_triggers" : [ {"selector": "source.ts", "characters": "."} ],
"auto_complete_api_completions_only": false,
"use_tab_stops": false,
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",

Expand Down
3 changes: 2 additions & 1 deletion typescript/listeners/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ def handle_completion_info(self, completions_resp):
self.run_auto_complete()

def run_auto_complete(self):
settings = sublime.load_settings("TypeScript.sublime-settings")
active_view().run_command("auto_complete", {
'disable_auto_insert': True,
'api_completions_only': False,
'api_completions_only': settings.get('auto_complete_api_completions_only', False),
'next_completion_if_showing': False,
'auto_complete_commit_on_tab': True,
})
Expand Down