From c5ac18596421d59990bda19d84c940b4daee7e46 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Wed, 1 May 2024 21:25:04 -0700 Subject: nvim: changes for lsp --- nvim/.config/nvim/after/plugin/lsp.lua | 21 +- nvim/.config/nvim/after/plugin/treesitter.lua | 2 +- nvim/.config/nvim/colors/jellybeans.vim | 733 ++++++++++++++++++++++++++ nvim/.config/nvim/colors/monochrome.vim | 254 +++++++++ nvim/.config/nvim/colors/nerdy.vim | 313 +++++++++++ nvim/.config/nvim/colors/noirblaze.vim | 243 +++++++++ nvim/.config/nvim/lua/plugins.lua | 2 +- nvim/.config/nvim/lua/set.lua | 2 +- nvim/.config/nvim/lua/statusline/line.lua | 2 +- nvim/.config/nvim/plugin/packer_compiled.lua | 47 +- 10 files changed, 1591 insertions(+), 28 deletions(-) create mode 100644 nvim/.config/nvim/colors/jellybeans.vim create mode 100644 nvim/.config/nvim/colors/monochrome.vim create mode 100644 nvim/.config/nvim/colors/nerdy.vim create mode 100644 nvim/.config/nvim/colors/noirblaze.vim diff --git a/nvim/.config/nvim/after/plugin/lsp.lua b/nvim/.config/nvim/after/plugin/lsp.lua index 1d64ec5..2cb94c0 100644 --- a/nvim/.config/nvim/after/plugin/lsp.lua +++ b/nvim/.config/nvim/after/plugin/lsp.lua @@ -1,5 +1,15 @@ local lsp = require("lsp-zero") +require('mason').setup({}) +require('mason-lspconfig').setup({ + ensure_installed = {'tsserver', 'rust_analyzer'}, + handlers = { + function(server_name) + require('lspconfig')[server_name].setup({}) + end, + } +}) + lsp.preset("recommended") -- Fix Undefined global 'vim' @@ -14,7 +24,6 @@ lsp.configure('lua_ls', { }) local cmp = require('cmp') -local cmp_action = require('lsp-zero').cmp_action() cmp.setup({ window = { @@ -25,13 +34,20 @@ cmp.setup({ [''] = cmp.mapping.complete(), [''] = cmp.mapping.select_prev_item(cmp_select), [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.confirm({ select = true }), }), snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end, }, + sources = { + { name = 'nvim_lsp' }, + { name = 'nvim_lua' }, + { name = 'buffer' }, + { name = 'path' }, + { name = 'luasnip', option = { show_autosnippets = true } }, + }, }) lsp.set_preferences({ @@ -64,4 +80,3 @@ lsp.setup() vim.diagnostic.config({ virtual_text = true, }) - diff --git a/nvim/.config/nvim/after/plugin/treesitter.lua b/nvim/.config/nvim/after/plugin/treesitter.lua index 9d5d923..b891aff 100644 --- a/nvim/.config/nvim/after/plugin/treesitter.lua +++ b/nvim/.config/nvim/after/plugin/treesitter.lua @@ -1,6 +1,6 @@ require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" - ensure_installed = { "help", "javascript", "typescript", "c", "lua", "rust" }, + ensure_installed = { "javascript", "typescript", "c", "lua", "rust" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, diff --git a/nvim/.config/nvim/colors/jellybeans.vim b/nvim/.config/nvim/colors/jellybeans.vim new file mode 100644 index 0000000..3b9bfb6 --- /dev/null +++ b/nvim/.config/nvim/colors/jellybeans.vim @@ -0,0 +1,733 @@ +" Vim color file +" +" " __ _ _ _ " +" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ " +" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| " +" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ " +" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ " +" " \___/ " +" +" "A colorful, dark color scheme for Vim." +" +" File: jellybeans.vim +" URL: github.com/nanotech/jellybeans.vim +" Scripts URL: vim.org/scripts/script.php?script_id=2555 +" Maintainer: NanoTech (nanotech.nanotechcorp.net) +" Version: 1.7 +" Last Change: June 21st, 2019 +" License: MIT +" Contributors: Andrew Wong (w0ng) +" Benjamin R. Haskell (benizi) +" Brian Marshall (bmars) +" Daniel Herbert (pocketninja) +" David Liang +" Filipe Silva (ninrod) +" Henry So, Jr. +" Ihor Kalnytskyi (ikalnytskyi) +" Joe Doherty (docapotamus) +" Karl Litterfeldt (Litterfeldt) +" Keith Pitt (keithpitt) +" Mike Schreifels (schreifels) +" Philipp Rustemeier (12foo) +" Rafael Bicalho (rbika) +" Rich Healey (richo) +" Siwen Yu (yusiwen) +" Tim Willis (willist) +" Tom McLaughlin (tmcoma) +" +" Copyright (c) 2009-2019 NanoTech +" +" Permission is hereby granted, free of charge, to any per‐ +" son obtaining a copy of this software and associated doc‐ +" umentation files (the “Software”), to deal in the Soft‐ +" ware without restriction, including without limitation +" the rights to use, copy, modify, merge, publish, distrib‐ +" ute, sublicense, and/or sell copies of the Software, and +" to permit persons to whom the Software is furnished to do +" so, subject to the following conditions: +" +" The above copyright notice and this permission notice +" shall be included in all copies or substantial portions +" of the Software. +" +" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY +" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐ +" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐ +" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐ +" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +" THE SOFTWARE. + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "jellybeans" + +if has("gui_running") || (has('termguicolors') && &termguicolors) + let s:true_color = 1 +else + let s:true_color = 0 +endif + +if s:true_color || &t_Co >= 88 + let s:low_color = 0 +else + let s:low_color = 1 +endif + +" Configuration Variables: +" - g:jellybeans_overrides (default = {}) +" - g:jellybeans_use_lowcolor_black (default = 0) +" - g:jellybeans_use_gui_italics (default = 1) +" - g:jellybeans_use_term_italics (default = 0) + +let s:background_color = "151515" + +if exists("g:jellybeans_overrides") + let s:overrides = g:jellybeans_overrides +else + let s:overrides = {} +endif + +" Backwards compatibility +if exists("g:jellybeans_background_color") + \ || exists("g:jellybeans_background_color_256") + \ || exists("g:jellybeans_use_term_background_color") + + let s:overrides = deepcopy(s:overrides) + + if !has_key(s:overrides, "background") + let s:overrides["background"] = {} + endif + + if exists("g:jellybeans_background_color") + let s:overrides["background"]["guibg"] = g:jellybeans_background_color + endif + + if exists("g:jellybeans_background_color_256") + let s:overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256 + endif + + if exists("g:jellybeans_use_term_background_color") + \ && g:jellybeans_use_term_background_color + let s:overrides["background"]["ctermbg"] = "NONE" + let s:overrides["background"]["256ctermbg"] = "NONE" + endif +endif + +if exists("g:jellybeans_use_lowcolor_black") && g:jellybeans_use_lowcolor_black + let s:termBlack = "Black" +else + let s:termBlack = "Grey" +endif + +" When `termguicolors` is set, Vim[^1] ignores `hi Normal guibg=NONE` +" after Normal's `guibg` is already set to a color. See: +" +" - https://github.com/vim/vim/issues/981 +" - https://github.com/nanotech/jellybeans.vim/issues/64 +" +" To work around this, ensure we don't set the default background +" color before an override changes it to `NONE` by ensuring that the +" background color isn't set to a value different from its override. +" +" [^1]: Tested on 8.0.567. Does not apply to Neovim. +" +if has_key(s:overrides, "background") && has_key(s:overrides["background"], "guibg") + let s:background_color = s:overrides["background"]["guibg"] +endif + +" Color approximation functions by Henry So, Jr. and David Liang {{{ +" Added to jellybeans.vim by Daniel Herbert + +if &t_Co == 88 + + " returns an approximate grey index for the given grey level + fun! s:grey_number(x) + if a:x < 23 + return 0 + elseif a:x < 69 + return 1 + elseif a:x < 103 + return 2 + elseif a:x < 127 + return 3 + elseif a:x < 150 + return 4 + elseif a:x < 173 + return 5 + elseif a:x < 196 + return 6 + elseif a:x < 219 + return 7 + elseif a:x < 243 + return 8 + else + return 9 + endif + endfun + + " returns the actual grey level represented by the grey index + fun! s:grey_level(n) + if a:n == 0 + return 0 + elseif a:n == 1 + return 46 + elseif a:n == 2 + return 92 + elseif a:n == 3 + return 115 + elseif a:n == 4 + return 139 + elseif a:n == 5 + return 162 + elseif a:n == 6 + return 185 + elseif a:n == 7 + return 208 + elseif a:n == 8 + return 231 + else + return 255 + endif + endfun + + " returns the palette index for the given grey index + fun! s:grey_color(n) + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + endfun + + " returns an approximate color index for the given color level + fun! s:rgb_number(x) + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + endfun + + " returns the actual color level for the given color index + fun! s:rgb_level(n) + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + endfun + + " returns the palette index for the given R/G/B color indices + fun! s:rgb_color(x, y, z) + return 16 + (a:x * 16) + (a:y * 4) + a:z + endfun + +else " assuming &t_Co == 256 + + " returns an approximate grey index for the given grey level + fun! s:grey_number(x) + if a:x < 14 + return 0 + else + let l:n = (a:x - 8) / 10 + let l:m = (a:x - 8) % 10 + if l:m < 5 + return l:n + else + return l:n + 1 + endif + endif + endfun + + " returns the actual grey level represented by the grey index + fun! s:grey_level(n) + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endfun + + " returns the palette index for the given grey index + fun! s:grey_color(n) + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endfun + + " returns an approximate color index for the given color level + fun! s:rgb_number(x) + if a:x < 75 + return 0 + else + let l:n = (a:x - 55) / 40 + let l:m = (a:x - 55) % 40 + if l:m < 20 + return l:n + else + return l:n + 1 + endif + endif + endfun + + " returns the actual color level for the given color index + fun! s:rgb_level(n) + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endfun + + " returns the palette index for the given R/G/B color indices + fun! s:rgb_color(x, y, z) + return 16 + (a:x * 36) + (a:y * 6) + a:z + endfun + +endif + +" returns the palette index to approximate the given R/G/B color levels +fun! s:color(r, g, b) + " map greys directly (see xterm's 256colres.pl) + if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243 + return (a:r - 8) / 10 + 232 + endif + + " get the closest grey + let l:gx = s:grey_number(a:r) + let l:gy = s:grey_number(a:g) + let l:gz = s:grey_number(a:b) + + " get the closest color + let l:x = s:rgb_number(a:r) + let l:y = s:rgb_number(a:g) + let l:z = s:rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " there are two possibilities + let l:dgr = s:grey_level(l:gx) - a:r + let l:dgg = s:grey_level(l:gy) - a:g + let l:dgb = s:grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = s:rgb_level(l:gx) - a:r + let l:dg = s:rgb_level(l:gy) - a:g + let l:db = s:rgb_level(l:gz) - a:b + let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) + if l:dgrey < l:drgb + " use the grey + return s:grey_color(l:gx) + else + " use the color + return s:rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return s:rgb_color(l:x, l:y, l:z) + endif +endfun + +fun! s:is_empty_or_none(str) + return empty(a:str) || a:str ==? "NONE" +endfun + +" returns the palette index to approximate the 'rrggbb' hex string +fun! s:rgb(rgb) + if s:is_empty_or_none(a:rgb) + return "NONE" + endif + let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 + let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 + let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 + return s:color(l:r, l:g, l:b) +endfun + +fun! s:prefix_highlight_value_with(prefix, color) + if s:is_empty_or_none(a:color) + return "NONE" + else + return a:prefix . a:color + endif +endfun + +fun! s:remove_italic_attr(attr) + let l:attr = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") + if empty(l:attr) + let l:attr = "NONE" + endif + return l:attr +endfun + +" sets the highlighting for the given group +fun! s:X(group, fg, bg, attr, lcfg, lcbg) + if s:low_color + let l:cmd = "hi ".a:group. + \ " ctermfg=".s:prefix_highlight_value_with("", a:lcfg). + \ " ctermbg=".s:prefix_highlight_value_with("", a:lcbg) + else + let l:cmd = "hi ".a:group. + \ " guifg=".s:prefix_highlight_value_with("#", a:fg). + \ " guibg=".s:prefix_highlight_value_with("#", a:bg) + if !s:true_color + let l:cmd = l:cmd. + \ " ctermfg=".s:rgb(a:fg). + \ " ctermbg=".s:rgb(a:bg) + endif + endif + + let l:attr = s:prefix_highlight_value_with("", a:attr) + + if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics + let l:cterm_attr = l:attr + else + let l:cterm_attr = s:remove_italic_attr(l:attr) + endif + + if !exists("g:jellybeans_use_gui_italics") || g:jellybeans_use_gui_italics + let l:gui_attr = l:attr + else + let l:gui_attr = s:remove_italic_attr(l:attr) + endif + + let l:cmd = l:cmd." gui=".l:gui_attr." cterm=".l:cterm_attr + exec l:cmd +endfun +" }}} + +call s:X("Normal","e8e8d3",s:background_color,"","White","") +set background=dark + +call s:X("CursorLine","","1c1c1c","","",s:termBlack) +call s:X("CursorColumn","","1c1c1c","","",s:termBlack) + +" Some of Terminal.app's default themes have a cursor color +" too close to Jellybeans' preferred MatchParen background +" color to be easily distinguishable. Other terminals tend +" to use a brighter cursor color. +" +" Use a more distinct color in Terminal.app, and also in +" low-color terminals if the preferred background color is +" not available. +if !has('gui_running') && $TERM_PROGRAM == "Apple_Terminal" + let s:matchParenGuiFg = "dd0093" + let s:matchParenGuiBg = "000000" +else + let s:matchParenGuiFg = "ffffff" + let s:matchParenGuiBg = "556779" +endif +if s:termBlack != "Black" + let s:matchParenTermFg = "Magenta" + let s:matchParenTermBg = "" +else + let s:matchParenTermFg = "" + let s:matchParenTermBg = s:termBlack +endif +call s:X("MatchParen",s:matchParenGuiFg,s:matchParenGuiBg,"bold", +\ s:matchParenTermFg,s:matchParenTermBg) + +call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack) +call s:X("TabLineFill","9098a0","","","",s:termBlack) +call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White") + +" Auto-completion +call s:X("Pmenu","ffffff","606060","","White",s:termBlack) +call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White") + +call s:X("Visual","","404040","","",s:termBlack) +call s:X("Cursor",s:background_color,"b0d0f0","","","") + +call s:X("LineNr","605958",s:background_color,"NONE",s:termBlack,"") +call s:X("CursorLineNr","ccc5c4","","NONE","White","") +call s:X("Comment","888888","","italic","Grey","") +call s:X("Todo","c7c7c7","","bold","White",s:termBlack) + +call s:X("StatusLine","000000","dddddd","italic","","White") +call s:X("StatusLineNC","ffffff","403c41","italic","White","Black") +call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack) +call s:X("WildMenu","f0a0c0","302028","","Magenta","") + +call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"") +call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack) +call s:X("SignColumn","777777","333333","","",s:termBlack) +call s:X("ColorColumn","","000000","","",s:termBlack) + +call s:X("Title","70b950","","bold","Green","") + +call s:X("Constant","cf6a4c","","","Red","") +call s:X("Special","799d6a","","","Green","") +call s:X("Delimiter","668799","","","Grey","") + +call s:X("String","99ad6a","","","Green","") +call s:X("StringDelimiter","556633","","","DarkGreen","") + +call s:X("Identifier","c6b6ee","","","LightCyan","") +call s:X("Structure","8fbfdc","","","LightCyan","") +call s:X("Function","fad07a","","","Yellow","") +call s:X("Statement","8197bf","","","DarkBlue","") +call s:X("PreProc","8fbfdc","","","LightBlue","") + +hi! link Operator Structure +hi! link Conceal Operator + +call s:X("Type","ffb964","","","Yellow","") +call s:X("NonText","606060",s:background_color,"",s:termBlack,"") + +call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"") + +call s:X("Search","f0a0c0","302028","underline","Magenta","") + +call s:X("Directory","dad085","","","Yellow","") +call s:X("ErrorMsg","","902020","","","DarkRed") +hi! link Error ErrorMsg +hi! link MoreMsg Special +call s:X("Question","65C254","","","Green","") + + +" Spell Checking + +call s:X("SpellBad","","902020","underline","","DarkRed") +call s:X("SpellCap","","0000df","underline","","Blue") +call s:X("SpellRare","","540063","underline","","DarkMagenta") +call s:X("SpellLocal","","2D7067","underline","","Green") + +" Diff + +hi! link diffRemoved Constant +hi! link diffAdded String + +" VimDiff + +call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen") +call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed") +call s:X("DiffChange","","2B5B77","","White","DarkBlue") +call s:X("DiffText","8fbfdc","000000","reverse","Yellow","") + +" PHP + +hi! link phpFunctions Function +call s:X("StorageClass","c59f6f","","","Red","") +hi! link phpSuperglobal Identifier +hi! link phpQuoteSingle StringDelimiter +hi! link phpQuoteDouble StringDelimiter +hi! link phpBoolean Constant +hi! link phpNull Constant +hi! link phpArrayPair Operator +hi! link phpOperator Normal +hi! link phpRelation Normal +hi! link phpVarSelector Identifier + +" Python + +hi! link pythonOperator Statement + +" Ruby + +hi! link rubySharpBang Comment +call s:X("rubyClass","447799","","","DarkBlue","") +call s:X("rubyIdentifier","c6b6fe","","","Cyan","") +hi! link rubyConstant Type +hi! link rubyFunction Function + +call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","") +call s:X("rubySymbol","7697d6","","","Blue","") +hi! link rubyGlobalVariable rubyInstanceVariable +hi! link rubyModule rubyClass +call s:X("rubyControl","7597c6","","","Blue","") + +hi! link rubyString String +hi! link rubyStringDelimiter StringDelimiter +hi! link rubyInterpolationDelimiter Identifier + +call s:X("rubyRegexpDelimiter","540063","","","Magenta","") +call s:X("rubyRegexp","dd0093","","","DarkMagenta","") +call s:X("rubyRegexpSpecial","a40073","","","Magenta","") + +call s:X("rubyPredefinedIdentifier","de5577","","","Red","") + +" Erlang + +hi! link erlangAtom rubySymbol +hi! link erlangBIF rubyPredefinedIdentifier +hi! link erlangFunction rubyPredefinedIdentifier +hi! link erlangDirective Statement +hi! link erlangNode Identifier + +" Elixir + +hi! link elixirAtom rubySymbol + + +" JavaScript + +hi! link javaScriptValue Constant +hi! link javaScriptRegexpString rubyRegexp +hi! link javaScriptTemplateVar StringDelim +hi! link javaScriptTemplateDelim Identifier +hi! link javaScriptTemplateString String + +" CoffeeScript + +hi! link coffeeRegExp javaScriptRegexpString + +" Lua + +hi! link luaOperator Conditional + +" C + +hi! link cFormat Identifier +hi! link cOperator Constant + +" Objective-C/Cocoa + +hi! link objcClass Type +hi! link cocoaClass objcClass +hi! link objcSubclass objcClass +hi! link objcSuperclass objcClass +hi! link objcDirective rubyClass +hi! link objcStatement Constant +hi! link cocoaFunction Function +hi! link objcMethodName Identifier +hi! link objcMethodArg Normal +hi! link objcMessageName Identifier + +" Vimscript + +hi! link vimOper Normal + +" HTML + +hi! link htmlTag Statement +hi! link htmlEndTag htmlTag +hi! link htmlTagName htmlTag + +" XML + +hi! link xmlTag Statement +hi! link xmlEndTag xmlTag +hi! link xmlTagName xmlTag +hi! link xmlEqual xmlTag +hi! link xmlEntity Special +hi! link xmlEntityPunct xmlEntity +hi! link xmlDocTypeDecl PreProc +hi! link xmlDocTypeKeyword PreProc +hi! link xmlProcessingDelim xmlAttrib + +" Debugger.vim + +call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue") +call s:X("DbgBreakPt","","4F0037","","","DarkMagenta") + +" vim-indent-guides + +if !exists("g:indent_guides_auto_colors") + let g:indent_guides_auto_colors = 0 +endif +call s:X("IndentGuidesOdd","","232323","","","") +call s:X("IndentGuidesEven","","1b1b1b","","","") + +" Plugins, etc. + +hi! link TagListFileName Directory +call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green") + +" Manual overrides for 256-color terminals. Dark colors auto-map badly. +if !s:low_color + hi StatusLineNC ctermbg=235 + hi Folded ctermbg=236 + hi DiffText ctermfg=81 + hi DbgBreakPt ctermbg=53 + hi IndentGuidesOdd ctermbg=235 + hi IndentGuidesEven ctermbg=234 +endif + +if !empty("s:overrides") + fun! s:current_attr(group) + let l:synid = synIDtrans(hlID(a:group)) + let l:attrs = [] + for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"] + if synIDattr(l:synid, l:attr, "gui") == 1 + call add(l:attrs, l:attr) + endif + endfor + return join(l:attrs, ",") + endfun + fun! s:current_color(group, what, mode) + let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode) + if l:color == -1 + return "" + else + return substitute(l:color, "^#", "", "") + endif + endfun + fun! s:load_color_def(group, def) + call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")), + \ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")), + \ get(a:def, "attr", s:current_attr(a:group)), + \ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")), + \ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm"))) + if !s:low_color + for l:prop in ["ctermfg", "ctermbg"] + let l:override_key = "256".l:prop + if has_key(a:def, l:override_key) + exec "hi ".a:group." ".l:prop."=".a:def[l:override_key] + endif + endfor + endif + endfun + fun! s:load_colors(defs) + for [l:group, l:def] in items(a:defs) + if l:group == "background" + call s:load_color_def("LineNr", l:def) + call s:load_color_def("NonText", l:def) + call s:load_color_def("Normal", l:def) + else + call s:load_color_def(l:group, l:def) + endif + unlet l:group + unlet l:def + endfor + endfun + call s:load_colors(s:overrides) + delf s:load_colors + delf s:load_color_def + delf s:current_color + delf s:current_attr +endif + +" delete functions {{{ +delf s:X +delf s:remove_italic_attr +delf s:prefix_highlight_value_with +delf s:rgb +delf s:is_empty_or_none +delf s:color +delf s:rgb_color +delf s:rgb_level +delf s:rgb_number +delf s:grey_color +delf s:grey_level +delf s:grey_number +" }}} diff --git a/nvim/.config/nvim/colors/monochrome.vim b/nvim/.config/nvim/colors/monochrome.vim new file mode 100644 index 0000000..5c4bf00 --- /dev/null +++ b/nvim/.config/nvim/colors/monochrome.vim @@ -0,0 +1,254 @@ +" Vim color scheme +" +" Name: monochrome.vim +" Maintainer: Xavier Noria +" License: MIT + +set background=dark + +hi clear +if exists('syntax_on') + syntax reset +endif + +let g:colors_name = 'monochrome' + +let s:white = ['White', 15] +let s:black = ['#0e1111', 16] +let s:bgray = ['#181818', 233] +let s:lgray = ['LightGray', 255] +let s:cgray = ['#737373', 243] +let s:dgray = ['DarkGray', 248] +let s:sblue = ['#778899', 67] +let s:yellow = ['Yellow', 226] +let s:red = ['#b6403a', 160] +let s:green = ['#478226', 28] + +let s:default_fg = s:lgray +let s:default_bg = s:black + +let s:italic = 'italic' +let s:bold = 'bold' +let s:underline = 'underline' +let s:none = 'NONE' + +let s:default_lst = [] +let s:default_str = '' + +if !exists("g:monochrome_italic_comments") + let g:monochrome_italic_comments = 0 +endif +let s:comment_attr = g:monochrome_italic_comments ? s:italic : s:none + +function! s:hi(...) + let group = a:1 + let fg = get(a:, 2, s:default_fg) + let bg = get(a:, 3, s:default_bg) + let attr = get(a:, 4, s:default_str) + + let cmd = ['hi', group] + + if fg != s:default_lst + call add(cmd, 'guifg='.fg[0]) + call add(cmd, 'ctermfg='.fg[1]) + endif + + if bg != s:default_lst && bg != s:default_bg + call add(cmd, 'guibg='.bg[0]) + call add(cmd, 'ctermbg='.bg[1]) + endif + + if attr != s:default_str + call add(cmd, 'gui='.attr) + call add(cmd, 'cterm='.attr) + endif + + exec join(cmd, ' ') +endfunction + + +" +" --- Vim interface ------------------------------------------------------------ +" + +call s:hi('Normal') +call s:hi('Cursor', s:black, s:lgray) +call s:hi('CursorLine', s:default_lst, s:bgray, s:none) +call s:hi('CursorLineNr', s:white, s:default_bg, s:bold) +call s:hi('ColorColumn', s:default_fg, s:bgray) +call s:hi('Search', s:white, s:sblue) +call s:hi('Visual', s:white, s:sblue) +call s:hi('ErrorMsg', s:white, s:red) + +" Tildes at the bottom of a buffer, etc. +call s:hi('NonText', s:dgray) + +" Folding. +call s:hi('FoldColumn', s:dgray) +call s:hi('Folded') + +" Line numbers gutter. +call s:hi('LineNr', s:dgray) + +" Small arrow used for tabs. +call s:hi('SpecialKey', s:sblue, s:default_bg, s:bold) + +" File browsers. +call s:hi('Directory', s:white, s:default_bg, s:bold) + +" Help. +call s:hi('helpSpecial') +call s:hi('helpHyperTextJump', s:sblue, s:default_bg, s:underline) +call s:hi('helpNote') + +" Popup menu. +call s:hi('Pmenu', s:white, s:sblue) +call s:hi('PmenuSel', s:sblue, s:white) + +" Notes. +call s:hi('Todo', s:black, s:yellow, s:bold) + +" Signs. +call s:hi('SignColumn') + +" +" --- Programming languages ---------------------------------------------------- +" + +call s:hi('Statement', s:white, s:default_bg, s:bold) +call s:hi('PreProc', s:white, s:default_bg, s:bold) +call s:hi('String', s:sblue) +call s:hi('Comment', s:cgray, s:default_bg, s:comment_attr) +call s:hi('Constant') +call s:hi('Type', s:white, s:default_bg, s:bold) +call s:hi('Function', s:white) +call s:hi('Identifier') +call s:hi('Special') +call s:hi('MatchParen', s:lgray, s:black, s:underline) + + +" +" --- VimL --------------------------------------------------------------------- +" + +call s:hi('vimOption') +call s:hi('vimGroup') +call s:hi('vimHiClear') +call s:hi('vimHiGroup') +call s:hi('vimHiAttrib') +call s:hi('vimHiGui') +call s:hi('vimHiGuiFgBg') +call s:hi('vimHiCTerm') +call s:hi('vimHiCTermFgBg') +call s:hi('vimSynType') +hi link vimCommentTitle Comment + + +" +" --- Ruby --------------------------------------------------------------------- +" + +call s:hi('rubyConstant') +call s:hi('rubySharpBang', s:cgray) +call s:hi('rubySymbol', s:sblue) +call s:hi('rubyStringDelimiter', s:sblue) +call s:hi('rubyStringEscape', s:sblue) +call s:hi('rubyRegexpEscape', s:sblue) +call s:hi('rubyRegexpAnchor', s:sblue) +call s:hi('rubyRegexpSpecial', s:sblue) + + +" +" --- Elixir ------------------------------------------------------------------- +" + +call s:hi('elixirAlias', s:default_fg, s:default_bg, s:none) +call s:hi('elixirDelimiter', s:sblue) +call s:hi('elixirSelf', s:default_fg, s:default_bg, s:none) + +" For ||, ->, etc. +call s:hi('elixirOperator') + +" Module attributes like @doc or @type. +hi link elixirVariable Statement + +" While rendered as comments in other languages, docstrings are strings, +" experimental. +hi link elixirDocString String +hi link elixirDocTest String +hi link elixirStringDelimiter String + + +" +" --- Perl --------------------------------------------------------------------- +" + +call s:hi('perlSharpBang', s:cgray) +call s:hi('perlStringStartEnd', s:sblue) +call s:hi('perlStringEscape', s:sblue) +call s:hi('perlMatchStartEnd', s:sblue) + + +" +" --- Python ------------------------------------------------------------------- +" + +call s:hi('pythonEscape', s:sblue) + + +" +" --- JavaScript --------------------------------------------------------------- +" + +call s:hi('javaScriptFunction', s:white, s:default_bg, s:bold) + + +" +" --- Diffs -------------------------------------------------------------------- +" + +call s:hi('diffFile', s:cgray) +call s:hi('diffNewFile', s:cgray) +call s:hi('diffIndexLine', s:cgray) +call s:hi('diffLine', s:cgray) +call s:hi('diffSubname', s:cgray) +call s:hi('diffAdded', s:white, s:green) +call s:hi('diffRemoved', s:white, s:red) + + +" +" --- Markdown ----------------------------------------------------------------- +" + +call s:hi('Title', s:white, s:default_bg, s:bold) +call s:hi('markdownHeadingDelimiter', s:white, s:default_bg, s:bold) +call s:hi('markdownHeadingRule', s:white, s:default_bg, s:bold) +call s:hi('markdownLinkText', s:sblue, s:default_bg, s:underline) + + +" +" --- vim-fugitive ------------------------------------------------------------- +" + +call s:hi('gitcommitComment', s:default_fg, s:default_bg, s:none) +call s:hi('gitcommitOnBranch', s:default_fg, s:default_bg, s:none) +call s:hi('gitcommitBranch', s:sblue, s:default_bg, s:none) +call s:hi('gitcommitHeader', s:white, s:default_bg, s:bold) +call s:hi('gitcommitSelected', s:default_fg, s:default_bg, s:none) +call s:hi('gitcommitDiscarded', s:default_fg, s:default_bg, s:none) +call s:hi('gitcommitSelectedType', s:default_fg, s:default_bg, s:none) +call s:hi('gitcommitDiscardedType', s:default_fg, s:default_bg, s:none) + + +" +" --- NeoMake ------------------------------------------------------------------ +" + +call s:hi('NeomakeMessageSign') +call s:hi('NeomakeWarningSign', s:sblue) +call s:hi('NeomakeErrorSign', s:yellow) +call s:hi('NeomakeInfoSign') +call s:hi('NeomakeError', s:yellow) +call s:hi('NeomakeInfo', s:default_fg, s:default_bg, s:bold) +call s:hi('NeomakeMessage') +call s:hi('NeomakeWarning', s:yellow) diff --git a/nvim/.config/nvim/colors/nerdy.vim b/nvim/.config/nvim/colors/nerdy.vim new file mode 100644 index 0000000..71e25eb --- /dev/null +++ b/nvim/.config/nvim/colors/nerdy.vim @@ -0,0 +1,313 @@ +" Name: plain.vim +" Version: 0.1 +" Maintainer: github.com/andreypopp +" License: The MIT License (MIT) +" +" Based on +" +" https://github.com/pbrisbin/vim-colors-off (MIT License) +" +" which in turn based on +" +" https://github.com/reedes/vim-colors-pencil (MIT License) +" +""" +hi clear + +if exists('syntax on') + syntax reset +endif + +let g:colors_name='plain' + +let s:black = { "gui": "#222222", "cterm": "0" } +let s:medium_gray = { "gui": "#767676", "cterm": "8" } +let s:white = { "gui": "#F1F1F1", "cterm": "7" } +let s:actual_white = { "gui": "#FFFFFF", "cterm": "15" } +let s:light_black = { "gui": "#424242", "cterm": "8" } +let s:lighter_black = { "gui": "#545454", "cterm": "8" } +let s:subtle_black = { "gui": "#303030", "cterm": "11" } +let s:light_gray = { "gui": "#999999", "cterm": "12" } +let s:lighter_gray = { "gui": "#CCCCCC", "cterm": "7" } +let s:lightest_gray = { "gui": "#E5E5E5", "cterm": "13" } +let s:pink = { "gui": "#FB007A", "cterm": "5" } +let s:dark_red = { "gui": "#C30771", "cterm": "1" } +let s:light_red = { "gui": "#E32791", "cterm": "1" } +let s:orange = { "gui": "#D75F5F", "cterm": "9" } +let s:darker_blue = { "gui": "#005F87", "cterm": "4" } +let s:dark_blue = { "gui": "#008EC4", "cterm": "4" } +let s:blue = { "gui": "#20BBFC", "cterm": "4" } +let s:light_blue = { "gui": "#B6D6FD", "cterm": "4" } +let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" } +let s:light_cyan = { "gui": "#4FB8CC", "cterm": "6" } +let s:dark_green = { "gui": "#10A778", "cterm": "6" } +let s:light_green = { "gui": "#5FD7A7", "cterm": "6" } +let s:dark_purple = { "gui": "#523C79", "cterm": "5" } +let s:light_purple = { "gui": "#6855DE", "cterm": "5" } +let s:light_yellow = { "gui": "#F3E430", "cterm": "3" } +let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } + +if &background == "dark" + let s:bg = s:black + let s:bg_subtle = s:light_black + let s:bg_very_subtle = s:subtle_black + let s:norm = s:lighter_gray + let s:norm_subtle = s:light_gray + let s:purple = s:light_purple + let s:cyan = s:light_cyan + let s:green = s:light_green + let s:red = s:light_red + let s:yellow = s:light_yellow + let s:visual = s:subtle_black + let s:cursor_line = s:subtle_black + let s:status_line = s:medium_gray + let s:status_line_nc = s:light_black + let s:constant = s:light_green + let s:comment = s:lighter_black + let s:selection = s:light_purple + let s:warning = s:yellow +else + let s:bg = s:white + let s:bg_subtle = s:lighter_gray + let s:bg_very_subtle = s:light_gray + let s:norm = s:light_black + let s:norm_subtle = s:lighter_black + let s:purple = s:dark_purple + let s:cyan = s:dark_cyan + let s:green = s:dark_green + let s:red = s:dark_red + let s:yellow = s:dark_yellow + let s:visual = s:light_blue + let s:cursor_line = s:medium_gray + let s:status_line = s:medium_gray + let s:status_line_nc = s:light_gray + let s:constant = s:dark_blue + let s:comment = s:light_gray + let s:selection = s:light_yellow + let s:warning = s:yellow +endif + +" https://github.com/noahfrederick/vim-hemisu/ +function! s:h(group, style) + execute "highlight" a:group + \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") + \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") + \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") + \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") + \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") + \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") + \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") +endfunction + +call s:h("firstAccent", {"bg": s:bg, "fg": s:cyan,}) +call s:h("secondAccent", {"bg": s:bg, "fg": s:purple,}) + +call s:h("Normal", {"bg": s:bg, "fg": s:norm,}) +call s:h("Noise", {"bg": s:bg, "fg": s:norm_subtle}) +call s:h("Cursor", {"bg": s:green, "fg": s:norm}) +call s:h("Comment", {"fg": s:comment, "cterm": "italic"}) +call s:h("Function", {"fg": s:norm, "cterm": "bold"}) + +call s:h("Constant", {"bg": s:bg, "fg": s:constant}) +hi! link Character Constant +hi! link Number Constant +hi! link Boolean Constant +hi! link Float Constant +hi! link String Constant + +"call s:h("Identifier", {"fg": s:dark_blue}) +hi! link Identifier Normal + +"hi! link Statement Normal +call s:h("Statement", {"bg": s:bg, "fg": s:norm, "cterm": "bold"}) +hi! link Conditonal Statement +hi! link Repeat Statement +hi! link Label Statement +hi! link Operator Noise +hi! link Keyword Statement +hi! link Exception Statement + +"call s:h("PreProc", {"fg": s:red}) +hi! link PreProc Normal +hi! link Include Statement +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc + +"call s:h("Type", {"fg": s:purple}) +hi! link Type Normal +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type + +"call s:h("Special", {"fg": s:pink}) +hi! link Special StatusLine +hi! link SpecialChar Special +hi! link Tag Special +hi! link Delimiter Special +hi! link SpecialComment Special +hi! link Debug Special + +hi! link Conceal NonText + +call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"}) +call s:h("Ignore", {"fg": s:bg}) +call s:h("Error", {"fg": s:red, "bg": s:bg, "cterm": "bold"}) +call s:h("Todo", {"fg": s:actual_white, "bg": s:black, "gui": "bold", "cterm": "bold"}) +call s:h("SpecialKey", {"fg": s:subtle_black}) +call s:h("NonText", {"fg": s:bg_very_subtle}) +call s:h("Directory", {"fg": s:dark_green}) +call s:h("ErrorMsg", {"fg": s:pink}) +call s:h("IncSearch", {"bg": s:selection, "fg": s:black}) +call s:h("Search", {"bg": s:selection, "fg": s:black}) +call s:h("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"}) +hi! link ModeMsg MoreMsg +call s:h("LineNr", {"fg": s:medium_gray}) +call s:h("CursorLineNr", {"fg": s:green, "bg": s:bg_very_subtle}) +call s:h("Question", {"fg": s:red}) +call s:h("VertSplit", {"bg": s:bg, "fg": s:bg_very_subtle}) +call s:h("Title", {"fg": s:dark_green}) +call s:h("Visual", {"bg": s:visual}) +call s:h("VisualNOS", {"bg": s:bg_subtle}) +call s:h("WarningMsg", {"fg": s:warning}) +call s:h("WildMenu", {"fg": s:white, "bg": s:bg}) +call s:h("Folded", {"fg": s:medium_gray}) +call s:h("FoldColumn", {"fg": s:bg_subtle}) +call s:h("DiffAdd", {"fg": s:green}) +call s:h("DiffDelete", {"fg": s:red}) +call s:h("DiffChange", {"fg": s:dark_yellow}) +call s:h("DiffText", {"fg": s:dark_green}) +call s:h("SignColumn", {"fg": s:medium_gray}) + +if has("gui_running") + call s:h("SpellBad", {"gui": "underline", "sp": s:red}) + call s:h("SpellCap", {"gui": "underline", "sp": s:light_green}) + call s:h("SpellRare", {"gui": "underline", "sp": s:pink}) + call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) +else + call s:h("SpellBad", {"cterm": "underline", "fg": s:red}) + call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green}) + call s:h("SpellRare", {"cterm": "underline", "fg": s:pink}) + call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green}) +endif + +""" Help +hi link helpHyperTextEntry Title +hi link helpHyperTextJump String + +""" StatusLine + +call s:h("StatusLine", {"bg": s:bg, "fg": s:status_line}) +call s:h("StatusLineNC", {"bg": s:bg, "fg": s:status_line_nc}) + +" Those are not standard but are useful to emphasis different parts of the +" status line. +call s:h("StatusLineOk", {"gui": "underline", "bg": s:bg, "fg": s:green}) +call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:pink}) +call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning}) + +call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("PmenuSel", {"fg": s:green, "bg": s:bg_very_subtle, "gui": "bold"}) +call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("TabLine", {"fg": s:norm_subtle, "bg": s:bg}) +call s:h("TabLineSel", {"fg": s:norm, "bg": s:bg, "gui": "bold", "cterm": "bold"}) +call s:h("TabLineFill", {"fg": s:norm_subtle, "bg": s:bg}) +call s:h("CursorColumn", {"bg": s:bg_very_subtle}) +call s:h("CursorLine", {"bg": s:cursor_line}) +call s:h("ColorColumn", {"bg": s:bg_subtle}) + +call s:h("MatchParen", {"bg": s:bg_very_subtle, "fg": s:norm}) +call s:h("qfLineNr", {"fg": s:medium_gray}) + +call s:h("htmlH1", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH2", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH3", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH4", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH5", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH6", {"bg": s:bg, "fg": s:norm}) + +call s:h("htmlBold", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlItalic", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlEndTag", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlTag", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlTagName", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlArg", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlError", {"bg": s:bg, "fg": s:red}) + +" JavaScript highlighting +" +call s:h("javaScript", {"bg": s:bg, "fg": s:norm}) +call s:h("javaScriptBraces", {"bg": s:bg, "fg": s:norm}) +call s:h("javaScriptNumber", {"bg": s:bg, "fg": s:green}) + +hi link diffRemoved DiffDelete +hi link diffAdded DiffAdd + +" Signify, git-gutter +hi link SignifySignAdd LineNr +hi link SignifySignDelete LineNr +hi link SignifySignChange LineNr +hi link GitGutterAdd LineNr +hi link GitGutterDelete LineNr +hi link GitGutterChange LineNr +hi link GitGutterChangeDelete LineNr + +hi link jsFlowTypeKeyword Statement +hi link jsFlowImportType Statement +hi link jsFunction Function +hi link jsGlobalObjects Noise +hi link jsGlobalNodeObjects Normal +hi link jsSwitchCase Constant + +call s:h("jsSpreadOperator ", {"bg": s:bg, "fg": s:selection}) +hi link jsReturn jsSpreadOperator +hi link jsExport jsSpreadOperator + +call s:h("rustModPath ", {"bg": s:bg, "fg": s:lightest_gray}) +hi link rustMacro secondAccent +hi link rustKeyword Noise +hi link rustDerive secondAccent +hi link rustDeriveTrait secondAccent +hi link rustAttribute secondAccent +hi link rustLifetime secondAccent + +hi link schemeSyntax Normal +hi link schemeParentheses Noise +hi link schemeIdentifier Noise + +hi link haskellType secondAccent +hi link elmType secondAccent + +hi link shCommandSub secondAccent + +hi link cFormat secondAccent + +hi link nixBuiltin secondAccent +hi link nixNamespacedBuiltin secondAccent + +hi link sqlSpecial firstAccent +hi link sqlKeyword secondAccent + +hi link StorageClass Statement + +call s:h("xmlTag", {"bg": s:bg, "fg": s:constant}) +hi link xmlTagName xmlTag +hi link xmlEndTag xmlTag +hi link xmlAttrib xmlTag + +hi link markdownH1 Statement +hi link markdownH2 Statement +hi link markdownH3 Statement +hi link markdownH4 Statement +hi link markdownH5 Statement +hi link markdownH6 Statement +hi link markdownListMarker Constant +hi link markdownCode Constant +hi link markdownCodeBlock Constant +hi link markdownCodeDelimiter Constant +hi link markdownHeadingDelimiter Constant + +call s:h("cssBraces", {"bg": s:bg, "fg": s:selection}) +hi link cssTextProp Noise +hi link cssTagName Normal diff --git a/nvim/.config/nvim/colors/noirblaze.vim b/nvim/.config/nvim/colors/noirblaze.vim new file mode 100644 index 0000000..d7279e9 --- /dev/null +++ b/nvim/.config/nvim/colors/noirblaze.vim @@ -0,0 +1,243 @@ +" Assumes background=dark +" let gray_900 = "#121212" +let gray_900 = "0" +let gray_800 = "#323232" +let gray_700 = "#535353" +let gray_600 = "#737373" +let gray_500 = "#949494" +let gray_450 = "#a7a7a7" +let gray_400 = "#b4b4b4" +let gray_300 = "#d5d5d5" +let gray_200 = "#f5f5f5" + +let zinc_gray_900 = "#212121" +let zinc_gray_600 = "#7a7a7a" +let zinc_gray_500 = "#787878" +let zinc_gray_200 = "#b0b0b0" + +let hot_pink = "#ff0088" +let white = "#ffffff" + +let cterm_gray_900 = 233 +let cterm_gray_800 = 239 +let cterm_gray_700 = 243 +let cterm_gray_600 = 246 +let cterm_gray_500 = 249 +let cterm_gray_400 = 252 + +let cterm_zinc_gray_900 = 59 " zinc_gray_900 + +let cterm_hot_pink = 198 +let cterm_white = 231 " white + +highlight clear +syntax reset +let g:colors_name = "noirblaze" + +exec "hi Normal ctermfg=".cterm_gray_400." ctermbg=".cterm_gray_900 +exec "hi Normal guifg=".gray_400." guibg=".gray_900 + +" Default +exec "hi Comment guifg=".gray_700 +exec "hi Comment ctermfg=".cterm_gray_800 +exec "hi Constant guifg=".hot_pink +exec "hi Constant ctermfg=".cterm_hot_pink +exec "hi Character guifg=".zinc_gray_500 +exec "hi Character ctermfg=".cterm_gray_700 +exec "hi Identifier guifg=".white." gui=none" +exec "hi Identifier ctermfg=".cterm_white." cterm=none" +exec "hi Statement guifg=".zinc_gray_200 +exec "hi Statement ctermfg=".cterm_gray_500 +exec "hi PreProc guifg=".hot_pink +exec "hi PreProc ctermfg=".cterm_hot_pink +exec "hi Type guifg=".zinc_gray_600 +exec "hi Type ctermfg=".cterm_gray_700 +exec "hi Special guifg=".zinc_gray_500 +exec "hi Special ctermfg=".cterm_gray_700 +exec "hi Underlined guifg=".zinc_gray_200 +exec "hi Underlined ctermfg=".cterm_gray_500 +exec "hi Error guifg=".hot_pink." guibg=".gray_800 +exec "hi Error ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi Todo guifg=".hot_pink." guibg=".gray_800 +exec "hi Todo ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi Function guifg=".hot_pink +exec "hi Function ctermfg=".cterm_hot_pink + +" GitGutter +exec "hi GitGutterAdd guifg=".hot_pink +exec "hi GitGutterAdd ctermfg=".cterm_hot_pink +exec "hi GitGutterChange guifg=".white +exec "hi GitGutterChange ctermfg=".cterm_white +exec "hi GitGutterChangeDelete guifg=".white +exec "hi GitGutterChangeDelete ctermfg=".cterm_white +exec "hi GitGutterDelete guifg=".hot_pink +exec "hi GitGutterDelete ctermfg=".cterm_hot_pink + +" fugitive +exec "hi gitcommitComment guifg=".gray_600 +exec "hi gitcommitComment ctermfg=".cterm_gray_700 +exec "hi gitcommitOnBranch guifg=".gray_600 +exec "hi gitcommitOnBranch ctermfg=".cterm_gray_700 +exec "hi gitcommitHeader guifg=".gray_400 +exec "hi gitcommitHeader ctermfg=".cterm_gray_500 +exec "hi gitcommitHead guifg=".gray_600 +exec "hi gitcommitHead ctermfg=".cterm_gray_700 +exec "hi gitcommitSelectedType guifg=".hot_pink +exec "hi gitcommitSelectedType ctermfg=".cterm_hot_pink +exec "hi gitcommitSelectedFile guifg=".hot_pink +exec "hi gitcommitSelectedFile ctermfg=".cterm_hot_pink +exec "hi gitcommitDiscardedType guifg=".white +exec "hi gitcommitDiscardedType ctermfg=".cterm_white +exec "hi gitcommitDiscardedFile guifg=".white +exec "hi gitcommitDiscardedFile ctermfg=".cterm_white +exec "hi gitcommitUntrackedFile guifg=".hot_pink +exec "hi gitcommitUntrackedFile ctermfg=".cterm_hot_pink + +" Default +exec "hi ColorColumn guibg=".gray_800 +exec "hi ColorColumn ctermbg=".cterm_zinc_gray_900 +exec "hi Conceal guifg=".gray_700 +exec "hi Conceal ctermfg=".cterm_gray_800 +exec "hi Cursor guifg=".gray_900 +exec "hi Cursor ctermfg=".cterm_gray_900 +exec "hi CursorColumn guibg=".gray_800 +exec "hi CursorColumn ctermbg=".cterm_zinc_gray_900 +exec "hi CursorLine guibg=".zinc_gray_900 +exec "hi CursorLine ctermbg=".cterm_zinc_gray_900." cterm=none" +exec "hi Directory guifg=".zinc_gray_200 +exec "hi Directory ctermfg=".cterm_gray_500 +exec "hi DiffAdd guifg=".hot_pink." guibg=".gray_800 +exec "hi DiffAdd ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi DiffChange guifg=".white." guibg=".gray_800 +exec "hi DiffChange ctermfg=".cterm_white." ctermbg=".cterm_zinc_gray_900 +exec "hi DiffDelete guifg=".hot_pink." guibg=".gray_800 +exec "hi DiffDelete ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi DiffText guifg=".white." guibg=".gray_700 +exec "hi DiffText ctermfg=".cterm_white." ctermbg=".cterm_gray_800 +exec "hi ErrorMsg guifg=".gray_200." guibg=".hot_pink +exec "hi ErrorMsg ctermfg=".cterm_white." ctermbg=".cterm_hot_pink +exec "hi VertSplit guifg=".gray_900." guibg=".zinc_gray_900 +exec "hi VertSplit ctermfg=".cterm_gray_900." ctermbg=".cterm_gray_700 +exec "hi Folded guifg=".gray_500." guibg=".gray_800 +exec "hi Folded ctermfg=".cterm_gray_600." ctermbg=".cterm_zinc_gray_900 +exec "hi FoldColumn guifg=".gray_500." guibg=".gray_800 +exec "hi FoldColumn ctermfg=".cterm_gray_600." ctermbg=".cterm_zinc_gray_900 +exec "hi SignColumn guibg=".gray_900 +exec "hi SignColumn ctermbg=".cterm_gray_900 +exec "hi IncSearch guifg=".gray_900." guibg=".white +exec "hi IncSearch ctermfg=".cterm_gray_900." ctermbg=".cterm_white +exec "hi LineNr guifg=".gray_800." guibg=".gray_900 +exec "hi LineNr ctermfg=".cterm_zinc_gray_900." ctermbg=".cterm_gray_900 +exec "hi CursorLineNr guifg=".gray_600." guibg=".gray_800 +exec "hi CursorLineNr ctermfg=".cterm_gray_700." ctermbg=".cterm_zinc_gray_900 +exec "hi MatchParen guibg=".gray_700 +exec "hi MatchParen ctermbg=".cterm_gray_800 +exec "hi MoreMsg guifg=".gray_900." guibg=".zinc_gray_500 +exec "hi MoreMsg ctermfg=".cterm_gray_900." ctermbg=".cterm_gray_700 +exec "hi NonText guifg=".gray_800." guibg=".gray_900 +exec "hi NonText ctermfg=".cterm_zinc_gray_900." ctermbg=".cterm_gray_900 +exec "hi Pmenu guifg=".gray_300." guibg=".gray_800 +exec "hi Pmenu ctermfg=".cterm_gray_400." ctermbg=".cterm_zinc_gray_900 +exec "hi PmenuSel guifg=".zinc_gray_500." guibg=".gray_800 +exec "hi PmenuSel ctermfg=".cterm_gray_700." ctermbg=".cterm_zinc_gray_900 +exec "hi PmenuSbar guifg=".hot_pink." guibg=".gray_800 +exec "hi PmenuSbar ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi PmenuThumb guifg=".hot_pink." guibg=".gray_700 +exec "hi PmenuThumb ctermfg=".cterm_hot_pink." ctermbg=".cterm_gray_800 +exec "hi Question guifg=".gray_200." guibg=".gray_800 +exec "hi Question ctermfg=".cterm_white." ctermbg=".cterm_zinc_gray_900 +exec "hi Search guifg=".gray_900." guibg=".white +exec "hi Search ctermfg=".cterm_gray_900." ctermbg=".cterm_white +exec "hi SpecialKey guifg=".zinc_gray_600." guibg=".gray_900 +exec "hi SpecialKey ctermfg=".cterm_gray_700." ctermbg=".cterm_gray_900 +exec "hi SpellBad guifg=".hot_pink +exec "hi SpellBad ctermfg=".cterm_hot_pink." ctermbg=NONE cterm=undercurl" +exec "hi SpellCap guifg=".white +exec "hi SpellCap ctermfg=".cterm_white." ctermbg=NONE cterm=undercurl" +exec "hi SpellLocal guifg=".zinc_gray_500 +exec "hi SpellLocal ctermfg=".cterm_gray_700 +exec "hi SpellRare guifg=".hot_pink +exec "hi SpellRare ctermfg=".cterm_hot_pink +exec "hi StatusLine guifg=".gray_500." guibg=".gray_800." gui=none" +exec "hi StatusLine ctermfg=".cterm_gray_600." ctermbg=".cterm_zinc_gray_900." cterm=none" +exec "hi TabLine guifg=".gray_400." guibg=".gray_800 +exec "hi TabLine ctermfg=".cterm_gray_500." ctermbg=".cterm_zinc_gray_900 +exec "hi TabLineFill guibg=".gray_800 +exec "hi TabLineFill ctermbg=".cterm_zinc_gray_900 +exec "hi TabLineSel guifg=".gray_300." guibg=".gray_900 +exec "hi TabLineSel ctermfg=".cterm_gray_400." ctermbg=".cterm_gray_900 +exec "hi Title guifg=".zinc_gray_200 +exec "hi Title ctermfg=".cterm_gray_500 +exec "hi Visual guibg=".gray_800 +exec "hi Visual ctermbg=".cterm_zinc_gray_900 +exec "hi VisualNOS guifg=".hot_pink." guibg=".gray_800 +exec "hi VisualNOS ctermfg=".cterm_hot_pink." ctermbg=".cterm_zinc_gray_900 +exec "hi WarningMsg guifg=".hot_pink +exec "hi WarningMsg ctermfg=".cterm_hot_pink +exec "hi WildMenu guifg=".zinc_gray_500." guibg=".gray_800 +exec "hi WildMenu ctermfg=".cterm_gray_700." ctermbg=".cterm_zinc_gray_900 + +" NERDTree +exec "hi NERDTreeExecFile guifg=".zinc_gray_500 +exec "hi NERDTreeExecFile ctermfg=".cterm_gray_700 +exec "hi NERDTreeDirSlash guifg=".zinc_gray_200 +exec "hi NERDTreeDirSlash ctermfg=".cterm_gray_500 +exec "hi NERDTreeCWD guifg=".hot_pink +exec "hi NERDTreeCWD ctermfg=".cterm_hot_pink + +" nvim-tree +exec "hi NvimTreeExecFile guifg=".zinc_gray_500 +exec "hi NvimTreeExecFile ctermfg=".cterm_gray_700 +exec "hi NvimTreeFolderIcon guifg=".hot_pink +exec "hi NvimTreeIndentMarker guifg=".gray_300 +exec "hi NvimTreeRootFolder guifg=".zinc_gray_500 + +" nvim-treesitter (backwards compatible for users of older nvim-treesitter versions) +exec "hi TSInclude guifg=".gray_600 +exec "hi TSKeyword guifg=".gray_500 +exec "hi TSVariable guifg=".gray_300 +exec "hi TSPunctDelimiter guifg=".gray_600 +exec "hi TSPunctSpecial guifg=".hot_pink +"exec "hi TSPunctBracket guifg=".gray_600 +exec "hi TSTypeBuiltin guifg=".gray_600 +exec "hi TSTag guifg=".gray_600 +"exec "hi TSTagDelimiter guifg=".gray_400 +exec "hi TSConstructor guifg=".gray_200 +exec "hi TSProperty guifg=".gray_300 +exec "hi TSMethod guifg=".gray_200 +exec "hi TSKeywordReturn guifg=".white +exec "hi TSKeywordFunction guifg=".gray_500 +exec "hi TSFunction guifg=".white +exec "hi TSNone guifg=".gray_400 +"exec "hi TSType guifg=".gray_400 + +" nvim-treesitter new tags (won't work with older version of neovim) +if has('nvim-0.8') + exec "hi @include guifg=".gray_600 + exec "hi @keyword guifg=".gray_500 + exec "hi @variable guifg=".gray_300 + exec "hi @punctuation.delimiter guifg=".gray_600 + exec "hi @punctuation.special guifg=".hot_pink + "exec "hi @punctuation.bracket guifg=".gray_600 + exec "hi @type.builtin guifg=".gray_600 + exec "hi @tag guifg=".gray_600 + exec "hi @tag.attribute guifg=".gray_450 + "exec "hi @tag.delimiter guifg=".gray_400 + exec "hi @constructor guifg=".gray_200 + exec "hi @property guifg=".gray_300 + exec "hi @method guifg=".gray_200 + exec "hi @keyword.return guifg=".white + exec "hi @keyword.function guifg=".gray_500 + exec "hi @function guifg=".white + exec "hi @none guifg=".gray_400 + "exec "hi @type guifg=".gray_400 +endif + +" DevIcons (all the same color) -> TODO: Doesn't seem to work, needs testing +for hl in getcompletion("DevIcon", "highlight") + execute "hi ".hl." guifg=".gray_500." ctermfg=".cterm_gray_500 +endfor + +" Clean up +unlet gray_900 gray_800 gray_700 gray_600 gray_500 gray_450 gray_400 gray_300 gray_200 hot_pink white zinc_gray_500 zinc_gray_200 zinc_gray_600 +unlet cterm_gray_900 cterm_zinc_gray_900 cterm_gray_800 cterm_gray_700 cterm_gray_600 cterm_gray_500 cterm_gray_400 cterm_white cterm_hot_pink diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 47328dc..834fab2 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -11,9 +11,9 @@ return require('packer').startup(function(use) 'VonHeikemen/lsp-zero.nvim', requires = { -- LSP Support - {'neovim/nvim-lspconfig'}, {'williamboman/mason.nvim'}, {'williamboman/mason-lspconfig.nvim'}, + {'neovim/nvim-lspconfig'}, -- Autocompletion {'hrsh7th/nvim-cmp'}, diff --git a/nvim/.config/nvim/lua/set.lua b/nvim/.config/nvim/lua/set.lua index 923eb9a..8ea974e 100644 --- a/nvim/.config/nvim/lua/set.lua +++ b/nvim/.config/nvim/lua/set.lua @@ -35,7 +35,7 @@ vim.opt.smartcase = true vim.opt.wildmenu = true vim.opt.autoread = true -vim.cmd('colorscheme plain') +vim.cmd('colorscheme noirblaze') -- gitgutter options vim.g.gitgutter_override_sign_column_highlight = 0 diff --git a/nvim/.config/nvim/lua/statusline/line.lua b/nvim/.config/nvim/lua/statusline/line.lua index f70c2f8..64bc493 100644 --- a/nvim/.config/nvim/lua/statusline/line.lua +++ b/nvim/.config/nvim/lua/statusline/line.lua @@ -19,7 +19,7 @@ function M.statusline() '%#Blanks#', '%m', '%#SecondaryBlock#', - ' '..git.git_branch, + -- ' '..git.git_branch, '%=', '%#SecondaryBlock#', '%l,%c ', diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index 9d2bf07..ab63d42 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -49,8 +49,8 @@ local function save_profiles(threshold) end time([[Luarocks path setup]], true) -local package_path_str = "/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +local package_path_str = "/Users/shubh/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?.lua;/Users/shubh/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?/init.lua;/Users/shubh/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?.lua;/Users/shubh/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/Users/shubh/.cache/nvim/packer_hererocks/2.1.1713773202/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end @@ -76,98 +76,103 @@ time([[Defining packer_plugins]], true) _G.packer_plugins = { LuaSnip = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/LuaSnip", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["cmp-buffer"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-buffer", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-nvim-lsp"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-nvim-lua"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", url = "https://github.com/hrsh7th/cmp-nvim-lua" }, ["cmp-path"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-path", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, cmp_luasnip = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, ["friendly-snippets"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/friendly-snippets", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/friendly-snippets", url = "https://github.com/rafamadriz/friendly-snippets" }, fzf = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/fzf", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/fzf", url = "https://github.com/junegunn/fzf" }, ["lsp-zero.nvim"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", url = "https://github.com/VonHeikemen/lsp-zero.nvim" }, ["mason-lspconfig.nvim"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", url = "https://github.com/williamboman/mason-lspconfig.nvim" }, ["mason.nvim"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/mason.nvim", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/mason.nvim", url = "https://github.com/williamboman/mason.nvim" }, ["nvim-autopairs"] = { config = { "\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/nvim-autopairs", url = "https://github.com/windwp/nvim-autopairs" }, ["nvim-cmp"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-cmp", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-lspconfig"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-treesitter"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/nvim-treesitter", url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["packer.nvim"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/packer.nvim", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, ["vim-bujo"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-bujo", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/vim-bujo", url = "https://github.com/sh-ubh/vim-bujo" }, ["vim-commentary"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-commentary", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/vim-commentary", url = "https://github.com/tpope/vim-commentary" }, + ["vim-fugitive"] = { + loaded = true, + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/vim-fugitive", + url = "https://github.com/tpope/vim-fugitive" + }, ["vim-gitgutter"] = { loaded = true, - path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-gitgutter", + path = "/Users/shubh/.local/share/nvim/site/pack/packer/start/vim-gitgutter", url = "https://github.com/airblade/vim-gitgutter" } } -- cgit v1.2.3