Files
emmet-vim/lua/emmet_utils.lua
2026-03-21 16:18:37 -07:00

25 lines
340 B
Lua

local M = {}
M.get_node_at_cursor = function()
local node = vim.treesitter.get_node()
if not node then
return nil
end
while node do
local node_type = node:type()
if node_type == "element" then
return "html"
elseif node_type == "stylesheet" then
return "css"
end
node = node:parent()
end
return ""
end
return M