···67Plug 'cuducos/yaml.nvim'
68```
69000000000000070## Reporting bugs and contributing
7172There is a mini toolchain to help you test the plugin in isolation using a container. It requires:
···67Plug 'cuducos/yaml.nvim'
68```
6970+## Configuration
71+72+### Showing the YAML patch and value in Neovim's winbar
73+74+```lua
75+vim.api.nvim_create_autocmd({ "FileType" }, {
76+ pattern = { "yaml" },
77+ callback = function()
78+ vim.opt_local.winbar = [[%{%v:lua.require("yaml_nvim").get_yaml_key_and_value()%}]]
79+ end,
80+})
81+```
82+83## Reporting bugs and contributing
8485There is a mini toolchain to help you test the plugin in isolation using a container. It requires:
+11-8
lua/yaml_nvim/init.lua
···57end
5859M.view = function()
60- assure_yaml_filetype(function()
61- local node = document.get_key_relevant_to_cursor()
62- if node == nil then
63- return
64- end
6566- local parsed = pair.parse(node)
67- vim.notify(parsed.human)
68- end)
00000069end
7071M.yank = function(register)
···57end
5859M.view = function()
60+ vim.notify(M.get_yaml_key_and_value())
61+end
0006263+M.get_yaml_key_and_value = function()
64+ local restore_to = set_yaml_as_filetype()
65+ local node = document.get_key_relevant_to_cursor()
66+ if node == nil then
67+ return
68+ end
69+ local parsed = pair.parse(node)
70+ restore_filetype(restore_to)
71+ return parsed.human
72end
7374M.yank = function(register)