diff --git a/nvim/init.lua b/nvim/init.lua index b30cb02..a36ebef 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -5,14 +5,13 @@ vim.opt.swapfile = false vim.o.number = true vim.o.cursorline = true -vim.api.nvim_cmd({ - cmd = 'colorscheme', - args = {'jien'}, -}, {}) require("indent") require("maps") +local hls = require("color.night").hls +require("color").apply_hls((hls)) + require("bootstrap") require("dep") { } diff --git a/nvim/lua/color/cons.lua b/nvim/lua/color/cons.lua new file mode 100644 index 0000000..aeeae74 --- /dev/null +++ b/nvim/lua/color/cons.lua @@ -0,0 +1,25 @@ +-- Constants +local package = {} + +package.colors = { + none = "none", + black = "#000000", + white = "#FFFFFF", + gray = "#777777", + lgray = "#BBBBBB", + + red = "#FF0000", + green = "#00FF00", + blue = "#0000FF", + lblue = "#0089ff", + + purple = "#cc33ff", + lpurple = "#cc66ff", + + yellow = "#ffcc00", + lyellow = "#ffff00", + + orange = "#ff9900", +} + +return package diff --git a/nvim/lua/color/init.lua b/nvim/lua/color/init.lua new file mode 100644 index 0000000..04bc242 --- /dev/null +++ b/nvim/lua/color/init.lua @@ -0,0 +1,16 @@ +-- Main package for highlighting +local c = require("color.cons").colors +local package = {} + +function package.apply_hls(hls) + hls = hls or {} + for k, hl in pairs(hls) do + vim.api.nvim_set_hl( + 0, + k, + hl + ) + end +end + +return package diff --git a/nvim/lua/color/night.lua b/nvim/lua/color/night.lua new file mode 100644 index 0000000..a956a70 --- /dev/null +++ b/nvim/lua/color/night.lua @@ -0,0 +1,34 @@ +-- The night color scheme +local package = {} + +local c = require("color.cons").colors + +package.hls = { + Normal = {fg = c.white, bg = c.black}, + + LineNr = {fg = c.black, bg=c.white}, + + Cursor = {fg = c.black, bg = c.green}, + CursorLine = {bold = true}, + + StatusLine = {fg = c.black, bg = c.red}, + StatusLineNC = {fg = c.black, bg = c.lgray}, + + IncSearch = {fg=c.black, bg=c.purple}, + Search = {fg=c.black, bg=c.purple}, + Pmenu = {fg=c.black, bg=c.lpurple}, + + String = {fg=c.red}, + Constant = {fg=c.red}, + Special = {fg=c.lblue}, + + Function = {fg = c.lyellow}, + Statement = {fg = c.lyellow}, + Type = {fg = c.green}, + + Comment = {fg=c.purple}, + Folded = {fg=c.black, bg=lgray}, + FoldColumn = {fg=c.black, bg=lgray}, +} + +return package diff --git a/nvim/lua/maps.lua b/nvim/lua/maps.lua index dd45ea1..6891c82 100644 --- a/nvim/lua/maps.lua +++ b/nvim/lua/maps.lua @@ -4,17 +4,18 @@ vim.o.timeout = false local map = vim.api.nvim_set_keymap -- Configuration fast editing. -local opts = {noremap = true, silent = true} +local opts = {silent = true} map('n', '\\rconf', ':source $HOME/lib/nvim/init.lua\n', opts) map('n', '\\econf', ':e $HOME/lib/nvim/init.lua\n', opts) map('n', '\\rmap', ':source $HOME/lib/nvim/lua/maps.lua\n', opts) map('n', '\\emap', ':e $HOME/lib/nvim/lua/maps.lua\n', opts) - map('n', '\\rcolor', ':colorscheme jien\n', opts) - map('n', '\\ecolor', ':e $HOME/lib/nvim/colors/jien.vim\n', opts) -- Moving around. map('n', '\\home', ":cd $HOME\n", opts) + map('n', '\\lex', ":Lexplore\n", opts) + map('n', '\\ex', ":Explore\n", opts) + -- Search map('n', '\\noh', ':noh\n', opts)