From 095753b76f1f20db0f9dfba40c4ddf90717aa830 Mon Sep 17 00:00:00 2001 From: goodhumored Date: Wed, 31 Jul 2024 21:50:02 +0300 Subject: [PATCH] switching tabs keymaps, completion keymaps, firenvim --- .config/nvim/init.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 7caee5f..8110224 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -113,6 +113,15 @@ vim.keymap.set("n", "", "", { desc = "Move focus to the right win vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) +vim.keymap.set("n", "", ":tabnext", { desc = "Switch to next tab", noremap = true, silent = true }) +vim.keymap.set("n", "", ":tabprev", { desc = "Switch to previous tab", noremap = true, silent = true }) +vim.keymap.set("n", "", ":tabnext", { desc = "Switch to next tab", noremap = true, silent = true }) +vim.keymap.set("n", "", ":tabprev", { desc = "Switch to previous tab", noremap = true, silent = true }) +vim.keymap.set("n", "tl", ":tabnext", { desc = "[T]ab right", noremap = true, silent = true }) +vim.keymap.set("n", "th", ":tabprev", { desc = "[T]ab left", noremap = true, silent = true }) +vim.keymap.set("n", "tj", ":tabfirst", { desc = "[T]ab home", noremap = true, silent = true }) +vim.keymap.set("n", "tk", ":tablast", { desc = "[T]ab end", noremap = true, silent = true }) + -- Move selected line(s) up vim.api.nvim_set_keymap("n", "", ":m .-2==", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "", ":m '<-2gv=gv", { noremap = true, silent = true }) @@ -618,9 +627,9 @@ require("lazy").setup({ -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display @@ -939,6 +948,8 @@ require("lazy").setup({ }) end, }, + -- firenvim (firefox neovim extension) + { "glacambre/firenvim", build = ":call firenvim#install(0)" }, }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and