customization: darker colors

This commit is contained in:
siduck76 2021-04-06 08:29:37 +05:30
parent afff99e545
commit e948f32cd5
6 changed files with 51 additions and 50 deletions

View File

@ -36,7 +36,7 @@ local indent = 2
g.indentLine_enabled = 1 g.indentLine_enabled = 1
g.indent_blankline_char = "" g.indent_blankline_char = ""
cmd("hi IndentBlanklineChar guifg=#373b43") cmd("hi IndentBlanklineChar guifg=#2a2e36")
g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_filetype_exclude = {"help", "terminal"}
g.indent_blankline_buftype_exclude = {"terminal"} g.indent_blankline_buftype_exclude = {"terminal"}
@ -48,25 +48,28 @@ require("treesitter.lua")
require("mappings.lua") require("mappings.lua")
-- highlights -- -- highlights --
cmd("hi LineNr guibg=NONE") cmd("hi LineNr guifg=#383c44 guibg=NONE")
cmd("hi Comment guifg=#3d4149")
cmd("hi SignColumn guibg=NONE") cmd("hi SignColumn guibg=NONE")
cmd("hi VertSplit guibg=NONE guifg=#3e4451") cmd("hi VertSplit guibg=NONE guifg=#2a2e36")
cmd("hi DiffAdd guifg=#81A1C1 guibg = none") cmd("hi DiffAdd guifg=#81A1C1 guibg = none")
cmd("hi DiffChange guifg =#3A3E44 guibg = none") cmd("hi DiffChange guifg =#3A3E44 guibg = none")
cmd("hi DiffModified guifg = #81A1C1 guibg = none") cmd("hi DiffModified guifg = #81A1C1 guibg = none")
cmd("hi EndOfBuffer guifg=#282c34") cmd("hi EndOfBuffer guifg=#1e222a")
-- telescope stuff and popupmenu -- telescope stuff and popupmenu
cmd("hi TelescopeBorder guifg=#3e4451") cmd("hi TelescopeBorder guifg=#2a2e36")
cmd("hi TelescopePromptBorder guifg=#3e4451") cmd("hi TelescopePromptBorder guifg=#2a2e36")
cmd("hi TelescopeResultsBorder guifg=#3e4451") cmd("hi TelescopeResultsBorder guifg=#2a2e36")
cmd("hi TelescopePreviewBorder guifg=#525865") cmd("hi TelescopePreviewBorder guifg=#525865")
cmd("hi PmenuSel guibg=#98c379") cmd("hi PmenuSel guibg=#98c379")
cmd("hi Pmenu guibg=#282c34")
-- tree folder name , icon color -- tree folder name , icon color
cmd("hi NvimTreeFolderIcon guifg = #61afef") cmd("hi NvimTreeFolderIcon guifg = #61afef")
cmd("hi NvimTreeFolderName guifg = #61afef") cmd("hi NvimTreeFolderName guifg = #61afef")
cmd("hi NvimTreeIndentMarker guifg=#545862") cmd("hi NvimTreeIndentMarker guifg=#383c44")
cmd("hi Normal guibg=NONE ctermbg=NONE") cmd("hi Normal guibg=NONE ctermbg=NONE")
@ -78,17 +81,6 @@ require("lspkind").init(
) )
-- nvimTree bg color -- nvimTree bg color
cmd("hi CustomExplorerBg guibg=#242830")
vim.api.nvim_exec(
[[
augroup NvimTree
au!
au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg
augroup END
]],
false
)
-- hide line numbers in terminal windows -- hide line numbers in terminal windows
vim.api.nvim_exec([[ vim.api.nvim_exec([[
@ -96,4 +88,7 @@ vim.api.nvim_exec([[
]], false) ]], false)
-- inactive statuslines as thin splitlines -- inactive statuslines as thin splitlines
cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#3e4451") cmd("highlight! StatusLineNC gui=underline guibg=NONE guifg=#383c44")
-- smooth scroll
require("neoscroll").setup()

View File

@ -1,6 +1,6 @@
vim.o.termguicolors = true vim.o.termguicolors = true
-- colors for active , inactive buffer tabs -- colors for active , inactive uffer tabs
require "bufferline".setup { require "bufferline".setup {
options = { options = {
buffer_close_icon = "", buffer_close_icon = "",
@ -19,36 +19,40 @@ require "bufferline".setup {
highlights = { highlights = {
background = { background = {
guifg = comment_fg, guifg = comment_fg,
guibg = "#282c34" guibg = "#1e222a"
}, },
fill = { fill = {
guifg = comment_fg, guifg = comment_fg,
guibg = "#282c34" guibg = "#1e222a"
}, },
buffer_selected = { buffer_selected = {
guifg = normal_fg, guifg = normal_fg,
guibg = "#3A3E44", guibg = "#282c34",
gui = "bold" gui = "bold"
}, },
buffer_visible = {
guifg = "#3e4451",
guibg = "#1e222a"
},
separator_visible = { separator_visible = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
separator_selected = { separator_selected = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
separator = { separator = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
indicator_selected = { indicator_selected = {
guifg = "#282c34", guifg = "#1e222a",
guibg = "#282c34" guibg = "#1e222a"
}, },
modified_selected = { modified_selected = {
guifg = string_fg, guifg = string_fg,
guibg = "#3A3E44" guibg = "#353b45"
} }
} }
} }
@ -59,10 +63,10 @@ vim.g.mapleader = " "
--command that adds new buffer and moves to it --command that adds new buffer and moves to it
vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd <args> | blast" vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd <args> | blast"
vim.api.nvim_set_keymap("n","<S-b>",":New ", opt) vim.api.nvim_set_keymap("n", "<S-b>", ":New ", opt)
--removing a buffer --removing a buffer
vim.api.nvim_set_keymap("n","<S-f>",[[<Cmd>bdelete<CR>]], opt) vim.api.nvim_set_keymap("n", "<S-f>", [[<Cmd>bdelete<CR>]], opt)
-- tabnew and tabprev -- tabnew and tabprev
vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt) vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt)

View File

@ -35,24 +35,24 @@ local t = function(str)
end end
local check_back_space = function() local check_back_space = function()
local col = vim.fn.col('.') - 1 local col = vim.fn.col(".") - 1
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
return true return true
else else
return false return false
end end
end end
-- tab completion -- tab completion
_G.tab_complete = function() _G.tab_complete = function()
if vim.fn.pumvisible() == 1 then if vim.fn.pumvisible() == 1 then
return t "<C-n>" return t "<C-n>"
elseif check_back_space() then elseif check_back_space() then
return t "<Tab>" return t "<Tab>"
else else
return vim.fn['compe#complete']() return vim.fn["compe#complete"]()
end end
end end
_G.s_tab_complete = function() _G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then if vim.fn.pumvisible() == 1 then

View File

@ -39,7 +39,7 @@ function on_attach(client)
end end
end end
local servers = {"tsserver", "cssls", "pyls", "html"} local servers = {"tsserver", "cssls", "html"}
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {on_attach = on_attach} nvim_lsp[lsp].setup {on_attach = on_attach}
end end

View File

@ -29,6 +29,8 @@ return require("packer").startup(
use "nvim-telescope/telescope-media-files.nvim" use "nvim-telescope/telescope-media-files.nvim"
use "nvim-lua/popup.nvim" use "nvim-lua/popup.nvim"
use "karb94/neoscroll.nvim" use "karb94/neoscroll.nvim"
use "nekonako/xresources-nvim"
end end
) )

View File

@ -4,8 +4,8 @@ local gls = gl.section
gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines
local colors = { local colors = {
bg = "#282c34", bg = "#1e222a",
line_bg = "#282c34", line_bg = "#1e222a",
fg = "#D8DEE9", fg = "#D8DEE9",
fg_green = "#65a380", fg_green = "#65a380",
yellow = "#A3BE8C", yellow = "#A3BE8C",
@ -17,7 +17,7 @@ local colors = {
magenta = "#c678dd", magenta = "#c678dd",
blue = "#22262C", blue = "#22262C",
red = "#DF8890", red = "#DF8890",
lightbg = "#3C4048", lightbg = "#282c34",
nord = "#81A1C1", nord = "#81A1C1",
greenYel = "#EBCB8B" greenYel = "#EBCB8B"
} }