From e948f32cd5b26d8c179eb18be9a1c47ea26b4e55 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Tue, 6 Apr 2021 08:29:37 +0530 Subject: [PATCH] customization: darker colors --- init.lua | 37 ++++++++++++++++--------------------- lua/bufferline/lua.lua | 34 +++++++++++++++++++--------------- lua/compe/lua.lua | 20 ++++++++++---------- lua/lspconfig/lua.lua | 2 +- lua/pluginsList/lua.lua | 2 ++ lua/statusline/lua.lua | 6 +++--- 6 files changed, 51 insertions(+), 50 deletions(-) diff --git a/init.lua b/init.lua index 627187f..50f7e69 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,7 @@ local indent = 2 g.indentLine_enabled = 1 g.indent_blankline_char = "▏" -cmd("hi IndentBlanklineChar guifg=#373b43") +cmd("hi IndentBlanklineChar guifg=#2a2e36") g.indent_blankline_filetype_exclude = {"help", "terminal"} g.indent_blankline_buftype_exclude = {"terminal"} @@ -48,25 +48,28 @@ require("treesitter.lua") require("mappings.lua") -- 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 VertSplit guibg=NONE guifg=#3e4451") +cmd("hi VertSplit guibg=NONE guifg=#2a2e36") cmd("hi DiffAdd guifg=#81A1C1 guibg = none") cmd("hi DiffChange guifg =#3A3E44 guibg = none") cmd("hi DiffModified guifg = #81A1C1 guibg = none") -cmd("hi EndOfBuffer guifg=#282c34") +cmd("hi EndOfBuffer guifg=#1e222a") -- telescope stuff and popupmenu -cmd("hi TelescopeBorder guifg=#3e4451") -cmd("hi TelescopePromptBorder guifg=#3e4451") -cmd("hi TelescopeResultsBorder guifg=#3e4451") +cmd("hi TelescopeBorder guifg=#2a2e36") +cmd("hi TelescopePromptBorder guifg=#2a2e36") +cmd("hi TelescopeResultsBorder guifg=#2a2e36") 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 cmd("hi NvimTreeFolderIcon guifg = #61afef") cmd("hi NvimTreeFolderName guifg = #61afef") -cmd("hi NvimTreeIndentMarker guifg=#545862") +cmd("hi NvimTreeIndentMarker guifg=#383c44") cmd("hi Normal guibg=NONE ctermbg=NONE") @@ -78,17 +81,6 @@ require("lspkind").init( ) -- 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 vim.api.nvim_exec([[ @@ -96,4 +88,7 @@ vim.api.nvim_exec([[ ]], false) -- 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() diff --git a/lua/bufferline/lua.lua b/lua/bufferline/lua.lua index 81d65f4..c661f69 100644 --- a/lua/bufferline/lua.lua +++ b/lua/bufferline/lua.lua @@ -1,6 +1,6 @@ vim.o.termguicolors = true --- colors for active , inactive buffer tabs +-- colors for active , inactive uffer tabs require "bufferline".setup { options = { buffer_close_icon = "", @@ -19,36 +19,40 @@ require "bufferline".setup { highlights = { background = { guifg = comment_fg, - guibg = "#282c34" + guibg = "#1e222a" }, fill = { guifg = comment_fg, - guibg = "#282c34" + guibg = "#1e222a" }, buffer_selected = { guifg = normal_fg, - guibg = "#3A3E44", + guibg = "#282c34", gui = "bold" }, + buffer_visible = { + guifg = "#3e4451", + guibg = "#1e222a" + }, separator_visible = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, separator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, separator = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, indicator_selected = { - guifg = "#282c34", - guibg = "#282c34" + guifg = "#1e222a", + guibg = "#1e222a" }, modified_selected = { guifg = string_fg, - guibg = "#3A3E44" + guibg = "#353b45" } } } @@ -59,10 +63,10 @@ vim.g.mapleader = " " --command that adds new buffer and moves to it vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd | blast" -vim.api.nvim_set_keymap("n","",":New ", opt) +vim.api.nvim_set_keymap("n", "", ":New ", opt) --removing a buffer -vim.api.nvim_set_keymap("n","",[[bdelete]], opt) +vim.api.nvim_set_keymap("n", "", [[bdelete]], opt) -- tabnew and tabprev vim.api.nvim_set_keymap("n", "", [[BufferLineCycleNext]], opt) diff --git a/lua/compe/lua.lua b/lua/compe/lua.lua index 0eb539c..d65845b 100644 --- a/lua/compe/lua.lua +++ b/lua/compe/lua.lua @@ -35,24 +35,24 @@ local t = function(str) end local check_back_space = function() - local col = vim.fn.col('.') - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + local col = vim.fn.col(".") - 1 + if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then return true else return false end end --- tab completion +-- tab completion _G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn['compe#complete']() - end + if vim.fn.pumvisible() == 1 then + return t "" + elseif check_back_space() then + return t "" + else + return vim.fn["compe#complete"]() + end end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then diff --git a/lua/lspconfig/lua.lua b/lua/lspconfig/lua.lua index 304d7fd..24b84a7 100644 --- a/lua/lspconfig/lua.lua +++ b/lua/lspconfig/lua.lua @@ -39,7 +39,7 @@ function on_attach(client) end end -local servers = {"tsserver", "cssls", "pyls", "html"} +local servers = {"tsserver", "cssls", "html"} for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end diff --git a/lua/pluginsList/lua.lua b/lua/pluginsList/lua.lua index 2bb7659..0f4142c 100644 --- a/lua/pluginsList/lua.lua +++ b/lua/pluginsList/lua.lua @@ -29,6 +29,8 @@ return require("packer").startup( use "nvim-telescope/telescope-media-files.nvim" use "nvim-lua/popup.nvim" use "karb94/neoscroll.nvim" + + use "nekonako/xresources-nvim" end ) diff --git a/lua/statusline/lua.lua b/lua/statusline/lua.lua index 9096a9e..ad3d9df 100644 --- a/lua/statusline/lua.lua +++ b/lua/statusline/lua.lua @@ -4,8 +4,8 @@ local gls = gl.section gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines local colors = { - bg = "#282c34", - line_bg = "#282c34", + bg = "#1e222a", + line_bg = "#1e222a", fg = "#D8DEE9", fg_green = "#65a380", yellow = "#A3BE8C", @@ -17,7 +17,7 @@ local colors = { magenta = "#c678dd", blue = "#22262C", red = "#DF8890", - lightbg = "#3C4048", + lightbg = "#282c34", nord = "#81A1C1", greenYel = "#EBCB8B" }