refactor: add comments & update type anotation

This commit is contained in:
Smirnov Olexander 2022-06-22 14:42:14 +03:00
parent c1de269ef4
commit 250d4de718
7 changed files with 14 additions and 6 deletions

View file

@ -18,9 +18,9 @@ local function get_name_defaults()
}
end
---@param row any
---@param col any
---@param bufnr any
---@param row string
---@param col string
---@param bufnr string
---@return table|nil
function M.get_struct_node_at_pos(row, col, bufnr)
local query = M.querys.struct_block .. " " .. M.querys.em_struct_block
@ -33,6 +33,10 @@ function M.get_struct_node_at_pos(row, col, bufnr)
end
end
---@param row string
---@param col string
---@param bufnr string
---@return table|nil
function M.get_func_method_node_at_pos(row, col, bufnr)
local query = M.querys.func .. " " .. M.querys.method_name
local bufn = bufnr or vim.api.nvim_get_current_buf()