diff options
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/.config/nvim/init.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/keymaps.lua | 12 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/lsp/handlers.lua | 2 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/plugins.lua | 26 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/user/telescope.lua | 4 | ||||
| -rw-r--r-- | nvim/.config/nvim/plugin/packer_compiled.lua | 5 |
6 files changed, 49 insertions, 2 deletions
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3d15c1d..1e33b39 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -11,6 +11,8 @@ require('material').setup{ } } +require("telescope").load_extension('harpoon') + require('catppuccin').setup({ transparent_background = true, }) diff --git a/nvim/.config/nvim/lua/user/keymaps.lua b/nvim/.config/nvim/lua/user/keymaps.lua index 07e8a49..f74ac25 100644 --- a/nvim/.config/nvim/lua/user/keymaps.lua +++ b/nvim/.config/nvim/lua/user/keymaps.lua @@ -64,7 +64,7 @@ keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts) -- Jumping quickly between two files -keymap("n", "<leader><leader>", ":bprevious<CR>", opts) +--[[ keymap("n", "<leader><leader>", ":bprevious<CR>", opts) ]] -- Centering after page moves or searching for something keymap("n", "<C-d>", "<C-d>zz", opts) @@ -79,6 +79,16 @@ keymap("n", "<F4>", ":CompetiTestRun<CR>", opts) --sourcing luasnips keymap("n", "<leader><leader>s", "<cmd> source ~/.config/nvim/lua/user/luasnip.lua<CR>", opts) +--telescope harpoon +keymap("n", "<leader>H", ":Telescope harpoon marks<CR>", opts) + +--harpoon +keymap("n", "<leader><leader>h", ":lua require('harpoon.ui').toggle_quick_menu()<CR>", opts) -- show harpoon menu +keymap("n", "<leader><leader>a", ":lua require('harpoon.mark').add_file()<CR>", opts) -- adding a file +keymap("n", "<leader><leader>n", ":lua require('harpoon.ui').nav_next()<CR>", opts) -- next file +keymap("n", "<leader><leader>b", ":lua require('harpoon.ui').nav_prev()<CR>", opts) -- prev file + + -- luasnips vim.keymap.set({ "i", "s" }, "<c-k>", function () diff --git a/nvim/.config/nvim/lua/user/lsp/handlers.lua b/nvim/.config/nvim/lua/user/lsp/handlers.lua index 2baf039..c45f2a9 100644 --- a/nvim/.config/nvim/lua/user/lsp/handlers.lua +++ b/nvim/.config/nvim/lua/user/lsp/handlers.lua @@ -76,7 +76,7 @@ local function lsp_keymaps(bufnr) bufnr, "n", "gl", - '<cmd>lua vim.diagnostic.open_float({ border = "rounded" })<CR>', + '<cmd>lua vim.diagnostic.goto_next({ border = "rounded" })<CR>', opts ) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", '<cmd>lua vim.diagnostic.goto_next({ border = "rounded" })<CR>', opts) diff --git a/nvim/.config/nvim/lua/user/plugins.lua b/nvim/.config/nvim/lua/user/plugins.lua index 2924fe6..2aba7e9 100644 --- a/nvim/.config/nvim/lua/user/plugins.lua +++ b/nvim/.config/nvim/lua/user/plugins.lua @@ -88,6 +88,9 @@ return packer.startup(function(use) use 'ellisonleao/gruvbox.nvim' use { "catppuccin/nvim", as = "catppuccin" } + -- harpoon + use "ThePrimeagen/harpoon" + -- cmp plugins use "hrsh7th/nvim-cmp" -- The completion plugin use "hrsh7th/cmp-buffer" -- buffer completions @@ -108,6 +111,29 @@ return packer.startup(function(use) use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters + --harpoon setup + 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, + }}) + + --compitest require('competitest').setup { local_config_file_name = ".competitest.lua", diff --git a/nvim/.config/nvim/lua/user/telescope.lua b/nvim/.config/nvim/lua/user/telescope.lua index 0706b51..9e6b240 100644 --- a/nvim/.config/nvim/lua/user/telescope.lua +++ b/nvim/.config/nvim/lua/user/telescope.lua @@ -87,6 +87,10 @@ telescope.setup { -- builtin picker }, extensions = { + harpoon = { + + + } -- Your extension configuration goes here: -- extension_name = { -- extension_config_key = value, diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index 5efe217..03eea64 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -160,6 +160,11 @@ _G.packer_plugins = { path = "/home/pengu/.local/share/nvim/site/pack/packer/start/gruvbox.nvim", url = "https://github.com/ellisonleao/gruvbox.nvim" }, + harpoon = { + loaded = true, + path = "/home/pengu/.local/share/nvim/site/pack/packer/start/harpoon", + url = "https://github.com/ThePrimeagen/harpoon" + }, ["impatient.nvim"] = { loaded = true, path = "/home/pengu/.local/share/nvim/site/pack/packer/start/impatient.nvim", |
