aboutsummaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorSimen A. W. Olsen <so@bjerk.io>2024-05-26 21:38:43 +0200
committerSimen A. W. Olsen <so@bjerk.io>2024-05-26 21:38:43 +0200
commit3a9c76d44f5c60c0f66acad9cbfbc8f255aff0dc (patch)
tree6068d8d27b2108535bbe5359c6934d14f71923ce /.config
parenta2f43302e1524cc8fe38791e0fdc00a3695fb76b (diff)
downloaddotfiles-3a9c76d44f5c60c0f66acad9cbfbc8f255aff0dc.tar.gz
dotfiles-3a9c76d44f5c60c0f66acad9cbfbc8f255aff0dc.zip
fine-adjustments
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/lua/simenandre/plugins/harpoon.lua20
-rw-r--r--.config/nvim/lua/simenandre/plugins/plugins.lua21
-rw-r--r--.config/nvim/lua/simenandre/set.lua13
3 files changed, 40 insertions, 14 deletions
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", "<C-j>", function()
- -- harpoon:list():select(1)
- -- end)
- -- vim.keymap.set("n", "<C-k>", function()
- -- harpoon:list():select(2)
- -- end)
- -- vim.keymap.set("n", "<C-l>", function()
- -- harpoon:list():select(3)
- -- end)
- -- vim.keymap.set("n", "<C-[>", function()
- -- harpoon:list():select(4)
- -- end)
-
for _, idx in ipairs({ 1, 2, 3, 4, 5 }) do
vim.keymap.set("n", string.format("<leader>%d", idx), function()
harpoon:list():select(idx)
end)
end
+
+ vim.keymap.set("n", "<A-S-P>", function()
+ harpoon:list():prev()
+ end)
+ vim.keymap.set("n", "<A-S-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 = {
+ { "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
+ { "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
+ { "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
+ { "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
+ { "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
+ },
+ },
{ -- 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", "<leader>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 <space> 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