feat: luacats annotations
This commit is contained in:
parent
21b8cfb470
commit
29f9a5f7e4
2 changed files with 7 additions and 0 deletions
|
|
@ -1,11 +1,15 @@
|
|||
local M = {}
|
||||
|
||||
---@param bufnr integer
|
||||
---@param ns integer
|
||||
---@param hunk fugitive-ts.Hunk
|
||||
function M.highlight_hunk(bufnr, ns, hunk)
|
||||
local lang = hunk.lang
|
||||
if not lang then
|
||||
return
|
||||
end
|
||||
|
||||
---@type string[]
|
||||
local code_lines = {}
|
||||
for _, line in ipairs(hunk.lines) do
|
||||
table.insert(code_lines, line:sub(2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue