From 3a9c76d44f5c60c0f66acad9cbfbc8f255aff0dc Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sun, 26 May 2024 21:38:43 +0200 Subject: fine-adjustments --- .config/nvim/lua/simenandre/plugins/harpoon.lua | 20 +++++++------------- .config/nvim/lua/simenandre/plugins/plugins.lua | 21 +++++++++++++++++++++ .config/nvim/lua/simenandre/set.lua | 13 ++++++++++++- 3 files changed, 40 insertions(+), 14 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/simenandre/plugins/harpoon.lua b/.config/nvim/lua/simenandre/plugins/harpoon.lua index 3bd4896..ee2dfdb 100644 --- a/.config/nvim/lua/simenandre/plugins/harpoon.lua +++ b/.config/nvim/lua/simenandre/plugins/harpoon.lua @@ -15,23 +15,17 @@ return { harpoon.ui:toggle_quick_menu(harpoon:list()) end) - -- vim.keymap.set("n", "", function() - -- harpoon:list():select(1) - -- end) - -- vim.keymap.set("n", "", function() - -- harpoon:list():select(2) - -- end) - -- vim.keymap.set("n", "", function() - -- harpoon:list():select(3) - -- end) - -- vim.keymap.set("n", "", function() - -- harpoon:list():select(4) - -- end) - for _, idx in ipairs({ 1, 2, 3, 4, 5 }) do vim.keymap.set("n", string.format("%d", idx), function() harpoon:list():select(idx) end) end + + vim.keymap.set("n", "", function() + harpoon:list():prev() + end) + vim.keymap.set("n", "", function() + harpoon:list():next() + end) end, } diff --git a/.config/nvim/lua/simenandre/plugins/plugins.lua b/.config/nvim/lua/simenandre/plugins/plugins.lua index 2dfcf73..e502cca 100644 --- a/.config/nvim/lua/simenandre/plugins/plugins.lua +++ b/.config/nvim/lua/simenandre/plugins/plugins.lua @@ -13,6 +13,23 @@ return { }, }, }, + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, { -- Useful plugin to show you pending keybinds. "folke/which-key.nvim", event = "VimEnter", -- Sets the loading event to 'VimEnter' @@ -138,6 +155,10 @@ return { vim.keymap.set("n", "sn", function() builtin.find_files({ cwd = vim.fn.stdpath("config") }) end, { desc = "[S]earch [N]eovim files" }) + + if vim.fn.argv(0) == "" then + builtin.find_files() + end end, }, diff --git a/.config/nvim/lua/simenandre/set.lua b/.config/nvim/lua/simenandre/set.lua index c1248ee..1bd1b6c 100644 --- a/.config/nvim/lua/simenandre/set.lua +++ b/.config/nvim/lua/simenandre/set.lua @@ -1,4 +1,3 @@ --- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = " " @@ -65,8 +64,20 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 + +vim.opt.tabstop = 2 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 2 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.colorcolumn = "80" +vim.opt.wrap = false + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` +-- -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- cgit v1.2.3