Open gigi206 opened 4 years ago
Timely report @gigi206! The saltstack vscode extension was just updated to support autocomplete of state modules for sls files, as well as test entries for saltcheck tst files. Additionally, you should now use the saltstack extension pack to ensure you have both the saltstack syntax and autocomplete plugin as well as the salt-lint plugin (which lints sls files).
Great 👍 I'm going to update my extensions that already include these two to test 😊
I just test. It would be great if we could show the associated documentation when I put the mouse cursor above the function, for example:
my_surper_user:
user.present:
- name: gigix
- uid: 1010
should return:
import salt.states.user
user.present.__doc__
Same thing for user:
import salt.states.user
user.__doc__
And same thing for user, but in this case, a parser is needed to extract the good value.
Also autocomplete required arguments when we press enter:
id:
<state>.<function>: <<<<ENTER HERE
and this is autocomplete required arguments like:
id:
<state>.<function>:
- <args1>: aaa
- <arg2>: bbb
We have just tp press tab to change aaa and bbb value
Take a look at ansible extension:
All other similar tools (puppet, ansible, chef) have autocomplete tools: cf https://youtu.be/oTNpobsCCS0?t=295
I think it would be a good point to develop a tool to help developers use Saltstack.