aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/custom/plugins
diff options
context:
space:
mode:
authorNicholas Moore <nicholasvmoore@gmail.com>2025-05-13 16:59:19 -0500
committerNick Moore <nicholasvmoore@gmail.com>2025-10-29 07:38:18 -0500
commitb66e4efa7caae614335c694275133ef42384a98a (patch)
treefa97fd08e4a0fdecd94865b71e0b6bdd5fb6284b /nvim/lua/custom/plugins
parent45f088bb6c322ec6b9cfe2b07ff3230b20114280 (diff)
Refactor neovim config into multiple files
Diffstat (limited to 'nvim/lua/custom/plugins')
-rw-r--r--nvim/lua/custom/plugins/filetypes.lua15
-rw-r--r--nvim/lua/custom/plugins/harppon.lua37
-rw-r--r--nvim/lua/custom/plugins/remap.lua5
-rw-r--r--nvim/lua/custom/plugins/toggleterm.lua21
-rw-r--r--nvim/lua/custom/plugins/vim-be-good.lua5
-rw-r--r--nvim/lua/custom/plugins/vim-sleuth.lua3
-rw-r--r--nvim/lua/custom/plugins/which-key.lua3
7 files changed, 89 insertions, 0 deletions
diff --git a/nvim/lua/custom/plugins/filetypes.lua b/nvim/lua/custom/plugins/filetypes.lua
new file mode 100644
index 0000000..73c99f2
--- /dev/null
+++ b/nvim/lua/custom/plugins/filetypes.lua
@@ -0,0 +1,15 @@
+return {
+ vim.filetype.add {
+ extension = {
+ yml = 'yaml.ansible',
+ },
+ },
+
+ vim.filetype.add {
+ extension = {
+ jinja = 'jinja',
+ jinja2 = 'jinja',
+ j2 = 'jinja',
+ },
+ },
+}
diff --git a/nvim/lua/custom/plugins/harppon.lua b/nvim/lua/custom/plugins/harppon.lua
new file mode 100644
index 0000000..1fc29bb
--- /dev/null
+++ b/nvim/lua/custom/plugins/harppon.lua
@@ -0,0 +1,37 @@
+return {
+ {
+ 'ThePrimeagen/harpoon',
+ branch = 'harpoon2',
+ dependencies = { 'nvim-lua/plenary.nvim' },
+ config = function()
+ local harpoon = require 'harpoon'
+ harpoon:setup()
+ vim.keymap.set('n', '<leader>a', function()
+ harpoon:list():add()
+ end)
+ vim.keymap.set('n', '<C-e>', function()
+ harpoon.ui:toggle_quick_menu(harpoon:list())
+ end)
+ vim.keymap.set('n', '<leader>1', function()
+ harpoon:list():select(1)
+ end)
+ vim.keymap.set('n', '<leader>2', function()
+ harpoon:list():select(2)
+ end)
+ vim.keymap.set('n', '<leader>3', function()
+ harpoon:list():select(3)
+ end)
+ vim.keymap.set('n', '<leader>4', function()
+ harpoon:list():select(4)
+ end)
+
+ -- Toggle previous & next buffers stored within Harpoon list
+ vim.keymap.set('n', '<C-S-P>', function()
+ harpoon:list():prev()
+ end)
+ vim.keymap.set('n', '<C-S-N>', function()
+ harpoon:list():next()
+ end)
+ end,
+ },
+}
diff --git a/nvim/lua/custom/plugins/remap.lua b/nvim/lua/custom/plugins/remap.lua
new file mode 100644
index 0000000..367d21c
--- /dev/null
+++ b/nvim/lua/custom/plugins/remap.lua
@@ -0,0 +1,5 @@
+return {
+ -- Scroll by half page and keep cursor in middle
+ vim.keymap.set('n', '<C-d>', '<C-d>zz'),
+ vim.keymap.set('n', '<C-u>', '<C-u>zz'),
+}
diff --git a/nvim/lua/custom/plugins/toggleterm.lua b/nvim/lua/custom/plugins/toggleterm.lua
new file mode 100644
index 0000000..cc40f75
--- /dev/null
+++ b/nvim/lua/custom/plugins/toggleterm.lua
@@ -0,0 +1,21 @@
+return {
+ {
+ 'akinsho/toggleterm.nvim',
+ version = '*',
+ opts = {
+ start_in_insert = false,
+ persistent_mode = true,
+ shell = vim.o.shell,
+ auto_scroll = true,
+
+ -- Float options
+ float_opts = {
+ border = 'single',
+ title_pos = 'center',
+ },
+
+ -- Bindings
+ vim.keymap.set('n', '<leader>`', ':ToggleTerm direction=float<cr>', { desc = 'Open a floating terminal' }),
+ },
+ },
+}
diff --git a/nvim/lua/custom/plugins/vim-be-good.lua b/nvim/lua/custom/plugins/vim-be-good.lua
new file mode 100644
index 0000000..7e5c709
--- /dev/null
+++ b/nvim/lua/custom/plugins/vim-be-good.lua
@@ -0,0 +1,5 @@
+return {
+ {
+ 'ThePrimeagen/vim-be-good',
+ },
+}
diff --git a/nvim/lua/custom/plugins/vim-sleuth.lua b/nvim/lua/custom/plugins/vim-sleuth.lua
new file mode 100644
index 0000000..123ac6a
--- /dev/null
+++ b/nvim/lua/custom/plugins/vim-sleuth.lua
@@ -0,0 +1,3 @@
+return {
+ { 'tpope/vim-sleuth' }, -- Detect tabstop and shiftwidth automatically
+}
diff --git a/nvim/lua/custom/plugins/which-key.lua b/nvim/lua/custom/plugins/which-key.lua
new file mode 100644
index 0000000..1f73adc
--- /dev/null
+++ b/nvim/lua/custom/plugins/which-key.lua
@@ -0,0 +1,3 @@
+return {
+ -- { 'folke/which-key.nvim' },
+}