···6767Plug 'cuducos/yaml.nvim'
6868```
69697070+## Configuration
7171+7272+### Showing the YAML patch and value in Neovim's winbar
7373+7474+```lua
7575+vim.api.nvim_create_autocmd({ "FileType" }, {
7676+ pattern = { "yaml" },
7777+ callback = function()
7878+ vim.opt_local.winbar = [[%{%v:lua.require("yaml_nvim").get_yaml_key_and_value()%}]]
7979+ end,
8080+})
8181+```
8282+7083## Reporting bugs and contributing
71847285There is a mini toolchain to help you test the plugin in isolation using a container. It requires:
+11-8
lua/yaml_nvim/init.lua
···5757end
58585959M.view = function()
6060- assure_yaml_filetype(function()
6161- local node = document.get_key_relevant_to_cursor()
6262- if node == nil then
6363- return
6464- end
6060+ vim.notify(M.get_yaml_key_and_value())
6161+end
65626666- local parsed = pair.parse(node)
6767- vim.notify(parsed.human)
6868- end)
6363+M.get_yaml_key_and_value = function()
6464+ local restore_to = set_yaml_as_filetype()
6565+ local node = document.get_key_relevant_to_cursor()
6666+ if node == nil then
6767+ return
6868+ end
6969+ local parsed = pair.parse(node)
7070+ restore_filetype(restore_to)
7171+ return parsed.human
6972end
70737174M.yank = function(register)