Sublime Forum

Sublime 4 completions don't always work

#1

Before, completion would work on any text, including comments. Now it only seems to work in restricted semantic contexts.

e.g. in JSON completion works in quoted keys, but not in unquoted keys or comments. maybe because it’s not standard JSON. I don’t care, I want completions to work everywhere again!

Any way to solve this?

0 Likes

#2

The "auto_complete_selector" controls where auto-complete is used. By default it only includes tags and source code outside of comments and strings. If you want completions everywhere use "source, text".

0 Likes

#3

Or use "auto_complete_selector": "" as the score of an empty selector is always 1 > 0.

0 Likes

#4

thanks for the suggestions. I added

	"auto_complete": true,
	"auto_complete_selector":"source, text", 

to Preferences.sublime-settings, but it still does not work in the JSON example above. (It offers some suggestions like ‘false’ when typing // a<tab> but not ‘auto_complete’ which I just typed in the line above.). It seems like it can’t complete “across semantic contexts” whatever that means.

Does auto complete work in your JSON comments?

0 Likes