-
Notifications
You must be signed in to change notification settings - Fork 46
Autocomplete-snippets not working for some/all scopes? #83
Description
Description
Hi,
I'm new to atom, so I'm not sure if this is a bug or if I just do something wrong.
I installed Atom on Arch Linux (from arch repos, v1.16.0). It came with a bundle of basic packages preinstalled, such as autocomplete-plus and autocomplete-snippets.
I want to write saltstack formulas, so I also installed atom-jinja2 and language-salt, the latter just adds the .sls extention to atom-jinja2's yaml/jinja syntax highlighting, creating the scope .source.salt.
I wrote some snippets and according to the snippets- and autocomplete doku, I added some fields like "description".
However the auto complete part seems to work in no way. I can expand the snippet but I don't get the autocomplete popup.
I verified the same behavior for yaml files (.source.yaml), and some other extentions as well, this is why I first thought autocomplete doesn't work at all.
However it is working for javascript files: If I change the scope for my snippets to .source.js the autocompletion is shown, and it shows my snippets with all their "descriptions" etc. ... everything is working as expected.
This is why I think the problem is within the autocomplete-snippets provider, as far as I can tell js has its own provider.
I read a little deeper into how autocomplete providers work and had a look at autocomplete-snippets/lib/snippets-provider.js ... as far as I can tell everything looks good in here and even the description part etc is present.
Changing the * selector to "SnippetsProvider.prototype.selector = '.source.salt, .source.yaml';" didn't change anything aswell (I would not really have expected that, but wanted to give it a try).
Am I missing something or does it sound like a bug to you?
Steps to Reproduce
- with the packages named above I used the following (test-)snippets
'.source.salt':
'test entry':
'prefix': 'foo'
'description': 'This is a foobar snippet for salt.'
'descriptionMoreURL': 'https://docs.saltstack.com/en/latest/ref/states/requisites.html'
'body': "foobarbaz"
'.source.yaml':
'test entry':
'prefix': 'foo'
'description': 'This is a foobar snippet for yaml.'
'descriptionMoreURL': 'https://docs.saltstack.com/en/latest/ref/states/requisites.html'
'body': "foobarbaz"
'.source.js':
'test entry':
'prefix': 'foo'
'description': 'This is a foobar snippet for js.'
'descriptionMoreURL': 'https://docs.saltstack.com/en/latest/ref/states/requisites.html'
'body': "foobarbaz"
- it works for .source.js but not for the other 2
Expected behavior: I expect an autocomplete popup for actually .source.salt to appear as it does for .source.js
Actual behavior: It appears for .source.js (which has its own provider) but not for the others
Reproduces how often: 100%
Versions
atom --version
Atom : 1.16.0
Electron: 1.4.16
Chrome : 53.0.2785.143
Node : 6.5.0
apm --version
(node:20090) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
apm 1.18.1
npm 4.5.0
node 7.9.0 x64
python 2.7.13
git 2.12.2
Arch Linux, More precise: Antergos using LTS Kernel
uname -a
Linux hfi-laptop 4.10.11-1-ARCH #1 SMP PREEMPT Tue Apr 18 08:39:42 CEST 2017 x86_64 GNU/Linux