Sublime Forum

Completion scope selector not matching Lua punctuation?

#1

I’ve created a list of completions to use with a custom Lua syntax and I’m attempting to have them appear after a : like this…

thing:<show-list-of-custom-completions>

Doing ctrl+shift+alt+p tells me the full scope for : is source.lua.custom punctuation.accessor.lua, but doing

"scope": "source.lua.custom punctuation.accessor.lua"

doesn’t show the completion list in the auto-complete. I would have to remove the punctuation scope for it to appear properly.

Is there something I’m missing here? Using ST4 4126

0 Likes

#2

I guess the punctuation scope is to the left of the caret so doesn’t apply here. As it is a custom syntax, you could scope the whitespace after the colon with a meta scope and target that for your completions

0 Likes

#3

Strangely enough everything works perfectly after a system reboot. (???) The punctuation scope now also appears after the colon which allows for the selector to match.

My best guess is a caching issue somewhere. I’ll tread along with caution and if the problem occurs again I’ll try the meta scope and report back. Thanks for the suggestion! :slightly_smiling_face:

0 Likes

#4

So it turns out meta scoping the whitespace is a really consistent way of fixing the issue. (and honestly cleaner)

Thanks again!

0 Likes