feat: support OpenInGHFileLines command
This commit is contained in:
parent
374c081409
commit
b9daa9db78
3 changed files with 19 additions and 2 deletions
|
|
@ -15,6 +15,16 @@ end, {
|
|||
range = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("OpenInGHFileLines", function(opts)
|
||||
if opts.range == 0 then -- Nothing was selected
|
||||
openingh.open_file(opts.line1)
|
||||
else -- Current line or block was selected
|
||||
openingh.open_file(opts.line1, opts.line2)
|
||||
end
|
||||
end, {
|
||||
range = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("OpenInGHRepo", function()
|
||||
openingh.open_repo()
|
||||
end, {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue