From 9bc1efd68cc9e4c3b95f632dd589229fd9bfa8fb Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sun, 20 Feb 2022 18:19:32 -0500 Subject: [PATCH] nvim: Add initial from-scratch neovim config With acme inspired colors, of course! I've held off on adding full editor support to this repo for a while. I made it really far on vi(1) alone :) However, as I get closer to using this as a daily driver, I need a _slightly_ more powerful editor! I chose neovim because: 1. I didn't need to finagle t_Co & friends to get the right colors 2. I think vim9's new scripting language should have been lua So in protest of a new VimL, we have a full-lua config! We'll see how far it goes. (I've also been mucking around with acme(1) itself, but I don't want to be that attached to my mouse :/) --- .config/nvim/colors/acme.lua | 32 ++++++++++++++++++++++++++++++++ .config/nvim/init.lua | 8 ++++++++ 2 files changed, 40 insertions(+) create mode 100644 .config/nvim/colors/acme.lua create mode 100644 .config/nvim/init.lua diff --git a/.config/nvim/colors/acme.lua b/.config/nvim/colors/acme.lua new file mode 100644 index 0000000..9698997 --- /dev/null +++ b/.config/nvim/colors/acme.lua @@ -0,0 +1,32 @@ +-- acme.vim -- acme-inspired colors +-- +-- currently only tested on st(1) with the following colorname[]: +-- +-- /* 8 normal colors */ +-- "#000000", +-- "#ad4f4f", +-- "#468747", +-- "#8f7734", +-- "#268bd2", +-- "#888aca", +-- "#6aa7a8", +-- "#f3f3d3", +-- +-- /* 8 bright colors */ +-- "#878781", +-- "#ffdddd", +-- "#ebffeb", +-- "#edeea5", +-- "#ebffff", +-- "#96d197", +-- "#a1eeed", +-- "#ffffeb", + +vim.cmd [[syntax off]] +vim.opt.background = 'light' + +vim.highlight.create('StatusLine', { ctermbg = 14, ctermfg = 0, cterm = "None" }) +vim.highlight.create('StatusLineNC', { ctermbg = 12, ctermfg = 0, cterm = "None" }) +vim.highlight.create('VertSplit', { ctermbg = 12, ctermfg = 0, cterm = "None" }) +vim.highlight.create('Visual', { ctermbg = 11, ctermfg = 0, cterm = "None" }) +vim.highlight.create('LineNr', { ctermbg = 15, ctermfg = 8, cterm = "None" }) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..aea4455 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,8 @@ +-- init.lua ; my nvim config +vim.cmd [[colorscheme acme]] + +-- Switch between windows with Ctrl-h/j/k/l +vim.api.nvim_set_keymap("n", "", "h", { noremap = true }) +vim.api.nvim_set_keymap("n", "", "j", { noremap = true }) +vim.api.nvim_set_keymap("n", "", "k", { noremap = true }) +vim.api.nvim_set_keymap("n", "", "l", { noremap = true }) -- libgit2 1.1.1