feat: luacats annotations
This commit is contained in:
parent
21b8cfb470
commit
29f9a5f7e4
2 changed files with 7 additions and 0 deletions
|
|
@ -16,8 +16,11 @@ function M.check()
|
|||
vim.health.warn('vim-fugitive not detected (required for this plugin to be useful)')
|
||||
end
|
||||
|
||||
---@type string[]
|
||||
local common_langs = { 'lua', 'python', 'javascript', 'typescript', 'rust', 'go', 'c', 'cpp' }
|
||||
---@type string[]
|
||||
local available = {}
|
||||
---@type string[]
|
||||
local missing = {}
|
||||
|
||||
for _, lang in ipairs(common_langs) do
|
||||
|
|
|
|||
|
|
@ -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