Skip to content

Commit

Permalink
add auto commit push for notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BSathvik committed Dec 29, 2023
1 parent cdf7a10 commit 3bca798
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions configs/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ require("lazy").setup({
event = "VeryLazy",
dependencies = "nvim-lua/plenary.nvim",
config = function()
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
command = [[!cd ~/Documents/gdrive/notes && git add . && git commit -m "update notes" && git push origin]],
pattern = "*.norg",
})

require("neorg").setup({
load = {
["core.defaults"] = {}, -- Loads default behaviour
Expand Down Expand Up @@ -429,6 +434,14 @@ require("lazy").setup({
end,
},

{
"ray-x/lsp_signature.nvim",
event = "VeryLazy",
config = function(_, opts)
require("lsp_signature").setup(opts)
end,
},

{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
Expand Down Expand Up @@ -587,8 +600,11 @@ vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = tr
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })

-- Setup shortcuts for switching buffer
vim.keymap.set("n", "¬", ":bnext<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "˙", ":bprevious<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "'", ":bnext<CR>", { noremap = true, silent = true })
vim.keymap.set("n", ";", ":bprevious<CR>", { noremap = true, silent = true })

-- Hide all other split windows
vim.keymap.set("n", "<C-w>z", ":vertical resize<CR>", { noremap = true, silent = true })

-- Diagnostic keymaps
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float)
Expand Down

0 comments on commit 3bca798

Please sign in to comment.