Compare commits
No commits in common. "0578a3dede7eda7225432f0a93b9bef43e26e2d0" and "cf5425bec3157496f02621754e02d07593a10e55" have entirely different histories.
0578a3dede
...
cf5425bec3
@ -191,10 +191,7 @@ local function spec(use)
|
||||
"TimUntersberger/neogit",
|
||||
requires = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
config = function ()
|
||||
require("valeth.packer.neogit")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
local neogit = require("neogit")
|
||||
|
||||
local function git_status()
|
||||
neogit.open()
|
||||
end
|
||||
|
||||
local function git_commit()
|
||||
neogit.open({ "commit" })
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<Leader>vs", git_status)
|
||||
vim.keymap.set("n", "<Leader>vc", git_commit)
|
||||
|
||||
neogit.setup()
|
@ -10,14 +10,11 @@ local function session_name()
|
||||
end
|
||||
end
|
||||
|
||||
local function started_without_args()
|
||||
return vim.fn.argc(-1) == 0
|
||||
end
|
||||
|
||||
-- Only restore and save session if NeoVim was started without any arguments
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
if started_without_args() then
|
||||
local started_without_args = vim.fn.argc(-1) == 0
|
||||
|
||||
if started_without_args then
|
||||
resession.load(session_name(), { dir = "dirsession", silence_errors = true })
|
||||
end
|
||||
end
|
||||
@ -25,9 +22,7 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
||||
|
||||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
callback = function()
|
||||
if started_without_args() then
|
||||
resession.save(session_name(), { dir = "dirsession", notify = false })
|
||||
end
|
||||
resession.save(session_name(), { dir = "dirsession", notify = false })
|
||||
end
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user