nvim

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7af6a169ff1b3bab184fd2b3370f6aa4fdab917e
parent 09f62ddc948116243b604bc8366628195f6ed415
Author: Andrew <andrewlaack1@gmail.com>
Date:   Thu, 28 Nov 2024 11:12:08 -0600

Added harpoon and config

Diffstat:
Mlua/core/keymaps.lua | 16++++++++++++++--
Mlua/core/plugins.lua | 38+++++++++++++++++++++++++++++++++++---
Mplugin/packer_compiled.lua | 5+++++
3 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua @@ -37,8 +37,8 @@ vim.api.nvim_set_keymap("t", "<C-r>", "<C-\\><C-n>", { noremap = true, silent = --- Open netrw -vim.api.nvim_set_keymap("n", "<leader>n", ":Explore<CR>", { noremap = true, silent = true }) +-- Open netrw +vim.api.nvim_set_keymap("n", "<leader>n", ":Ex<CR>", { noremap = true, silent = true }) -- Spell check vim.keymap.set('n', '<Leader>s', function() @@ -65,6 +65,7 @@ vim.keymap.set("n", "<leader>b<Left>", ":bp<CR>", { noremap = true, silent = tru -- Ctrl+Backspace to delete the previous word (same as browser... sorry, not sorry) vim.keymap.set('i', '<C-h>', '<C-w>', { noremap = true, silent = true }) + -- Define how to use snippets vim.cmd[[ imap <silent><expr> <C-y> luasnip#expand_or_jumpable() ? '<Plug>luasnip-expand-or-jump' : '<Tab>' @@ -104,3 +105,14 @@ vim.api.nvim_set_keymap('i', '<C-Right>', '<C-o>w', { noremap = true, silent = t vim.api.nvim_set_keymap('n', '<C-Left>', 'b', { noremap = true, silent = true }) vim.api.nvim_set_keymap('v', '<C-Left>', 'b', { noremap = true, silent = true }) vim.api.nvim_set_keymap('i', '<C-Left>', '<C-o>b', { noremap = true, silent = true }) + +-- Harpoon dem bois +vim.api.nvim_set_keymap('n', '<leader>hm', ':lua require("harpoon.mark").add_file()<CR>', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '<leader>fh', ':lua require("harpoon.ui").toggle_quick_menu()<CR>', { noremap = true, silent = true }) + +local map = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +for i = 1, 9 do + map('n', '<leader>' .. i, ':lua require("harpoon.ui").nav_file(' .. i .. ')<CR>', opts) +end diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua @@ -25,9 +25,6 @@ require("luasnip").config.set_config({ -- Setting LuaSnip config -- Enable autotriggered snippets enable_autosnippets = true, - - -- Use Tab (or some other key if you prefer) to trigger visual selection - store_selection_keys = "<C-m>", }) -- tex compile features @@ -100,13 +97,48 @@ require("luasnip").config.set_config({ -- Setting LuaSnip config }, }) + -- this is freaking awesome use('rlane/pounce.nvim') + require'pounce'.setup{ accept_keys = "TNSERIOADHFUYWPMVXZCGBJKLQ", accept_best_key = "<enter>", multi_window = true, debug = false, } + + use ('ThePrimeagen/harpoon') + require("harpoon").setup({ + + global_settings = { + -- sets the marks upon calling `toggle` on the ui, instead of require `:w`. + save_on_toggle = false, + + -- saves the harpoon file upon every change. disabling is unrecommended. + save_on_change = true, + + -- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`. + enter_on_sendcmd = false, + + -- closes any tmux windows harpoon that harpoon creates when you close Neovim. + tmux_autoclose_windows = false, + + -- filetypes that you want to prevent from adding to the harpoon list menu. + excluded_filetypes = { "harpoon" }, + + -- set marks specific to each git branch inside git repository + mark_branch = false, + + -- enable tabline with harpoon marks + tabline = false, + tabline_prefix = " ", + tabline_suffix = " ", + } + + + }) + + use({ "kylechui/nvim-surround", tag = "*", -- Use for stability; omit to use `main` branch for the latest features diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua @@ -89,6 +89,11 @@ _G.packer_plugins = { path = "/home/andrew/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, + harpoon = { + loaded = true, + path = "/home/andrew/.local/share/nvim/site/pack/packer/start/harpoon", + url = "https://github.com/ThePrimeagen/harpoon" + }, ["lsp-zero.nvim"] = { loaded = true, path = "/home/andrew/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",