From 7d2dbec8681b7511a2714e137448b99ee52bdf98 Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Wed, 15 May 2024 12:06:44 -0500 Subject: [PATCH] forgot to add nvim config files --- config/nvim/keymaps.lua | 15 +++++++++++++++ config/nvim/options.lua | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 config/nvim/keymaps.lua create mode 100644 config/nvim/options.lua diff --git a/config/nvim/keymaps.lua b/config/nvim/keymaps.lua new file mode 100644 index 0000000..0bd0d08 --- /dev/null +++ b/config/nvim/keymaps.lua @@ -0,0 +1,15 @@ +local keymap = vim.keymap +-- use jk to exit insert mode +keymap.set("i", "jk", "", { desc = "Exit insert mode with jk" }) +-- clear search highlights +keymap.set("n", "nh", ":nohl", { desc = "Clear search highlights" }) +-- window management +keymap.set("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically +keymap.set("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally +keymap.set("n", "se", "=", { desc = "Make splits equal size" }) -- make split windows equal width & height +keymap.set("n", "sx", "close", { desc = "Close current split" }) -- close current split window +keymap.set("n", "to", "tabnew", { desc = "Open new tab" }) -- open new tab +keymap.set("n", "tx", "tabclose", { desc = "Close current tab" }) -- close current tab +keymap.set("n", "tn", "tabn", { desc = "Go to next tab" }) -- go to next tab +keymap.set("n", "tp", "tabp", { desc = "Go to previous tab" }) -- go to previous tab +keymap.set("n", "tf", "tabnew %", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab diff --git a/config/nvim/options.lua b/config/nvim/options.lua new file mode 100644 index 0000000..1b05dc8 --- /dev/null +++ b/config/nvim/options.lua @@ -0,0 +1,21 @@ +local opt = vim.opt +opt.number = true +opt.relativenumber = true +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.expandtab = true +opt.autoindent = true +opt.wrap = false +opt.ignorecase = true +opt.smartcase = true +opt.termguicolors = true +opt.background = "dark" +opt.signcolumn = "yes" +opt.mouse = "a" +opt.cursorline = true +opt.backspace = "indent,eol,start" +opt.clipboard:append("unnamedplus") +opt.splitright = true +opt.splitbelow = true +opt.swapfile = false +vim.g.mapleader = " "