pearofducks / ansible-vim

A vim plugin for syntax highlighting Ansible's common filetypes
MIT License
800 stars 98 forks source link

Completion/autocompletion support #107

Closed gardar closed 1 year ago

gardar commented 4 years ago

Are there any plans/interest of adding completion/autocompletion of ansible module names, options and common args. or is would that be better served in a different plugin?

I'm imagining it could be done in a similar manner to the snips already included. I came a cross a atom plugin that could possibly be used as inspiration: https://github.com/h-hirokawa/atom-autocomplete-ansible

pearofducks commented 4 years ago

I have no plans of implementing this myself. I'm happy to accept a PR for it though - unless the code is quite complex to implement it ofc - then perhaps it should live in it's own plugin.

gardar commented 4 years ago

Ok understood, I'm not familiar with it myself as I haven't looked into writing vim plugins myself... I'm not sure if there is a generic way to do so or if it would have to be bound to some other autocompletion plugin. I would think ideally the completion should support deoplete/youcompleteme/mucomplete/etc. Do you have any knowledge on the subject? Any pointers would be helpful.

I came across a plugin called Rocannon which does, among other things, autocompletion for ansible in vim, but it is a bit outdated and seems to be a bit too heavy/complex, so it's perhaps not a good starting point.

gotmax23 commented 3 years ago

This would be especially helpful now that Ansible recommends using FQCNs.

gardar commented 1 year ago

Closing since I found the plugin coc-ansible which does this (and more). Been using it for the past few months with great success.