commit 9bc1efd68cc9e4c3b95f632dd589229fd9bfa8fb (patch)
parent 3a78a1b00ab5d3422bcdf3ce25b3f8d7b8a962fb
Author: Alex Karle <alex@alexkarle.com>
Date: Sun, 20 Feb 2022 18:19:32 -0500
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 :/)
Diffstat:
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/.config/nvim/colors/acme.lua 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
@@ -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", "<C-h>", "<C-w>h", { noremap = true })
+vim.api.nvim_set_keymap("n", "<C-j>", "<C-w>j", { noremap = true })
+vim.api.nvim_set_keymap("n", "<C-k>", "<C-w>k", { noremap = true })
+vim.api.nvim_set_keymap("n", "<C-l>", "<C-w>l", { noremap = true })