-
Notifications
You must be signed in to change notification settings - Fork 3
Smart autocompletion don't work #30
Comments
I've just looked at the similar bugs for Ansible plugin from RedHat and tried some advices from... |
It is indeed strange. I got used to |
OK, so I've investigated it, and it looks like it is not exactly a bug, it's rather a missing feature. The thing is that VS Code launches autocompletion itself when the word you start typing matches a symbol. This is why you might trigger autocompletion if you start with 'n', because there is a symbol for 'no'. To make other keywords, modules, parameters, etc. trigger autocompletion, they would need to be provided to VS Code as symbols, which is just not implemented yet. |
And I want to say great thanks for this plugin, Tomasz! We waited for his appearance for many years, starting with Ansible 1 =) Its perfect, even with manual autocomplete! Thanks again! =) Old deprecated Microsoft plugin for Ansible was much worse... |
Thanks Dmitry! The missing feature is not on the VS Code part, but my plugin. Anyway, RedHat folks seem to have found a solution. Try adding this to your configuration JSON: "[ansible]": {
"editor.quickSuggestions": {
"comments": true,
"other": true,
"strings": true
}
} |
Now it works, but everywhere. And is there any possibility to disable IntelliSense while typing names of the tasks?
If it is impossible, this is not so scary... As for me, it became much better... =) Thank you very much! |
Yes, enabling suggestions on comments is probably unnecessary. As for disabling suggestions while typing names - these are provided by VS Code itself, and extension cannot influence it in that way. As I described above, the perfect solution would be to expose symbols, which would trigger the suggestions. |
Summary
Smart autocompletion don't work, I've recorded a short video to illustrate it.
Extension version
1.0.8
VS Code version
1.61.0
Ansible Version
OS / Environment
vscode Version: 1.61.0 (user setup)
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:13:09.652Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042
I tried to use this plugin with Remote - SSH
Plugins installed local:
Plugins installed on remote:
Remote system:
Debian 11
/usr/bin/python3 --version
Python 3.9.2
pip3 list
Package Version
ansible 4.6.0
ansible-core 2.11.5
ansible-lint 5.2.0
bcrypt 3.2.0
bracex 2.1.1
certifi 2020.6.20
cffi 1.14.6
chardet 4.0.0
colorama 0.4.4
commonmark 0.9.1
cryptography 3.3.2
dbus-python 1.2.16
distro-info 1.0
enrich 1.2.6
httplib2 0.18.1
idna 2.10
Jinja2 3.0.1
jmespath 0.10.0
MarkupSafe 2.0.1
packaging 21.0
paramiko 2.7.2
pip 21.2.4
pycparser 2.20
pycurl 7.43.0.6
Pygments 2.10.0
PyGObject 3.38.0
PyNaCl 1.4.0
pyparsing 2.4.7
PySimpleSOAP 1.16.2
python-apt 2.2.1
python-debian 0.1.39
python-debianbts 3.1.0
pyvmomi 7.0.2
PyYAML 5.4.1
reportbug 7.10.3+deb11u1
requests 2.25.1
resolvelib 0.5.4
rich 10.12.0
ruamel.yaml 0.17.16
ruamel.yaml.clib 0.2.6
setuptools 52.0.0
six 1.16.0
tenacity 8.0.1
unattended-upgrades 0.1
urllib3 1.26.5
wcmatch 8.2
wheel 0.34.2
Relevant log output
No response
The text was updated successfully, but these errors were encountered: