feat: minor steps on hightlighting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local lineBlame = function(input_file_path, comma_separated_mails)
|
||||
local ns = vim.api.nvim_create_namespace('line-blame');
|
||||
local lineBlame = function(input_file_path)
|
||||
local handler = io.popen("git blame -e " .. input_file_path .. " | awk '{ print $2$6}'")
|
||||
|
||||
if handler == nil then
|
||||
@@ -8,8 +9,8 @@ local lineBlame = function(input_file_path, comma_separated_mails)
|
||||
local result = handler:read("L")
|
||||
while result do
|
||||
for k, v in string.gmatch(result, "%(<(.+)>(%d+)%)") do
|
||||
print(k)
|
||||
print(v)
|
||||
-- print(input_file_path, k, v)
|
||||
local extid = vim.api.nvim_buf_set_extmark(0, ns, tonumber(v), 0, { end_row = tonumber(v), end_col = 30 ,virt_text = {[ "test", "WildMenu"]}})
|
||||
end
|
||||
result = handler:read("L")
|
||||
end
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
local blame = require("./line-blame.lua")
|
||||
local blame = require("./line-blame")
|
||||
|
||||
local defaultList = "one;two"
|
||||
vim.g.monkeyMailList = defaultList
|
||||
-- vim.g.monkeyUserList = defaultList
|
||||
vim.g.monkeyMailList = defaultList
|
||||
|
||||
local function setup(opts)
|
||||
vim.g.monkeyMailList = opts.monkeyMailList
|
||||
-- vim.g.monkeyUserList = opts.monkeyUserList
|
||||
end
|
||||
|
||||
local function observe()
|
||||
|
||||
local function blameCurrentFile()
|
||||
blame.lineBlame(vim.api.nvim_buf_get_name(0))
|
||||
end
|
||||
|
||||
return {
|
||||
setup = setup,
|
||||
observe = observe,
|
||||
blame = blame.lineBlame
|
||||
blame = blameCurrentFile
|
||||
}
|
||||
|
||||
-- NOTE:
|
||||
|
||||
Reference in New Issue
Block a user