pearofducks / ansible-vim

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

UltiSnips: add an option to remove options decriptions. #128

Closed gjherbiet closed 2 years ago

gjherbiet commented 2 years ago

This adds the --no-description option to UltiSnips/generate.py with effect to remove descriptions (that can be lengthy) for module options w/o default or choices.

Before:

snippet add_host "Add a host (and alternatively a group) to the ansible-playbook in-memory inventory" b
ansible.builtin.add_host:
    name: ${1:# The hostname/ip of the host to add to the inventory, can include a colon and a port number.}

    groups: ${3:# The groups to add the hostname to.}
endsnippet

After:

snippet add_host "Add a host (and alternatively a group) to the ansible-playbook in-memory inventory" b
ansible.builtin.add_host:
    name: ${1:}

    groups: ${3:}
endsnippet
pearofducks commented 2 years ago

Thanks for putting this together!