Sublime Forum

In source scope ST4 will not offer completions from words in quoted scope

#1

I’ve been trying ST4 today, and I can’t get tab completion to work how I want. I’m writing Perl code, and I can’t work out how to configure it to include words found in the same file in comments or quotes in the list of possible completions. I found the default setting:

"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",

which I think means “do autocomplete in tag scope or (in source scope but not in comments, single or double quoted blocks or here docs)”. But is there a control for what gets included in the list of possible completions?

The confusing behaviour I now see is that completion does not work in source scope on a word which is in a double quoted block elsewhere in the file, but completion on that same double quoted word does work in double quote or comment scopes!

0 Likes

#2

The auto_complete_selector setting controls in what situations the autocomplete panel opens automatically in response to typing, but it doesn’t control what gets offered for completions.

Words from the buffer should indeed be included in the list of completions though, I would think. A possibility is a plugin that’s going out of it’s way to block them. Does it work the way you expect in Safe mode?

0 Likes

#3

Thanks, I tried safe mode, but the behaviour is the same. It isn’t just Perl, it seems to be consistent across language modes – I tried it in JSX too:

In source scope ST4 will not complete on words which are in quoted or commented scope elsewhere in the file.

0 Likes

#4

seems true

0 Likes