Skip to content

Commit

Permalink
Remove yaml wrapper functions from get_yaml_key
Browse files Browse the repository at this point in the history
  • Loading branch information
joshzcold committed Nov 3, 2023
1 parent e2e6e21 commit afb7f92
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lua/yaml_nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,11 @@ M.get_yaml_key_and_value = function()
end

M.get_yaml_key = function()
local restore_to = set_yaml_as_filetype()
local node = document.get_key_relevant_to_cursor()
local node = get_current_yaml_node()
if node == nil then
return
end
local parsed = pair.parse(node)
restore_filetype(restore_to)
return parsed.key
return node.key
end

M.yank = function(register)
Expand Down

0 comments on commit afb7f92

Please sign in to comment.