Skip to content

Commit

Permalink
make the get function for yaml key be less generic get_yaml_key_and_v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
joshzcold committed Oct 30, 2023
1 parent 13d9d0a commit b67b581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Plug 'cuducos/yaml.nvim'
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "yaml" },
callback = function()
vim.opt_local.winbar = [[%{%v:lua.require("yaml_nvim").get()%}]]
vim.opt_local.winbar = [[%{%v:lua.require("yaml_nvim").get_yaml_key_and_value()%}]]
end,
})
```
Expand Down
4 changes: 2 additions & 2 deletions lua/yaml_nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ local yank = function(key, value, register)
end

M.view = function()
vim.notify(M.get())
vim.notify(M.get_yaml_key_and_value())
end

M.get = function()
M.get_yaml_key_and_value = function()
local out = assure_yaml_filetype(function()
local node = document.get_key_relevant_to_cursor()
if node == nil then
Expand Down

0 comments on commit b67b581

Please sign in to comment.