diff options
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/config/init.lua | 10 | ||||
-rw-r--r-- | .config/nvim/lua/config/map.lua | 14 | ||||
-rw-r--r-- | .config/nvim/lua/config/opt.lua | 27 | ||||
-rw-r--r-- | .config/nvim/lua/config/plg.lua | 19 |
4 files changed, 70 insertions, 0 deletions
diff --git a/.config/nvim/lua/config/init.lua b/.config/nvim/lua/config/init.lua new file mode 100644 index 0000000..c14e595 --- /dev/null +++ b/.config/nvim/lua/config/init.lua @@ -0,0 +1,10 @@ +require("config.map") +require("config.opt") +require("config.plg") + +-- Colorscheme configuration +require("gruvbox").setup({ + italic = { strings = false, emphasis = false, comments = false }, + transparent_mode = true +}) +vim.cmd("colorscheme gruvbox") diff --git a/.config/nvim/lua/config/map.lua b/.config/nvim/lua/config/map.lua new file mode 100644 index 0000000..24a286f --- /dev/null +++ b/.config/nvim/lua/config/map.lua @@ -0,0 +1,14 @@ +local key = vim.keymap + +vim.g.mapleader = " " +vim.g.localleader = " " + +-- movement between splits +key.set("n", "<C-h>", "<C-w>h") +key.set("n", "<C-j>", "<C-w>j") +key.set("n", "<C-k>", "<C-w>k") +key.set("n", "<C-l>", "<C-w>l") +key.set("n", "<C-L>", ":vs<CR>") +key.set("n", "<C-J>", ":sp<CR>") + +key.set("n", "<Esc><Esc>", ":nohlsearch<CR>", { silent = true }) diff --git a/.config/nvim/lua/config/opt.lua b/.config/nvim/lua/config/opt.lua new file mode 100644 index 0000000..ab65cd5 --- /dev/null +++ b/.config/nvim/lua/config/opt.lua @@ -0,0 +1,27 @@ +local opt = vim.opt + +-- tabs +opt.tabstop = 4 +opt.softtabstop = 4 +opt.shiftwidth = 4 +opt.expandtab = true +opt.smartindent = true + +-- search +opt.showmatch = true +opt.ignorecase = true +opt.smartcase = true + +opt.swapfile = false -- noswapfile +opt.undofile = true -- persistent undo + +vim.cmd("syntax on") +opt.termguicolors = true + +opt.number = true +opt.relativenumber = true +opt.numberwidth = 2 +opt.cursorline = true + +opt.splitright = true +opt.splitbelow = true diff --git a/.config/nvim/lua/config/plg.lua b/.config/nvim/lua/config/plg.lua new file mode 100644 index 0000000..c08d99c --- /dev/null +++ b/.config/nvim/lua/config/plg.lua @@ -0,0 +1,19 @@ +-- Initialize lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +local plugins = { + { "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...} +} + +require("lazy").setup(plugins, {}) |