Adds pull when entering notes
This commit is contained in:
parent
c0cb36520e
commit
fad0c5c6c1
7 changed files with 63 additions and 41 deletions
|
|
@ -31,7 +31,7 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
|||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
callback = function(args)
|
||||
callback = function()
|
||||
print("Pushing changes...")
|
||||
-- Push twice, in case the credentials expired. Ugly hack, but it works
|
||||
local pushSuccess = os.execute("git push &> /dev/null")
|
||||
|
|
@ -42,3 +42,14 @@ vim.api.nvim_create_autocmd("VimLeavePre", {
|
|||
print("Done")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
print("Updating...")
|
||||
local command = "git pull --rebase --quiet --no-edit &> /dev/null"
|
||||
local pullSuccess = os.execute(command)
|
||||
if pullSuccess > 0 then
|
||||
os.execute(command)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
if false then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
|
|
|
|||
3
.config/nvim-notes/lua/plugins/nio.lua
Normal file
3
.config/nvim-notes/lua/plugins/nio.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
"nvim-neotest/nvim-nio",
|
||||
}
|
||||
|
|
@ -8,6 +8,9 @@ return {
|
|||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
opts = {
|
||||
ui = {
|
||||
enable = false,
|
||||
},
|
||||
workspaces = {
|
||||
{
|
||||
name = "notes",
|
||||
|
|
|
|||
|
|
@ -2,4 +2,11 @@ return {
|
|||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" }, -- if you use the mini.nvim suite
|
||||
opts = {},
|
||||
config = function()
|
||||
require("render-markdown").setup({
|
||||
bullet = {
|
||||
right_pad = 1,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue