Simple tools to help developers working YAML in Neovim:
Command | Description |
---|---|
:YAMLView |
Shows the full path and value of the current key/value pair |
:YAMLYank [register] |
Yanks the full path and value of the current key/value pair. The default register is the unnamed one (" ) |
:YAMLYankKey [register] |
Yanks the full path of the key for the current key/value pair. The default register is the unnamed one (" ) |
:YAMLYankValue [regster] |
Yanks the value of the current key/value pair. The default register is the unnamed one (" ) |
:YAMLQuickfix |
Generates a quickfix with key/value pairs |
:YAMLTelescope |
Full path key/value fuzzy finder via Telescope if installed |
It requires Neovim 0.7 or newer, nvim-treesitter
with YAML support. Telescope is optional.
For Neovim 0.5 or 0.6, pin to 155c23d
.
Install with packer.nvim:
use {
"cuducos/yaml.nvim",
ft = {"yaml"}, -- optional
requires = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim" -- optional
},
}
Install with vim-plug:
" optional
Plug 'nvim-telescope/telescope.nvim'
" required
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'cuducos/yaml.nvim'