Skip to content

ashleyghooper/ansible-doc.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read Ansible documentation from within Neovim

This plugin lets you open documentation as produced by ansible-doc right within Neovim.

Screenshot of Neovim showing the documentation of an Ansible module

Installation

Install this like any other Neovim plugin. You will need Ansible and more specifically ansible-doc installed on your system

Configuration

This is a no-config plugin, it works out of the box.

Usage

The :AnsibleDoc command work similar to the ansible-doc CLI binary: you give it the name of the module as the one and only argument.

AnsibleDoc ansible.builtin.command

Status

It mostly works, but because there is no official JSON schema for the output of ansible-doc there is a chance that I missed something. Other than testing there are a couple of things I would like to do before I call this plugin finished:

  • Handle inline links (L(<text>,<url)) in a reasonable way
  • Make gO work (open table of contents in location list)
  • Proper formatting (with line breaks and stuff) and highlighting (as YAML) of sample values
  • A library API (Lua and Vim script)
  • Documentation covering the command, library and syntax groups that can be overridden
  • Some warning mechanism to detect unhandled keys in the JSON; otherwise I will miss it when there is something missing from the rendered document

License

Released under the MIT (Expat) license. See the License file for details.

About

Read Ansible documentation from within Neovim (mirror)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Lua 86.0%
  • Vim Script 10.9%
  • Shell 2.9%
  • Makefile 0.2%