.config/nvim/lua/local/tig.lua

changeset 1076
15007f695dfb
parent 1074
91b42a87c3d9
child 1085
c2d11f022cf0
equal deleted inserted replaced
1075:3b88450bda15 1076:15007f695dfb
22 22
23 local function setup(config) 23 local function setup(config)
24 api.nvim_create_user_command("Tig", tig, { nargs = "*", complete = "file" }) 24 api.nvim_create_user_command("Tig", tig, { nargs = "*", complete = "file" })
25 25
26 api.nvim_create_user_command("TigBlame", function() 26 api.nvim_create_user_command("TigBlame", function()
27 tig({fargs = {"blame", "+" .. fn.line("."), "--", fn.expand("%")}}) 27 tig({ fargs = { "blame", "+" .. fn.line("."), "--", fn.expand("%") } })
28 end, {}) 28 end, {})
29 29
30 api.nvim_create_user_command("TigLog", function() 30 api.nvim_create_user_command("TigLog", function()
31 tig({fargs = {"log", "-p", "--", fn.expand("%")}}) 31 tig({ fargs = { "log", "-p", "--", fn.expand("%") } })
32 end, {}) 32 end, {})
33 end 33 end
34 34
35 return { 35 return {
36 setup = setup 36 setup = setup,
37 } 37 }

mercurial