Sublime Forum

Disable TypeScript package autocomplete always popping up

#1

Hi! Kinda new here and still getting used to Sublime Text.

I’ve installed some packages to help me with JavaScript/TypeScript development, including SublimeCodeIntel and TypeScript, which gives me some nice IntelliSense for both languages, BUT it always triggers autocomplete in an unwanted way.

I just want to disable autocomplete always triggering whenever I place a semicolon, because I often have the “semicolon => enter” problem, which ends up always placing __dirname when I do so.

image

Placing these values on my settings file didn’t help me with it:

  "auto_complete": false,
  "auto_complete_delay": 1000,
  "tab_completion": false

I still want it whenever I hit Ctrl + Space, but not always.

Does anyone have a solution for this?

Thanks!

:slight_smile:

0 Likes

#2

I don’t use TypeScript myself, but here is something you can try:

  • install the TypeScript Syntax instead of the TypeScript package for syntax highlighting
  • install LSP and LSP-typescript for IntelliSense/autocompletion/hover etc. This typescript language server should work for both TypeScript and JavaScript.

One thing I use in my Sublime preferences file to avoid the autocomplete/enter problem is (default is false):

    // By default, auto complete will commit the current completion on enter.
    // This setting can be used to make it complete on tab instead.
    // Completing on tab is generally a superior option, as it removes
    // ambiguity between committing the completion and inserting a newline.
    "auto_complete_commit_on_tab": true,
1 Like