Added colorschemes written in Lua.

This commit is contained in:
Andrey Parhomenko 2023-08-29 17:39:24 +03:00
parent b33ba5a3f8
commit ff6cd1e5e1
5 changed files with 82 additions and 7 deletions

View file

@ -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") {
}

25
nvim/lua/color/cons.lua Normal file
View file

@ -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

16
nvim/lua/color/init.lua Normal file
View file

@ -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

34
nvim/lua/color/night.lua Normal file
View file

@ -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

View file

@ -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)