From 3cb527cbd830374ea6a3768b51557d69cb5d08e2 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 24 Sep 2023 09:14:27 -0400 Subject: Add easyalign + fugitive semantics --- lua/ben/plugins/easyalign.lua | 10 ++++++++++ lua/ben/plugins/fugitive.lua | 12 ++++++------ lua/ben/plugins/telescope.lua | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 lua/ben/plugins/easyalign.lua (limited to 'lua/ben') diff --git a/lua/ben/plugins/easyalign.lua b/lua/ben/plugins/easyalign.lua new file mode 100644 index 0000000..fcf254b --- /dev/null +++ b/lua/ben/plugins/easyalign.lua @@ -0,0 +1,10 @@ +return { + "junegunn/vim-easy-align", + event = { "BufRead", "BufNewFile" }, + config = function() + -- Start interactive EasyAlign in visual mode (e.g., vipga) + vim.api.nvim_set_keymap("x", "ga", "(EasyAlign)", {}) + -- Start interactive EasyAlign for a motion/text object (e.g., gaip) + vim.api.nvim_set_keymap("n", "ga", "(EasyAlign)", {}) + end, +} diff --git a/lua/ben/plugins/fugitive.lua b/lua/ben/plugins/fugitive.lua index 322c8e9..6dee028 100644 --- a/lua/ben/plugins/fugitive.lua +++ b/lua/ben/plugins/fugitive.lua @@ -6,11 +6,11 @@ return { return vim.fn.isdirectory(".git") == 1 end, config = function() - vim.keymap.set("n", "gs", ":G") - vim.keymap.set("n", "gd", ":G difftool") - vim.keymap.set("n", "gm", ":Gvdiffsplit!") - vim.keymap.set("n", "gc", ":G commit") - vim.keymap.set("n", "gpp", ":G push") - vim.keymap.set("n", "gpl", ":G pull") + vim.keymap.set("n", "gs", ":G") -- G.it S.tatus + vim.keymap.set("n", "gd", ":G difftool") -- G.it D.iff + vim.keymap.set("n", "gm", ":Gvdiffsplit!") -- G.it M.erge + vim.keymap.set("n", "gc", ":G commit") -- G.it C.ommit + vim.keymap.set("n", "gpu", ":G push") -- G.it P.ush U.pstream + vim.keymap.set("n", "gpl", ":G pull") -- G.it P.ull L.atest end, } diff --git a/lua/ben/plugins/telescope.lua b/lua/ben/plugins/telescope.lua index d6b4b88..81e550d 100644 --- a/lua/ben/plugins/telescope.lua +++ b/lua/ben/plugins/telescope.lua @@ -5,7 +5,7 @@ return { "nvim-lua/plenary.nvim", { "joaomsa/telescope-orgmode.nvim", - event = "VeryLazy", + lazy = true, config = function() require("telescope").load_extension("orgmode") end, -- cgit v1.2.3