This commit is contained in:
hrsh7th
2021-09-29 21:20:35 +09:00
parent f56e6b5ee4
commit a63a1a23e9
3 changed files with 21 additions and 14 deletions

View File

@@ -15,6 +15,13 @@ misc.concat = function(list1, list2)
return new_list
end
---Get cursor before line
---@return string
misc.get_cursor_before_line = function()
local cursor = vim.api.nvim_win_get_cursor(0)
return string.sub(vim.api.nvim_get_current_line(), 1, cursor[2])
end
---Merge two tables recursively
---@generic T
---@param v1 T