├── .gitignore ├── README.md └── nvim ├── colors └── gruvbox.vim ├── init.lua └── lua ├── plugins ├── configs │ ├── cmp.lua │ ├── lspconfig.lua │ ├── mason-lspconfig.lua │ ├── mason.lua │ ├── nvim-treesitter.lua │ └── telescope.lua └── init.lua └── settings ├── keymaps.lua ├── options.lua └── styles.lua /.gitignore: -------------------------------------------------------------------------------- 1 | nvim/plugin/* 2 | README.md 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NeoVim Essentials 2 | 3 | Hello everyone! This repository is inspired by chris@machine, kickstart.nvim, and NvChad. 4 | All of them have great setups but I wanted something that was the absolute bare minimum, 5 | that was well organized. So this is what I came up with! Enjoy. 6 | 7 | ## Installation 8 | Remove previous nvim installation if it exists. 9 | ``` 10 | rm -rf ~/.config/nvim 11 | rm -rf ~/.local/share/nvim 12 | rm -rf ~/.cache/nvim 13 | ``` 14 | Then add this repo. 15 | ``` 16 | git clone https://github.com/Blovio/NeoVim_Essentials 17 | mkdir -p ~/.config/nvim 18 | mv NeoVim_Essentials/nvim/* ~/.config/nvim && rm -rf NeoVim_Essentials 19 | ``` 20 | 21 | ## Directory Layout 22 | ![Screenshot from 2022-08-19 12-07-46](https://user-images.githubusercontent.com/89369559/185661142-2886ba2e-f7d7-4021-b12f-179094d49dfc.png) 23 | 24 | ## Installed are the following plugins using packer: 25 | ``` 26 | use 'wbthomason/packer.nvim' -- Packer manages itself 27 | use 'nvim-lua/plenary.nvim' -- Avoids callbacks, used by other plugins 28 | use 'nvim-lua/popup.nvim' -- Popup for other plugins 29 | use 'nvim-treesitter/nvim-treesitter' -- Language parsing completion engine 30 | use "williamboman/mason.nvim" -- UI for fetching/downloading LSPs 31 | use "williamboman/mason-lspconfig.nvim" -- Bridges mason and lspconfig 32 | use 'neovim/nvim-lspconfig' -- Language server protocol implementation 33 | use 'hrsh7th/nvim-cmp' -- Vim completion engine 34 | use 'L3MON4D3/LuaSnip' -- More snippets 35 | use 'saadparwaiz1/cmp_luasnip' -- Even more snippets 36 | use 'hrsh7th/cmp-nvim-lsp' -- Cmp's own LSP 37 | use 'hrsh7th/cmp-buffer' -- Cmp source for buffer words 38 | use 'hrsh7th/cmp-path' -- Cmp source for path words 39 | use 'nvim-telescope/telescope.nvim' -- Finder, requires fzf and ripgrep 40 | use 'gruvbox-community/gruvbox' -- Schmexy colors 41 | 42 | ``` 43 | -------------------------------------------------------------------------------- /nvim/colors/gruvbox.vim: -------------------------------------------------------------------------------- 1 | " ----------------------------------------------------------------------------- 2 | " File: gruvbox.vim 3 | " Description: Retro groove color scheme for Vim 4 | " Author: morhetz 5 | " Source: https://github.com/gruvbox-community/gruvbox 6 | " ----------------------------------------------------------------------------- 7 | 8 | " Supporting code ------------------------------------------------------------- 9 | " Initialisation: {{{ 10 | 11 | if version > 580 12 | hi clear 13 | if exists("syntax_on") 14 | syntax reset 15 | endif 16 | endif 17 | 18 | let g:colors_name='gruvbox' 19 | 20 | if !(has('termguicolors') && &termguicolors) && !has('gui_running') && &t_Co != 256 21 | finish 22 | endif 23 | 24 | " }}} 25 | " Global Settings: {{{ 26 | 27 | if !exists('g:gruvbox_bold') 28 | let g:gruvbox_bold=1 29 | endif 30 | if !exists('g:gruvbox_italic') 31 | if has('gui_running') || $TERM_ITALICS == 'true' 32 | let g:gruvbox_italic=1 33 | else 34 | let g:gruvbox_italic=0 35 | endif 36 | endif 37 | if !exists('g:gruvbox_undercurl') 38 | let g:gruvbox_undercurl=1 39 | endif 40 | if !exists('g:gruvbox_underline') 41 | let g:gruvbox_underline=1 42 | endif 43 | if !exists('g:gruvbox_inverse') 44 | let g:gruvbox_inverse=1 45 | endif 46 | 47 | if !exists('g:gruvbox_guisp_fallback') || index(['fg', 'bg'], g:gruvbox_guisp_fallback) == -1 48 | let g:gruvbox_guisp_fallback='NONE' 49 | endif 50 | 51 | if !exists('g:gruvbox_improved_strings') 52 | let g:gruvbox_improved_strings=0 53 | endif 54 | 55 | if !exists('g:gruvbox_improved_warnings') 56 | let g:gruvbox_improved_warnings=0 57 | endif 58 | 59 | if !exists('g:gruvbox_termcolors') 60 | let g:gruvbox_termcolors=256 61 | endif 62 | 63 | if !exists('g:gruvbox_invert_indent_guides') 64 | let g:gruvbox_invert_indent_guides=0 65 | endif 66 | 67 | if exists('g:gruvbox_contrast') 68 | echo 'g:gruvbox_contrast is deprecated; use g:gruvbox_contrast_light and g:gruvbox_contrast_dark instead' 69 | endif 70 | 71 | if !exists('g:gruvbox_contrast_dark') 72 | let g:gruvbox_contrast_dark='medium' 73 | endif 74 | 75 | if !exists('g:gruvbox_contrast_light') 76 | let g:gruvbox_contrast_light='medium' 77 | endif 78 | 79 | let s:is_dark=(&background == 'dark') 80 | 81 | " }}} 82 | " Palette Utility Functions: {{{ 83 | 84 | function! s:Color(name, default, ...) 85 | " color already set, validate option 86 | if has_key(s:gb, a:name) 87 | let l:color = s:gb[a:name] 88 | 89 | if type(l:color) == type('') 90 | " gui color only 91 | let s:gb[a:name] = copy(a:default) 92 | let s:gb[a:name][0] = l:color 93 | return 1 94 | elseif type(l:color) == type(0) 95 | " terminal color only 96 | let s:gb[a:name] = copy(a:default) 97 | let s:gb[a:name][1] = l:color 98 | return 1 99 | elseif type(l:color) == type([]) 100 | \ && len(l:color) == 2 101 | \ && type(l:color[0]) == type('') 102 | \ && type(l:color[1]) == type(0) 103 | " gui and terminal color 104 | return 1 105 | else 106 | " invalid value 107 | echo a:name 'is invalid, usage: let g:gruvbox_colors.color = (["#ffffff", 255]|"#ffffff"|255)' 108 | return 0 109 | endif 110 | 111 | endif 112 | 113 | " set default option 114 | let s:gb[a:name] = a:default 115 | return 1 116 | endfunction 117 | 118 | " }}} 119 | " Palette: {{{ 120 | 121 | " get the global gruvbox palette options, if any 122 | let g:gruvbox_colors = get(g:, 'gruvbox_colors', {}) 123 | " initialize the script palette 124 | let s:gb = copy(g:gruvbox_colors) 125 | let g:current_gruvbox_colors = s:gb 126 | 127 | " set palette default colors 128 | call s:Color('dark0_hard', ['#1d2021', 234]) " 29-32-33 129 | call s:Color('dark0', ['#282828', 235]) " 40-40-40 130 | call s:Color('dark0_soft', ['#32302f', 236]) " 50-48-47 131 | call s:Color('dark1', ['#3c3836', 237]) " 60-56-54 132 | call s:Color('dark2', ['#504945', 239]) " 80-73-69 133 | call s:Color('dark3', ['#665c54', 241]) " 102-92-84 134 | call s:Color('dark4', ['#7c6f64', 243]) " 124-111-100 135 | call s:Color('dark4_256', ['#7c6f64', 243]) " 124-111-100 136 | 137 | call s:Color('gray_245', ['#928374', 245]) " 146-131-116 138 | call s:Color('gray_244', ['#928374', 244]) " 146-131-116 139 | 140 | call s:Color('light0_hard', ['#f9f5d7', 230]) " 249-245-215 141 | call s:Color('light0', ['#fbf1c7', 229]) " 253-244-193 142 | call s:Color('light0_soft', ['#f2e5bc', 228]) " 242-229-188 143 | call s:Color('light1', ['#ebdbb2', 223]) " 235-219-178 144 | call s:Color('light2', ['#d5c4a1', 250]) " 213-196-161 145 | call s:Color('light3', ['#bdae93', 248]) " 189-174-147 146 | call s:Color('light4', ['#a89984', 246]) " 168-153-132 147 | call s:Color('light4_256', ['#a89984', 246]) " 168-153-132 148 | 149 | call s:Color('bright_red', ['#fb4934', 167]) " 251-73-52 150 | call s:Color('bright_green', ['#b8bb26', 142]) " 184-187-38 151 | call s:Color('bright_yellow', ['#fabd2f', 214]) " 250-189-47 152 | call s:Color('bright_blue', ['#83a598', 109]) " 131-165-152 153 | call s:Color('bright_purple', ['#d3869b', 175]) " 211-134-155 154 | call s:Color('bright_aqua', ['#8ec07c', 108]) " 142-192-124 155 | call s:Color('bright_orange', ['#fe8019', 208]) " 254-128-25 156 | 157 | call s:Color('neutral_red', ['#cc241d', 124]) " 204-36-29 158 | call s:Color('neutral_green', ['#98971a', 106]) " 152-151-26 159 | call s:Color('neutral_yellow', ['#d79921', 172]) " 215-153-33 160 | call s:Color('neutral_blue', ['#458588', 66]) " 69-133-136 161 | call s:Color('neutral_purple', ['#b16286', 132]) " 177-98-134 162 | call s:Color('neutral_aqua', ['#689d6a', 72]) " 104-157-106 163 | call s:Color('neutral_orange', ['#d65d0e', 166]) " 214-93-14 164 | 165 | call s:Color('faded_red', ['#9d0006', 88]) " 157-0-6 166 | call s:Color('faded_green', ['#79740e', 100]) " 121-116-14 167 | call s:Color('faded_yellow', ['#b57614', 136]) " 181-118-20 168 | call s:Color('faded_blue', ['#076678', 24]) " 7-102-120 169 | call s:Color('faded_purple', ['#8f3f71', 96]) " 143-63-113 170 | call s:Color('faded_aqua', ['#427b58', 65]) " 66-123-88 171 | call s:Color('faded_orange', ['#af3a03', 130]) " 175-58-3 172 | 173 | call s:Color('none', ['NONE','NONE']) 174 | call s:Color('NONE', ['NONE','NONE']) 175 | call s:Color('None', ['NONE','NONE']) 176 | 177 | " }}} 178 | " Setup Emphasis: {{{ 179 | 180 | let s:bold = 'bold,' 181 | if g:gruvbox_bold == 0 182 | let s:bold = '' 183 | endif 184 | 185 | let s:italic = 'italic,' 186 | if g:gruvbox_italic == 0 187 | let s:italic = '' 188 | endif 189 | 190 | let s:underline = 'underline,' 191 | if g:gruvbox_underline == 0 192 | let s:underline = '' 193 | endif 194 | 195 | let s:undercurl = 'undercurl,' 196 | if g:gruvbox_undercurl == 0 197 | let s:undercurl = '' 198 | endif 199 | 200 | let s:inverse = 'inverse,' 201 | if g:gruvbox_inverse == 0 202 | let s:inverse = '' 203 | endif 204 | 205 | " }}} 206 | " Setup Colors: {{{ 207 | 208 | let s:vim_bg = ['bg', 'bg'] 209 | let s:vim_fg = ['fg', 'fg'] 210 | let s:none = ['NONE', 'NONE'] 211 | 212 | " determine relative colors 213 | if s:is_dark 214 | let s:bg0 = s:gb.dark0 215 | if g:gruvbox_contrast_dark == 'soft' 216 | let s:bg0 = s:gb.dark0_soft 217 | elseif g:gruvbox_contrast_dark == 'hard' 218 | let s:bg0 = s:gb.dark0_hard 219 | endif 220 | 221 | let s:bg1 = s:gb.dark1 222 | let s:bg2 = s:gb.dark2 223 | let s:bg3 = s:gb.dark3 224 | let s:bg4 = s:gb.dark4 225 | 226 | let s:gray = s:gb.gray_245 227 | 228 | let s:fg0 = s:gb.light0 229 | let s:fg1 = s:gb.light1 230 | let s:fg2 = s:gb.light2 231 | let s:fg3 = s:gb.light3 232 | let s:fg4 = s:gb.light4 233 | 234 | let s:fg4_256 = s:gb.light4_256 235 | 236 | let s:red = s:gb.bright_red 237 | let s:green = s:gb.bright_green 238 | let s:yellow = s:gb.bright_yellow 239 | let s:blue = s:gb.bright_blue 240 | let s:purple = s:gb.bright_purple 241 | let s:aqua = s:gb.bright_aqua 242 | let s:orange = s:gb.bright_orange 243 | else 244 | let s:bg0 = s:gb.light0 245 | if g:gruvbox_contrast_light == 'soft' 246 | let s:bg0 = s:gb.light0_soft 247 | elseif g:gruvbox_contrast_light == 'hard' 248 | let s:bg0 = s:gb.light0_hard 249 | endif 250 | 251 | let s:bg1 = s:gb.light1 252 | let s:bg2 = s:gb.light2 253 | let s:bg3 = s:gb.light3 254 | let s:bg4 = s:gb.light4 255 | 256 | let s:gray = s:gb.gray_244 257 | 258 | let s:fg0 = s:gb.dark0 259 | let s:fg1 = s:gb.dark1 260 | let s:fg2 = s:gb.dark2 261 | let s:fg3 = s:gb.dark3 262 | let s:fg4 = s:gb.dark4 263 | 264 | let s:fg4_256 = s:gb.dark4_256 265 | 266 | let s:red = s:gb.faded_red 267 | let s:green = s:gb.faded_green 268 | let s:yellow = s:gb.faded_yellow 269 | let s:blue = s:gb.faded_blue 270 | let s:purple = s:gb.faded_purple 271 | let s:aqua = s:gb.faded_aqua 272 | let s:orange = s:gb.faded_orange 273 | endif 274 | 275 | " reset to 16 colors fallback 276 | if g:gruvbox_termcolors == 16 277 | let s:bg0[1] = 0 278 | let s:fg4[1] = 7 279 | let s:gray[1] = 8 280 | let s:red[1] = 9 281 | let s:green[1] = 10 282 | let s:yellow[1] = 11 283 | let s:blue[1] = 12 284 | let s:purple[1] = 13 285 | let s:aqua[1] = 14 286 | let s:fg1[1] = 15 287 | endif 288 | 289 | " save current relative colors back to palette dictionary 290 | call s:Color('bg0', s:bg0) 291 | call s:Color('bg1', s:bg1) 292 | call s:Color('bg2', s:bg2) 293 | call s:Color('bg3', s:bg3) 294 | call s:Color('bg4', s:bg4) 295 | 296 | call s:Color('gray', s:gray) 297 | 298 | call s:Color('fg0', s:fg0) 299 | call s:Color('fg1', s:fg1) 300 | call s:Color('fg2', s:fg2) 301 | call s:Color('fg3', s:fg3) 302 | call s:Color('fg4', s:fg4) 303 | 304 | call s:Color('fg4_256', s:fg4_256) 305 | 306 | call s:Color('red', s:red) 307 | call s:Color('green', s:green) 308 | call s:Color('yellow', s:yellow) 309 | call s:Color('blue', s:blue) 310 | call s:Color('purple', s:purple) 311 | call s:Color('aqua', s:aqua) 312 | call s:Color('orange', s:orange) 313 | 314 | " }}} 315 | " Setup Terminal Colors For Neovim: {{{ 316 | 317 | if has('nvim') 318 | let g:terminal_color_0 = s:gb.bg0[0] 319 | let g:terminal_color_8 = s:gb.gray[0] 320 | 321 | let g:terminal_color_1 = s:gb.neutral_red[0] 322 | let g:terminal_color_9 = s:gb.red[0] 323 | 324 | let g:terminal_color_2 = s:gb.neutral_green[0] 325 | let g:terminal_color_10 = s:gb.green[0] 326 | 327 | let g:terminal_color_3 = s:gb.neutral_yellow[0] 328 | let g:terminal_color_11 = s:gb.yellow[0] 329 | 330 | let g:terminal_color_4 = s:gb.neutral_blue[0] 331 | let g:terminal_color_12 = s:gb.blue[0] 332 | 333 | let g:terminal_color_5 = s:gb.neutral_purple[0] 334 | let g:terminal_color_13 = s:gb.purple[0] 335 | 336 | let g:terminal_color_6 = s:gb.neutral_aqua[0] 337 | let g:terminal_color_14 = s:gb.aqua[0] 338 | 339 | let g:terminal_color_7 = s:gb.fg4[0] 340 | let g:terminal_color_15 = s:gb.fg1[0] 341 | endif 342 | 343 | " }}} 344 | " Setup Terminal Colors For Vim with termguicolors: {{{ 345 | 346 | if exists('*term_setansicolors') 347 | let g:terminal_ansi_colors = repeat([0], 16) 348 | 349 | let g:terminal_ansi_colors[0] = s:gb.bg0[0] 350 | let g:terminal_ansi_colors[8] = s:gb.gray[0] 351 | 352 | let g:terminal_ansi_colors[1] = s:gb.neutral_red[0] 353 | let g:terminal_ansi_colors[9] = s:gb.red[0] 354 | 355 | let g:terminal_ansi_colors[2] = s:gb.neutral_green[0] 356 | let g:terminal_ansi_colors[10] = s:gb.green[0] 357 | 358 | let g:terminal_ansi_colors[3] = s:gb.neutral_yellow[0] 359 | let g:terminal_ansi_colors[11] = s:gb.yellow[0] 360 | 361 | let g:terminal_ansi_colors[4] = s:gb.neutral_blue[0] 362 | let g:terminal_ansi_colors[12] = s:gb.blue[0] 363 | 364 | let g:terminal_ansi_colors[5] = s:gb.neutral_purple[0] 365 | let g:terminal_ansi_colors[13] = s:gb.purple[0] 366 | 367 | let g:terminal_ansi_colors[6] = s:gb.neutral_aqua[0] 368 | let g:terminal_ansi_colors[14] = s:gb.aqua[0] 369 | 370 | let g:terminal_ansi_colors[7] = s:gb.fg4[0] 371 | let g:terminal_ansi_colors[15] = s:gb.fg1[0] 372 | endif 373 | 374 | " }}} 375 | " Overload Setting: {{{ 376 | 377 | let s:hls_cursor = s:gb.orange 378 | if exists('g:gruvbox_hls_cursor') 379 | let s:hls_cursor = get(s:gb, g:gruvbox_hls_cursor) 380 | endif 381 | 382 | let s:hls_highlight = s:gb.yellow 383 | if exists('g:gruvbox_hls_highlight') 384 | let s:hls_highlight = get(s:gb, g:gruvbox_hls_highlight) 385 | endif 386 | 387 | let s:number_column = s:none 388 | if exists('g:gruvbox_number_column') 389 | let s:number_column = get(s:gb, g:gruvbox_number_column) 390 | endif 391 | 392 | let s:sign_column = s:gb.bg1 393 | if exists('g:gruvbox_sign_column') 394 | let s:sign_column = get(s:gb, g:gruvbox_sign_column) 395 | endif 396 | 397 | let s:color_column = s:gb.bg1 398 | if exists('g:gruvbox_color_column') 399 | let s:color_column = get(s:gb, g:gruvbox_color_column) 400 | endif 401 | 402 | let s:vert_split = s:gb.bg0 403 | if exists('g:gruvbox_vert_split') 404 | let s:vert_split = get(s:gb, g:gruvbox_vert_split) 405 | endif 406 | 407 | let s:invert_signs = '' 408 | if exists('g:gruvbox_invert_signs') 409 | if g:gruvbox_invert_signs == 1 410 | let s:invert_signs = s:inverse 411 | endif 412 | endif 413 | 414 | let s:invert_selection = s:inverse 415 | if exists('g:gruvbox_invert_selection') 416 | if g:gruvbox_invert_selection == 0 417 | let s:invert_selection = '' 418 | endif 419 | endif 420 | 421 | let s:invert_tabline = '' 422 | if exists('g:gruvbox_invert_tabline') 423 | if g:gruvbox_invert_tabline == 1 424 | let s:invert_tabline = s:inverse 425 | endif 426 | endif 427 | 428 | let s:tabline_sel = s:gb.green 429 | if exists('g:gruvbox_tabline_sel') 430 | let s:tabline_sel = get(s:gb, g:gruvbox_tabline_sel) 431 | endif 432 | 433 | let s:italicize_comments = s:italic 434 | if exists('g:gruvbox_italicize_comments') 435 | if g:gruvbox_italicize_comments == 0 436 | let s:italicize_comments = '' 437 | endif 438 | endif 439 | 440 | let s:italicize_strings = '' 441 | if exists('g:gruvbox_italicize_strings') 442 | if g:gruvbox_italicize_strings == 1 443 | let s:italicize_strings = s:italic 444 | endif 445 | endif 446 | 447 | let s:italicize_operators = '' 448 | if exists('g:gruvbox_italicize_operators') 449 | if g:gruvbox_italicize_operators == 1 450 | let s:italicize_operators = s:italic 451 | endif 452 | endif 453 | 454 | " }}} 455 | " Highlighting Function: {{{ 456 | 457 | function! s:HL(group, fg, ...) 458 | " Arguments: group, guifg, guibg, gui, guisp 459 | 460 | " foreground 461 | let fg = a:fg 462 | 463 | " background 464 | if a:0 >= 1 465 | let bg = a:1 466 | else 467 | let bg = s:none 468 | endif 469 | 470 | " emphasis 471 | if a:0 >= 2 && strlen(a:2) 472 | let emstr = a:2 473 | else 474 | let emstr = 'NONE,' 475 | endif 476 | 477 | " special fallback 478 | if a:0 >= 3 479 | if g:gruvbox_guisp_fallback != 'NONE' 480 | let fg = a:3 481 | endif 482 | 483 | " bg fallback mode should invert higlighting 484 | if g:gruvbox_guisp_fallback == 'bg' 485 | let emstr .= 'inverse,' 486 | endif 487 | endif 488 | 489 | let histring = [ 'hi', a:group, 490 | \ 'guifg=' . fg[0], 'ctermfg=' . fg[1], 491 | \ 'guibg=' . bg[0], 'ctermbg=' . bg[1], 492 | \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2] 493 | \ ] 494 | 495 | " special 496 | if a:0 >= 3 497 | call add(histring, 'guisp=' . a:3[0]) 498 | endif 499 | 500 | execute join(histring, ' ') 501 | endfunction 502 | 503 | " }}} 504 | " Gruvbox Hi Groups: {{{ 505 | 506 | " memoize common hi groups 507 | call s:HL('GruvboxFg0', s:gb.fg0) 508 | call s:HL('GruvboxFg1', s:gb.fg1) 509 | call s:HL('GruvboxFg2', s:gb.fg2) 510 | call s:HL('GruvboxFg3', s:gb.fg3) 511 | call s:HL('GruvboxFg4', s:gb.fg4) 512 | call s:HL('GruvboxGray', s:gb.gray) 513 | call s:HL('GruvboxBg0', s:gb.bg0) 514 | call s:HL('GruvboxBg1', s:gb.bg1) 515 | call s:HL('GruvboxBg2', s:gb.bg2) 516 | call s:HL('GruvboxBg3', s:gb.bg3) 517 | call s:HL('GruvboxBg4', s:gb.bg4) 518 | 519 | call s:HL('GruvboxRed', s:gb.red) 520 | call s:HL('GruvboxRedBold', s:gb.red, s:none, s:bold) 521 | call s:HL('GruvboxGreen', s:gb.green) 522 | call s:HL('GruvboxGreenBold', s:gb.green, s:none, s:bold) 523 | call s:HL('GruvboxYellow', s:gb.yellow) 524 | call s:HL('GruvboxYellowBold', s:gb.yellow, s:none, s:bold) 525 | call s:HL('GruvboxBlue', s:gb.blue) 526 | call s:HL('GruvboxBlueBold', s:gb.blue, s:none, s:bold) 527 | call s:HL('GruvboxPurple', s:gb.purple) 528 | call s:HL('GruvboxPurpleBold', s:gb.purple, s:none, s:bold) 529 | call s:HL('GruvboxAqua', s:gb.aqua) 530 | call s:HL('GruvboxAquaBold', s:gb.aqua, s:none, s:bold) 531 | call s:HL('GruvboxOrange', s:gb.orange) 532 | call s:HL('GruvboxOrangeBold', s:gb.orange, s:none, s:bold) 533 | 534 | call s:HL('GruvboxRedSign', s:gb.red, s:sign_column, s:invert_signs) 535 | call s:HL('GruvboxGreenSign', s:gb.green, s:sign_column, s:invert_signs) 536 | call s:HL('GruvboxYellowSign', s:gb.yellow, s:sign_column, s:invert_signs) 537 | call s:HL('GruvboxBlueSign', s:gb.blue, s:sign_column, s:invert_signs) 538 | call s:HL('GruvboxPurpleSign', s:gb.purple, s:sign_column, s:invert_signs) 539 | call s:HL('GruvboxAquaSign', s:gb.aqua, s:sign_column, s:invert_signs) 540 | call s:HL('GruvboxOrangeSign', s:gb.orange, s:sign_column, s:invert_signs) 541 | 542 | call s:HL('GruvboxRedUnderline', s:none, s:none, s:undercurl, s:gb.red) 543 | call s:HL('GruvboxGreenUnderline', s:none, s:none, s:undercurl, s:gb.green) 544 | call s:HL('GruvboxYellowUnderline', s:none, s:none, s:undercurl, s:gb.yellow) 545 | call s:HL('GruvboxBlueUnderline', s:none, s:none, s:undercurl, s:gb.blue) 546 | call s:HL('GruvboxPurpleUnderline', s:none, s:none, s:undercurl, s:gb.purple) 547 | call s:HL('GruvboxAquaUnderline', s:none, s:none, s:undercurl, s:gb.aqua) 548 | call s:HL('GruvboxOrangeUnderline', s:none, s:none, s:undercurl, s:gb.orange) 549 | 550 | " }}} 551 | 552 | " Vanilla colorscheme --------------------------------------------------------- 553 | " General UI: {{{ 554 | 555 | " Normal text 556 | call s:HL('Normal', s:gb.fg1, s:gb.bg0) 557 | 558 | " Correct background (see issue #7): 559 | " --- Problem with changing between dark and light on 256 color terminal 560 | " --- https://github.com/morhetz/gruvbox/issues/7 561 | if exists('v:vim_did_enter') 562 | let g:gruvbox_vim_did_enter = v:vim_did_enter 563 | else 564 | augroup GruvboxVimEnter 565 | au! 566 | autocmd VimEnter * let g:gruvbox_vim_did_enter = 1 567 | augroup End 568 | endif 569 | if get(g:, 'gruvbox_vim_did_enter', 0) 570 | if s:is_dark 571 | set background=dark 572 | else 573 | set background=light 574 | endif 575 | endif 576 | 577 | if version >= 700 578 | " Screen line that the cursor is 579 | call s:HL('CursorLine', s:none, s:gb.bg1) 580 | " Screen column that the cursor is 581 | hi! link CursorColumn CursorLine 582 | 583 | " Tab pages line filler 584 | call s:HL('TabLineFill', s:gb.bg4, s:gb.bg1, s:invert_tabline) 585 | " Active tab page label 586 | call s:HL('TabLineSel', s:tabline_sel, s:gb.bg1, s:invert_tabline) 587 | " Not active tab page label 588 | hi! link TabLine TabLineFill 589 | 590 | " Match paired bracket under the cursor 591 | call s:HL('MatchParen', s:none, s:gb.bg3, s:bold) 592 | endif 593 | 594 | if version >= 703 595 | " Highlighted screen columns 596 | call s:HL('ColorColumn', s:none, s:color_column) 597 | 598 | " Concealed element: \lambda → λ 599 | call s:HL('Conceal', s:gb.blue, s:none) 600 | 601 | " Line number of CursorLine 602 | call s:HL('CursorLineNr', s:gb.yellow, s:gb.bg1) 603 | endif 604 | 605 | hi! link NonText GruvboxBg2 606 | hi! link SpecialKey GruvboxFg4 607 | 608 | call s:HL('Visual', s:none, s:gb.bg3, s:invert_selection) 609 | hi! link VisualNOS Visual 610 | 611 | call s:HL('Search', s:hls_highlight, s:gb.bg0, s:inverse) 612 | call s:HL('IncSearch', s:hls_cursor, s:gb.bg0, s:inverse) 613 | 614 | call s:HL('QuickFixLine', s:gb.bg0, s:gb.yellow, s:bold) 615 | 616 | call s:HL('Underlined', s:gb.blue, s:none, s:underline) 617 | 618 | call s:HL('StatusLine', s:gb.bg2, s:gb.fg1, s:inverse) 619 | call s:HL('StatusLineNC', s:gb.bg1, s:gb.fg4, s:inverse) 620 | 621 | " The column separating vertically split windows 622 | call s:HL('VertSplit', s:gb.bg3, s:vert_split) 623 | 624 | " Current match in wildmenu completion 625 | call s:HL('WildMenu', s:gb.blue, s:gb.bg2, s:bold) 626 | 627 | " Directory names, special names in listing 628 | hi! link Directory GruvboxGreenBold 629 | 630 | " Titles for output from :set all, :autocmd, etc. 631 | hi! link Title GruvboxGreenBold 632 | 633 | " Error messages on the command line 634 | call s:HL('ErrorMsg', s:gb.bg0, s:gb.red, s:bold) 635 | " More prompt: -- More -- 636 | hi! link MoreMsg GruvboxYellowBold 637 | " Current mode message: -- INSERT -- 638 | hi! link ModeMsg GruvboxYellowBold 639 | " 'Press enter' prompt and yes/no questions 640 | hi! link Question GruvboxOrangeBold 641 | " Warning messages 642 | hi! link WarningMsg GruvboxRedBold 643 | 644 | " }}} 645 | " Gutter: {{{ 646 | 647 | " Line number for :number and :# commands 648 | call s:HL('LineNr', s:gb.bg4, s:number_column) 649 | 650 | " Column where signs are displayed 651 | call s:HL('SignColumn', s:none, s:sign_column) 652 | 653 | " Line used for closed folds 654 | call s:HL('Folded', s:gb.gray, s:gb.bg1, s:italic) 655 | " Column where folds are displayed 656 | call s:HL('FoldColumn', s:gb.gray, s:gb.bg1) 657 | 658 | " }}} 659 | " Cursor: {{{ 660 | 661 | " Character under cursor 662 | call s:HL('Cursor', s:none, s:none, s:inverse) 663 | " Visual mode cursor, selection 664 | hi! link vCursor Cursor 665 | " Input moder cursor 666 | hi! link iCursor Cursor 667 | " Language mapping cursor 668 | hi! link lCursor Cursor 669 | 670 | " }}} 671 | " Syntax Highlighting: {{{ 672 | 673 | if g:gruvbox_improved_strings == 0 674 | hi! link Special GruvboxOrange 675 | else 676 | call s:HL('Special', s:gb.orange, s:gb.bg1, s:italicize_strings) 677 | endif 678 | 679 | call s:HL('Comment', s:gb.gray, s:none, s:italicize_comments) 680 | call s:HL('Todo', s:vim_fg, s:none, s:bold . s:italic) 681 | call s:HL('Error', s:gb.red, s:none, s:bold . s:inverse) 682 | 683 | " Generic statement 684 | hi! link Statement GruvboxRed 685 | " if, then, else, endif, switch, etc. 686 | hi! link Conditional GruvboxRed 687 | " for, do, while, etc. 688 | hi! link Repeat GruvboxRed 689 | " case, default, etc. 690 | hi! link Label GruvboxRed 691 | " try, catch, throw 692 | hi! link Exception GruvboxRed 693 | " sizeof, "+", "*", etc. 694 | call s:HL('Operator', s:gb.orange, s:none, s:italicize_operators) 695 | " Any other keyword 696 | hi! link Keyword GruvboxRed 697 | 698 | " Variable name 699 | hi! link Identifier GruvboxBlue 700 | " Function name 701 | hi! link Function GruvboxGreenBold 702 | 703 | " Generic preprocessor 704 | hi! link PreProc GruvboxAqua 705 | " Preprocessor #include 706 | hi! link Include GruvboxAqua 707 | " Preprocessor #define 708 | hi! link Define GruvboxAqua 709 | " Same as Define 710 | hi! link Macro GruvboxAqua 711 | " Preprocessor #if, #else, #endif, etc. 712 | hi! link PreCondit GruvboxAqua 713 | 714 | " Generic constant 715 | hi! link Constant GruvboxPurple 716 | " Character constant: 'c', '/n' 717 | hi! link Character GruvboxPurple 718 | " String constant: "this is a string" 719 | if g:gruvbox_improved_strings == 0 720 | call s:HL('String', s:gb.green, s:none, s:italicize_strings) 721 | else 722 | call s:HL('String', s:gb.fg1, s:gb.bg1, s:italicize_strings) 723 | endif 724 | " Boolean constant: TRUE, false 725 | hi! link Boolean GruvboxPurple 726 | " Number constant: 234, 0xff 727 | hi! link Number GruvboxPurple 728 | " Floating point constant: 2.3e10 729 | hi! link Float GruvboxPurple 730 | 731 | " Generic type 732 | hi! link Type GruvboxYellow 733 | " static, register, volatile, etc 734 | hi! link StorageClass GruvboxOrange 735 | " struct, union, enum, etc. 736 | hi! link Structure GruvboxAqua 737 | " typedef 738 | hi! link Typedef GruvboxYellow 739 | 740 | " }}} 741 | " Completion Menu: {{{ 742 | 743 | if version >= 700 744 | " Popup menu: normal item 745 | call s:HL('Pmenu', s:gb.fg1, s:gb.bg2) 746 | " Popup menu: selected item 747 | call s:HL('PmenuSel', s:gb.bg2, s:gb.blue, s:bold) 748 | " Popup menu: scrollbar 749 | call s:HL('PmenuSbar', s:none, s:gb.bg2) 750 | " Popup menu: scrollbar thumb 751 | call s:HL('PmenuThumb', s:none, s:gb.bg4) 752 | endif 753 | 754 | " }}} 755 | " Diffs: {{{ 756 | 757 | call s:HL('DiffDelete', s:gb.red, s:gb.bg0, s:inverse) 758 | call s:HL('DiffAdd', s:gb.green, s:gb.bg0, s:inverse) 759 | "call s:HL('DiffChange', s:gb.bg0, s:gb.blue) 760 | "call s:HL('DiffText', s:gb.bg0, s:gb.yellow) 761 | 762 | " Alternative setting 763 | call s:HL('DiffChange', s:gb.aqua, s:gb.bg0, s:inverse) 764 | call s:HL('DiffText', s:gb.yellow, s:gb.bg0, s:inverse) 765 | 766 | " }}} 767 | " Spelling: {{{ 768 | 769 | if has("spell") 770 | " Not capitalised word, or compile warnings 771 | if g:gruvbox_improved_warnings == 0 772 | hi! link SpellCap GruvboxBlueUnderline 773 | else 774 | call s:HL('SpellCap', s:gb.green, s:none, s:bold . s:italic) 775 | endif 776 | " Not recognized word 777 | hi! link SpellBad GruvboxRedUnderline 778 | " Wrong spelling for selected region 779 | hi! link SpellLocal GruvboxAquaUnderline 780 | " Rare word 781 | hi! link SpellRare GruvboxPurpleUnderline 782 | endif 783 | 784 | " }}} 785 | " LSP: {{{ 786 | 787 | if has("nvim") 788 | hi! link DiagnosticError GruvboxRed 789 | hi! link DiagnosticSignError GruvboxRedSign 790 | hi! link DiagnosticUnderlineError GruvboxRedUnderline 791 | 792 | hi! link DiagnosticWarn GruvboxYellow 793 | hi! link DiagnosticSignWarn GruvboxYellowSign 794 | hi! link DiagnosticUnderlineWarn GruvboxYellowUnderline 795 | 796 | hi! link DiagnosticInfo GruvboxBlue 797 | hi! link DiagnosticSignInfo GruvboxBlueSign 798 | hi! link DiagnosticUnderlineInfo GruvboxBlueUnderline 799 | 800 | hi! link DiagnosticHint GruvboxAqua 801 | hi! link DiagnosticSignHint GruvboxAquaSign 802 | hi! link DiagnosticUnderlineHint GruvboxAquaUnderline 803 | 804 | hi! link LspReferenceText GruvboxYellowBold 805 | hi! link LspReferenceRead GruvboxYellowBold 806 | hi! link LspReferenceWrite GruvboxOrangeBold 807 | 808 | hi! link LspCodeLens GruvboxGray 809 | 810 | " Backward Compatibilty prior to (https://github.com/neovim/neovim/pull/15585) 811 | hi! link LspDiagnosticsDefaultError GruvboxRed 812 | hi! link LspDiagnosticsSignError GruvboxRedSign 813 | hi! link LspDiagnosticsUnderlineError GruvboxRedUnderline 814 | 815 | hi! link LspDiagnosticsDefaultWarning GruvboxYellow 816 | hi! link LspDiagnosticsSignWarning GruvboxYellowSign 817 | hi! link LspDiagnosticsUnderlineWarning GruvboxYellowUnderline 818 | 819 | hi! link LspDiagnosticsDefaultInformation GruvboxBlue 820 | hi! link LspDiagnosticsSignInformation GruvboxBlueSign 821 | hi! link LspDiagnosticsUnderlineInformation GruvboxBlueUnderline 822 | 823 | hi! link LspDiagnosticsDefaultHint GruvboxAqua 824 | hi! link LspDiagnosticsSignHint GruvboxAquaSign 825 | hi! link LspDiagnosticsUnderlineHint GruvboxAquaUnderline 826 | endif 827 | 828 | " }}} 829 | 830 | " Treesitter: {{{ 831 | 832 | if has('nvim') 833 | " Highlight TSKeywordOperator as keywords 834 | " https://github.com/nvim-treesitter/nvim-treesitter/issues/447 835 | hi! link TSKeywordOperator GruvboxRed 836 | endif 837 | 838 | " }}} 839 | 840 | " Plugin specific ------------------------------------------------------------- 841 | " EasyMotion: {{{ 842 | 843 | hi! link EasyMotionTarget GruvboxRedBold 844 | hi! link EasyMotionTarget2First GruvboxYellowBold 845 | hi! link EasyMotionTarget2Second GruvboxOrangeBold 846 | hi! link EasyMotionShade GruvboxGray 847 | 848 | " }}} 849 | " Sneak: {{{ 850 | 851 | hi! link Sneak Search 852 | hi! link SneakLabel Search 853 | 854 | " }}} 855 | " Indent Guides: {{{ 856 | 857 | if !exists('g:indent_guides_auto_colors') 858 | let g:indent_guides_auto_colors = 0 859 | endif 860 | 861 | if g:indent_guides_auto_colors == 0 862 | if g:gruvbox_invert_indent_guides == 0 863 | call s:HL('IndentGuidesOdd', s:vim_bg, s:gb.bg2) 864 | call s:HL('IndentGuidesEven', s:vim_bg, s:gb.bg1) 865 | else 866 | call s:HL('IndentGuidesOdd', s:vim_bg, s:gb.bg2, s:inverse) 867 | call s:HL('IndentGuidesEven', s:vim_bg, s:gb.bg3, s:inverse) 868 | endif 869 | endif 870 | 871 | " }}} 872 | " IndentLine: {{{ 873 | 874 | if !exists('g:indentLine_color_term') 875 | let g:indentLine_color_term = s:gb.bg2[1] 876 | endif 877 | if !exists('g:indentLine_color_gui') 878 | let g:indentLine_color_gui = s:gb.bg2[0] 879 | endif 880 | 881 | " }}} 882 | " Rainbow Parentheses: {{{ 883 | 884 | if !exists('g:rbpt_colorpairs') 885 | let g:rbpt_colorpairs = 886 | \ [ 887 | \ ['blue', '#458588'], ['magenta', '#b16286'], 888 | \ ['red', '#cc241d'], ['166', '#d65d0e'] 889 | \ ] 890 | endif 891 | 892 | let g:rainbow_guifgs = [ '#d65d0e', '#cc241d', '#b16286', '#458588' ] 893 | let g:rainbow_ctermfgs = [ '166', 'red', 'magenta', 'blue' ] 894 | 895 | if !exists('g:rainbow_conf') 896 | let g:rainbow_conf = {} 897 | endif 898 | if !has_key(g:rainbow_conf, 'guifgs') 899 | let g:rainbow_conf['guifgs'] = g:rainbow_guifgs 900 | endif 901 | if !has_key(g:rainbow_conf, 'ctermfgs') 902 | let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs 903 | endif 904 | 905 | let g:niji_dark_colours = g:rbpt_colorpairs 906 | let g:niji_light_colours = g:rbpt_colorpairs 907 | 908 | "}}} 909 | " GitGutter: {{{ 910 | 911 | hi! link GitGutterAdd GruvboxGreenSign 912 | hi! link GitGutterChange GruvboxAquaSign 913 | hi! link GitGutterDelete GruvboxRedSign 914 | hi! link GitGutterChangeDelete GruvboxAquaSign 915 | 916 | " }}} 917 | " GitCommit: "{{{ 918 | 919 | hi! link gitcommitSelectedFile GruvboxGreen 920 | hi! link gitcommitDiscardedFile GruvboxRed 921 | 922 | " }}} 923 | " Signify: {{{ 924 | 925 | hi! link SignifySignAdd GruvboxGreenSign 926 | hi! link SignifySignChange GruvboxAquaSign 927 | hi! link SignifySignDelete GruvboxRedSign 928 | 929 | " }}} 930 | " gitsigns.nvim {{{ 931 | hi! link GitSignsAdd GruvboxGreenSign 932 | hi! link GitSignsChange GruvboxAquaSign 933 | hi! link GitSignsDelete GruvboxRedSign 934 | " }}} 935 | " Syntastic: {{{ 936 | 937 | hi! link SyntasticError GruvboxRedUnderline 938 | hi! link SyntasticWarning GruvboxYellowUnderline 939 | 940 | hi! link SyntasticErrorSign GruvboxRedSign 941 | hi! link SyntasticWarningSign GruvboxYellowSign 942 | 943 | " }}} 944 | " Termdebug: {{{ 945 | 946 | call s:HL('debugPC', s:none, s:gb.faded_blue) 947 | hi! link debugBreakpoint GruvboxRedSign 948 | 949 | " }}} 950 | 951 | " Signature: {{{ 952 | hi! link SignatureMarkText GruvboxBlueSign 953 | hi! link SignatureMarkerText GruvboxPurpleSign 954 | 955 | " }}} 956 | " ShowMarks: {{{ 957 | 958 | hi! link ShowMarksHLl GruvboxBlueSign 959 | hi! link ShowMarksHLu GruvboxBlueSign 960 | hi! link ShowMarksHLo GruvboxBlueSign 961 | hi! link ShowMarksHLm GruvboxBlueSign 962 | 963 | " }}} 964 | " CtrlP: {{{ 965 | 966 | hi! link CtrlPMatch GruvboxYellow 967 | hi! link CtrlPNoEntries GruvboxRed 968 | hi! link CtrlPPrtBase GruvboxBg2 969 | hi! link CtrlPPrtCursor GruvboxBlue 970 | hi! link CtrlPLinePre GruvboxBg2 971 | 972 | call s:HL('CtrlPMode1', s:gb.blue, s:gb.bg2, s:bold) 973 | call s:HL('CtrlPMode2', s:gb.bg0, s:gb.blue, s:bold) 974 | call s:HL('CtrlPStats', s:gb.fg4, s:gb.bg2, s:bold) 975 | 976 | " }}} 977 | " FZF: {{{ 978 | 979 | let g:fzf_colors = { 980 | \ 'fg': ['fg', 'GruvboxFg1'], 981 | \ 'bg': ['fg', 'GruvboxBg0'], 982 | \ 'hl': ['fg', 'GruvboxYellow'], 983 | \ 'fg+': ['fg', 'GruvboxFg1'], 984 | \ 'bg+': ['fg', 'GruvboxBg1'], 985 | \ 'hl+': ['fg', 'GruvboxYellow'], 986 | \ 'info': ['fg', 'GruvboxBlue'], 987 | \ 'prompt': ['fg', 'GruvboxFg4'], 988 | \ 'pointer': ['fg', 'GruvboxBlue'], 989 | \ 'marker': ['fg', 'GruvboxOrange'], 990 | \ 'spinner': ['fg', 'GruvboxYellow'], 991 | \ 'header': ['fg', 'GruvboxBg3'] 992 | \ } 993 | 994 | call s:HL('Fzf1', s:gb.blue, s:gb.bg1) 995 | call s:HL('Fzf2', s:gb.orange, s:gb.bg1) 996 | call s:HL('Fzf3', s:gb.fg4, s:gb.bg1) 997 | 998 | " }}} 999 | " Startify: {{{ 1000 | 1001 | hi! link StartifyBracket GruvboxFg3 1002 | hi! link StartifyFile GruvboxFg1 1003 | hi! link StartifyNumber GruvboxBlue 1004 | hi! link StartifyPath GruvboxGray 1005 | hi! link StartifySlash GruvboxGray 1006 | hi! link StartifySection GruvboxYellow 1007 | hi! link StartifySpecial GruvboxBg2 1008 | hi! link StartifyHeader GruvboxOrange 1009 | hi! link StartifyFooter GruvboxBg2 1010 | 1011 | " }}} 1012 | " Vimshell: {{{ 1013 | 1014 | let g:vimshell_escape_colors = [ 1015 | \ s:gb.bg4[0], s:gb.red[0], s:gb.green[0], s:gb.yellow[0], 1016 | \ s:gb.blue[0], s:gb.purple[0], s:gb.aqua[0], s:gb.fg4[0], 1017 | \ s:gb.bg0[0], s:gb.red[0], s:gb.green[0], s:gb.orange[0], 1018 | \ s:gb.blue[0], s:gb.purple[0], s:gb.aqua[0], s:gb.fg0[0] 1019 | \ ] 1020 | 1021 | " }}} 1022 | " BufTabLine: {{{ 1023 | 1024 | call s:HL('BufTabLineCurrent', s:gb.bg0, s:gb.fg4) 1025 | call s:HL('BufTabLineActive', s:gb.fg4, s:gb.bg2) 1026 | call s:HL('BufTabLineHidden', s:gb.bg4, s:gb.bg1) 1027 | call s:HL('BufTabLineFill', s:gb.bg0, s:gb.bg0) 1028 | 1029 | " }}} 1030 | " Asynchronous Lint Engine: {{{ 1031 | 1032 | hi! link ALEError GruvboxRedUnderline 1033 | hi! link ALEWarning GruvboxYellowUnderline 1034 | hi! link ALEInfo GruvboxBlueUnderline 1035 | 1036 | hi! link ALEErrorSign GruvboxRedSign 1037 | hi! link ALEWarningSign GruvboxYellowSign 1038 | hi! link ALEInfoSign GruvboxBlueSign 1039 | 1040 | hi! link ALEVirtualTextError GruvboxRed 1041 | hi! link ALEVirtualTextWarning GruvboxYellow 1042 | hi! link ALEVirtualTextInfo GruvboxBlue 1043 | 1044 | " }}} 1045 | " Dirvish: {{{ 1046 | 1047 | hi! link DirvishPathTail GruvboxAqua 1048 | hi! link DirvishArg GruvboxYellow 1049 | 1050 | " }}} 1051 | " Netrw: {{{ 1052 | 1053 | hi! link netrwDir GruvboxAqua 1054 | hi! link netrwClassify GruvboxAqua 1055 | hi! link netrwLink GruvboxGray 1056 | hi! link netrwSymLink GruvboxFg1 1057 | hi! link netrwExe GruvboxYellow 1058 | hi! link netrwComment GruvboxGray 1059 | hi! link netrwList GruvboxBlue 1060 | hi! link netrwHelpCmd GruvboxAqua 1061 | hi! link netrwCmdSep GruvboxFg3 1062 | hi! link netrwVersion GruvboxGreen 1063 | 1064 | " }}} 1065 | " NERDTree: {{{ 1066 | 1067 | hi! link NERDTreeDir GruvboxAqua 1068 | hi! link NERDTreeDirSlash GruvboxAqua 1069 | 1070 | hi! link NERDTreeOpenable GruvboxOrange 1071 | hi! link NERDTreeClosable GruvboxOrange 1072 | 1073 | hi! link NERDTreeFile GruvboxFg1 1074 | hi! link NERDTreeExecFile GruvboxYellow 1075 | 1076 | hi! link NERDTreeUp GruvboxGray 1077 | hi! link NERDTreeCWD GruvboxGreen 1078 | hi! link NERDTreeHelp GruvboxFg1 1079 | 1080 | hi! link NERDTreeToggleOn GruvboxGreen 1081 | hi! link NERDTreeToggleOff GruvboxRed 1082 | 1083 | " }}} 1084 | " Vim Multiple Cursors: {{{ 1085 | 1086 | call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse) 1087 | call s:HL('multiple_cursors_visual', s:none, s:gb.bg2) 1088 | 1089 | " }}} 1090 | " coc.nvim: {{{ 1091 | 1092 | hi! link CocErrorSign GruvboxRedSign 1093 | hi! link CocWarningSign GruvboxOrangeSign 1094 | hi! link CocInfoSign GruvboxBlueSign 1095 | hi! link CocHintSign GruvboxAquaSign 1096 | hi! link CocErrorFloat GruvboxRed 1097 | hi! link CocWarningFloat GruvboxOrange 1098 | hi! link CocInfoFloat GruvboxBlue 1099 | hi! link CocHintFloat GruvboxAqua 1100 | hi! link CocDiagnosticsError GruvboxRed 1101 | hi! link CocDiagnosticsWarning GruvboxOrange 1102 | hi! link CocDiagnosticsInfo GruvboxBlue 1103 | hi! link CocDiagnosticsHint GruvboxAqua 1104 | 1105 | hi! link CocSelectedText GruvboxRed 1106 | hi! link CocCodeLens GruvboxGray 1107 | 1108 | hi! link CocErrorHighlight GruvboxRedUnderline 1109 | hi! link CocWarningHighlight GruvboxOrangeUnderline 1110 | hi! link CocInfoHighlight GruvboxBlueUnderline 1111 | hi! link CocHintHighlight GruvboxAquaUnderline 1112 | 1113 | " }}} 1114 | " Telescope.nvim: {{{ 1115 | hi! link TelescopeNormal GruvboxFg1 1116 | hi! link TelescopeSelection GruvboxOrangeBold 1117 | hi! link TelescopeSelectionCaret GruvboxRed 1118 | hi! link TelescopeMultiSelection GruvboxGray 1119 | hi! link TelescopeBorder TelescopeNormal 1120 | hi! link TelescopePromptBorder TelescopeNormal 1121 | hi! link TelescopeResultsBorder TelescopeNormal 1122 | hi! link TelescopePreviewBorder TelescopeNormal 1123 | hi! link TelescopeMatching GruvboxBlue 1124 | hi! link TelescopePromptPrefix GruvboxRed 1125 | hi! link TelescopePrompt TelescopeNormal 1126 | 1127 | " }}} 1128 | " nvim-cmp: {{{ 1129 | hi! link CmpItemAbbr GruvboxFg0 1130 | hi! link CmpItemAbbrDeprecated GruvboxFg1 1131 | hi! link CmpItemAbbrMatch GruvboxBlueBold 1132 | hi! link CmpItemAbbrMatchFuzzy GruvboxBlueUnderline 1133 | hi! link CmpItemMenu GruvboxGray 1134 | hi! link CmpItemKindText GruvboxOrange 1135 | hi! link CmpItemKindMethod GruvboxBlue 1136 | hi! link CmpItemKindFunction GruvboxBlue 1137 | hi! link CmpItemKindConstructor GruvboxYellow 1138 | hi! link CmpItemKindField GruvboxBlue 1139 | hi! link CmpItemKindClass GruvboxYellow 1140 | hi! link CmpItemKindInterface GruvboxYellow 1141 | hi! link CmpItemKindModule GruvboxBlue 1142 | hi! link CmpItemKindProperty GruvboxBlue 1143 | hi! link CmpItemKindValue GruvboxOrange 1144 | hi! link CmpItemKindEnum GruvboxYellow 1145 | hi! link CmpItemKindKeyword GruvboxPurple 1146 | hi! link CmpItemKindSnippet GruvboxGreen 1147 | hi! link CmpItemKindFile GruvboxBlue 1148 | hi! link CmpItemKindEnumMember GruvBoxAqua 1149 | hi! link CmpItemKindConstant GruvboxOrange 1150 | hi! link CmpItemKindStruct GruvboxYellow 1151 | hi! link CmpItemKindTypeParameter GruvboxYellow 1152 | "}}} 1153 | 1154 | " Filetype specific ----------------------------------------------------------- 1155 | " Diff: {{{ 1156 | 1157 | hi! link diffAdded GruvboxGreen 1158 | hi! link diffRemoved GruvboxRed 1159 | hi! link diffChanged GruvboxAqua 1160 | 1161 | hi! link diffFile GruvboxOrange 1162 | hi! link diffNewFile GruvboxYellow 1163 | 1164 | hi! link diffLine GruvboxBlue 1165 | 1166 | " }}} 1167 | " Html: {{{ 1168 | 1169 | hi! link htmlTag GruvboxAquaBold 1170 | hi! link htmlEndTag GruvboxAquaBold 1171 | 1172 | hi! link htmlTagName GruvboxBlue 1173 | hi! link htmlArg GruvboxOrange 1174 | 1175 | hi! link htmlTagN GruvboxFg1 1176 | hi! link htmlSpecialTagName GruvboxBlue 1177 | 1178 | call s:HL('htmlLink', s:gb.fg4, s:none, s:underline) 1179 | 1180 | hi! link htmlSpecialChar GruvboxRed 1181 | 1182 | call s:HL('htmlBold', s:vim_fg, s:vim_bg, s:bold) 1183 | call s:HL('htmlBoldUnderline', s:vim_fg, s:vim_bg, s:bold . s:underline) 1184 | call s:HL('htmlBoldItalic', s:vim_fg, s:vim_bg, s:bold . s:italic) 1185 | call s:HL('htmlBoldUnderlineItalic', s:vim_fg, s:vim_bg, s:bold . s:underline . s:italic) 1186 | 1187 | call s:HL('htmlUnderline', s:vim_fg, s:vim_bg, s:underline) 1188 | call s:HL('htmlUnderlineItalic', s:vim_fg, s:vim_bg, s:underline . s:italic) 1189 | call s:HL('htmlItalic', s:vim_fg, s:vim_bg, s:italic) 1190 | 1191 | " }}} 1192 | " Xml: {{{ 1193 | 1194 | hi! link xmlTag GruvboxAquaBold 1195 | hi! link xmlEndTag GruvboxAquaBold 1196 | hi! link xmlTagName GruvboxBlue 1197 | hi! link xmlEqual GruvboxBlue 1198 | hi! link docbkKeyword GruvboxAquaBold 1199 | 1200 | hi! link xmlDocTypeDecl GruvboxGray 1201 | hi! link xmlDocTypeKeyword GruvboxPurple 1202 | hi! link xmlCdataStart GruvboxGray 1203 | hi! link xmlCdataCdata GruvboxPurple 1204 | hi! link dtdFunction GruvboxGray 1205 | hi! link dtdTagName GruvboxPurple 1206 | 1207 | hi! link xmlAttrib GruvboxOrange 1208 | hi! link xmlProcessingDelim GruvboxGray 1209 | hi! link dtdParamEntityPunct GruvboxGray 1210 | hi! link dtdParamEntityDPunct GruvboxGray 1211 | hi! link xmlAttribPunct GruvboxGray 1212 | 1213 | hi! link xmlEntity GruvboxRed 1214 | hi! link xmlEntityPunct GruvboxRed 1215 | " }}} 1216 | " Vim: {{{ 1217 | 1218 | call s:HL('vimCommentTitle', s:gb.fg4_256, s:none, s:bold . s:italicize_comments) 1219 | 1220 | hi! link vimNotation GruvboxOrange 1221 | hi! link vimBracket GruvboxOrange 1222 | hi! link vimMapModKey GruvboxOrange 1223 | hi! link vimFuncSID GruvboxFg3 1224 | hi! link vimSetSep GruvboxFg3 1225 | hi! link vimSep GruvboxFg3 1226 | hi! link vimContinue GruvboxFg3 1227 | 1228 | " }}} 1229 | " Clojure: {{{ 1230 | 1231 | hi! link clojureKeyword GruvboxBlue 1232 | hi! link clojureCond GruvboxOrange 1233 | hi! link clojureSpecial GruvboxOrange 1234 | hi! link clojureDefine GruvboxOrange 1235 | 1236 | hi! link clojureFunc GruvboxYellow 1237 | hi! link clojureRepeat GruvboxYellow 1238 | hi! link clojureCharacter GruvboxAqua 1239 | hi! link clojureStringEscape GruvboxAqua 1240 | hi! link clojureException GruvboxRed 1241 | 1242 | hi! link clojureRegexp GruvboxAqua 1243 | hi! link clojureRegexpEscape GruvboxAqua 1244 | call s:HL('clojureRegexpCharClass', s:gb.fg3, s:none, s:bold) 1245 | hi! link clojureRegexpMod clojureRegexpCharClass 1246 | hi! link clojureRegexpQuantifier clojureRegexpCharClass 1247 | 1248 | hi! link clojureParen GruvboxFg3 1249 | hi! link clojureAnonArg GruvboxYellow 1250 | hi! link clojureVariable GruvboxBlue 1251 | hi! link clojureMacro GruvboxOrange 1252 | 1253 | hi! link clojureMeta GruvboxYellow 1254 | hi! link clojureDeref GruvboxYellow 1255 | hi! link clojureQuote GruvboxYellow 1256 | hi! link clojureUnquote GruvboxYellow 1257 | 1258 | " }}} 1259 | " C: {{{ 1260 | 1261 | hi! link cOperator GruvboxPurple 1262 | hi! link cppOperator GruvboxPurple 1263 | hi! link cStructure GruvboxOrange 1264 | 1265 | " }}} 1266 | " Python: {{{ 1267 | 1268 | hi! link pythonBuiltin GruvboxOrange 1269 | hi! link pythonBuiltinObj GruvboxOrange 1270 | hi! link pythonBuiltinFunc GruvboxOrange 1271 | hi! link pythonFunction GruvboxAqua 1272 | hi! link pythonDecorator GruvboxRed 1273 | hi! link pythonInclude GruvboxBlue 1274 | hi! link pythonImport GruvboxBlue 1275 | hi! link pythonRun GruvboxBlue 1276 | hi! link pythonCoding GruvboxBlue 1277 | hi! link pythonOperator GruvboxRed 1278 | hi! link pythonException GruvboxRed 1279 | hi! link pythonExceptions GruvboxPurple 1280 | hi! link pythonBoolean GruvboxPurple 1281 | hi! link pythonDot GruvboxFg3 1282 | hi! link pythonConditional GruvboxRed 1283 | hi! link pythonRepeat GruvboxRed 1284 | hi! link pythonDottedName GruvboxGreenBold 1285 | 1286 | " }}} 1287 | " CSS: {{{ 1288 | 1289 | hi! link cssBraces GruvboxBlue 1290 | hi! link cssFunctionName GruvboxYellow 1291 | hi! link cssIdentifier GruvboxOrange 1292 | hi! link cssClassName GruvboxGreen 1293 | hi! link cssColor GruvboxBlue 1294 | hi! link cssSelectorOp GruvboxBlue 1295 | hi! link cssSelectorOp2 GruvboxBlue 1296 | hi! link cssImportant GruvboxGreen 1297 | hi! link cssVendor GruvboxFg1 1298 | 1299 | hi! link cssTextProp GruvboxAqua 1300 | hi! link cssAnimationProp GruvboxAqua 1301 | hi! link cssUIProp GruvboxYellow 1302 | hi! link cssTransformProp GruvboxAqua 1303 | hi! link cssTransitionProp GruvboxAqua 1304 | hi! link cssPrintProp GruvboxAqua 1305 | hi! link cssPositioningProp GruvboxYellow 1306 | hi! link cssBoxProp GruvboxAqua 1307 | hi! link cssFontDescriptorProp GruvboxAqua 1308 | hi! link cssFlexibleBoxProp GruvboxAqua 1309 | hi! link cssBorderOutlineProp GruvboxAqua 1310 | hi! link cssBackgroundProp GruvboxAqua 1311 | hi! link cssMarginProp GruvboxAqua 1312 | hi! link cssListProp GruvboxAqua 1313 | hi! link cssTableProp GruvboxAqua 1314 | hi! link cssFontProp GruvboxAqua 1315 | hi! link cssPaddingProp GruvboxAqua 1316 | hi! link cssDimensionProp GruvboxAqua 1317 | hi! link cssRenderProp GruvboxAqua 1318 | hi! link cssColorProp GruvboxAqua 1319 | hi! link cssGeneratedContentProp GruvboxAqua 1320 | 1321 | " }}} 1322 | " JavaScript: {{{ 1323 | 1324 | hi! link javaScriptBraces GruvboxFg1 1325 | hi! link javaScriptFunction GruvboxAqua 1326 | hi! link javaScriptIdentifier GruvboxRed 1327 | hi! link javaScriptMember GruvboxBlue 1328 | hi! link javaScriptNumber GruvboxPurple 1329 | hi! link javaScriptNull GruvboxPurple 1330 | hi! link javaScriptParens GruvboxFg3 1331 | 1332 | " }}} 1333 | " YAJS: {{{ 1334 | 1335 | hi! link javascriptImport GruvboxAqua 1336 | hi! link javascriptExport GruvboxAqua 1337 | hi! link javascriptClassKeyword GruvboxAqua 1338 | hi! link javascriptClassExtends GruvboxAqua 1339 | hi! link javascriptDefault GruvboxAqua 1340 | 1341 | hi! link javascriptClassName GruvboxYellow 1342 | hi! link javascriptClassSuperName GruvboxYellow 1343 | hi! link javascriptGlobal GruvboxYellow 1344 | 1345 | hi! link javascriptEndColons GruvboxFg1 1346 | hi! link javascriptFuncArg GruvboxFg1 1347 | hi! link javascriptGlobalMethod GruvboxFg1 1348 | hi! link javascriptNodeGlobal GruvboxFg1 1349 | hi! link javascriptBOMWindowProp GruvboxFg1 1350 | hi! link javascriptArrayMethod GruvboxFg1 1351 | hi! link javascriptArrayStaticMethod GruvboxFg1 1352 | hi! link javascriptCacheMethod GruvboxFg1 1353 | hi! link javascriptDateMethod GruvboxFg1 1354 | hi! link javascriptMathStaticMethod GruvboxFg1 1355 | 1356 | " hi! link javascriptProp GruvboxFg1 1357 | hi! link javascriptURLUtilsProp GruvboxFg1 1358 | hi! link javascriptBOMNavigatorProp GruvboxFg1 1359 | hi! link javascriptDOMDocMethod GruvboxFg1 1360 | hi! link javascriptDOMDocProp GruvboxFg1 1361 | hi! link javascriptBOMLocationMethod GruvboxFg1 1362 | hi! link javascriptBOMWindowMethod GruvboxFg1 1363 | hi! link javascriptStringMethod GruvboxFg1 1364 | 1365 | hi! link javascriptVariable GruvboxOrange 1366 | " hi! link javascriptVariable GruvboxRed 1367 | " hi! link javascriptIdentifier GruvboxOrange 1368 | " hi! link javascriptClassSuper GruvboxOrange 1369 | hi! link javascriptIdentifier GruvboxOrange 1370 | hi! link javascriptClassSuper GruvboxOrange 1371 | 1372 | " hi! link javascriptFuncKeyword GruvboxOrange 1373 | " hi! link javascriptAsyncFunc GruvboxOrange 1374 | hi! link javascriptFuncKeyword GruvboxAqua 1375 | hi! link javascriptAsyncFunc GruvboxAqua 1376 | hi! link javascriptClassStatic GruvboxOrange 1377 | 1378 | hi! link javascriptOperator GruvboxRed 1379 | hi! link javascriptForOperator GruvboxRed 1380 | hi! link javascriptYield GruvboxRed 1381 | hi! link javascriptExceptions GruvboxRed 1382 | hi! link javascriptMessage GruvboxRed 1383 | 1384 | hi! link javascriptTemplateSB GruvboxAqua 1385 | hi! link javascriptTemplateSubstitution GruvboxFg1 1386 | 1387 | " hi! link javascriptLabel GruvboxBlue 1388 | " hi! link javascriptObjectLabel GruvboxBlue 1389 | " hi! link javascriptPropertyName GruvboxBlue 1390 | hi! link javascriptLabel GruvboxFg1 1391 | hi! link javascriptObjectLabel GruvboxFg1 1392 | hi! link javascriptPropertyName GruvboxFg1 1393 | 1394 | hi! link javascriptLogicSymbols GruvboxFg1 1395 | hi! link javascriptArrowFunc GruvboxYellow 1396 | 1397 | hi! link javascriptDocParamName GruvboxFg4 1398 | hi! link javascriptDocTags GruvboxFg4 1399 | hi! link javascriptDocNotation GruvboxFg4 1400 | hi! link javascriptDocParamType GruvboxFg4 1401 | hi! link javascriptDocNamedParamType GruvboxFg4 1402 | 1403 | hi! link javascriptBrackets GruvboxFg1 1404 | hi! link javascriptDOMElemAttrs GruvboxFg1 1405 | hi! link javascriptDOMEventMethod GruvboxFg1 1406 | hi! link javascriptDOMNodeMethod GruvboxFg1 1407 | hi! link javascriptDOMStorageMethod GruvboxFg1 1408 | hi! link javascriptHeadersMethod GruvboxFg1 1409 | 1410 | hi! link javascriptAsyncFuncKeyword GruvboxRed 1411 | hi! link javascriptAwaitFuncKeyword GruvboxRed 1412 | 1413 | " }}} 1414 | " PanglossJS: {{{ 1415 | 1416 | hi! link jsClassKeyword GruvboxAqua 1417 | hi! link jsExtendsKeyword GruvboxAqua 1418 | hi! link jsExportDefault GruvboxAqua 1419 | hi! link jsTemplateBraces GruvboxAqua 1420 | hi! link jsGlobalNodeObjects GruvboxBlue 1421 | hi! link jsGlobalObjects GruvboxBlue 1422 | hi! link jsObjectKey GruvboxGreenBold 1423 | hi! link jsFunction GruvboxAqua 1424 | hi! link jsFuncCall GruvboxBlue 1425 | hi! link jsFuncParens GruvboxFg3 1426 | hi! link jsParens GruvboxFg3 1427 | hi! link jsNull GruvboxPurple 1428 | hi! link jsUndefined GruvboxPurple 1429 | hi! link jsClassDefinition GruvboxYellow 1430 | hi! link jsOperatorKeyword GruvboxRed 1431 | 1432 | " }}} 1433 | " TypeScript: {{{ 1434 | 1435 | hi! link typescriptReserved GruvboxAqua 1436 | hi! link typescriptLabel GruvboxAqua 1437 | hi! link typescriptFuncKeyword GruvboxAqua 1438 | hi! link typescriptIdentifier GruvboxOrange 1439 | hi! link typescriptBraces GruvboxFg1 1440 | hi! link typescriptEndColons GruvboxFg1 1441 | hi! link typescriptDOMObjects GruvboxFg1 1442 | hi! link typescriptAjaxMethods GruvboxFg1 1443 | hi! link typescriptLogicSymbols GruvboxFg1 1444 | hi! link typescriptDocSeeTag Comment 1445 | hi! link typescriptDocParam Comment 1446 | hi! link typescriptDocTags vimCommentTitle 1447 | hi! link typescriptGlobalObjects GruvboxFg1 1448 | hi! link typescriptParens GruvboxFg3 1449 | hi! link typescriptOpSymbols GruvboxFg3 1450 | hi! link typescriptHtmlElemProperties GruvboxFg1 1451 | hi! link typescriptNull GruvboxPurple 1452 | hi! link typescriptInterpolationDelimiter GruvboxAqua 1453 | 1454 | " }}} 1455 | " JSX: maxmellon/vim-jsx-pretty: {{{ 1456 | 1457 | hi! link jsxTagName GruvboxAqua 1458 | hi! link jsxComponentName GruvboxGreen 1459 | hi! link jsxCloseString GruvboxFg4 1460 | hi! link jsxAttrib GruvboxYellow 1461 | hi! link jsxEqual GruvboxAqua 1462 | 1463 | "}}} 1464 | " PureScript: {{{ 1465 | 1466 | hi! link purescriptModuleKeyword GruvboxAqua 1467 | hi! link purescriptModuleName GruvboxFg1 1468 | hi! link purescriptWhere GruvboxAqua 1469 | hi! link purescriptDelimiter GruvboxFg4 1470 | hi! link purescriptType GruvboxFg1 1471 | hi! link purescriptImportKeyword GruvboxAqua 1472 | hi! link purescriptHidingKeyword GruvboxAqua 1473 | hi! link purescriptAsKeyword GruvboxAqua 1474 | hi! link purescriptStructure GruvboxAqua 1475 | hi! link purescriptOperator GruvboxBlue 1476 | 1477 | hi! link purescriptTypeVar GruvboxFg1 1478 | hi! link purescriptConstructor GruvboxFg1 1479 | hi! link purescriptFunction GruvboxFg1 1480 | hi! link purescriptConditional GruvboxOrange 1481 | hi! link purescriptBacktick GruvboxOrange 1482 | 1483 | " }}} 1484 | " CoffeeScript: {{{ 1485 | 1486 | hi! link coffeeExtendedOp GruvboxFg3 1487 | hi! link coffeeSpecialOp GruvboxFg3 1488 | hi! link coffeeCurly GruvboxOrange 1489 | hi! link coffeeParen GruvboxFg3 1490 | hi! link coffeeBracket GruvboxOrange 1491 | 1492 | " }}} 1493 | " Ruby: {{{ 1494 | 1495 | hi! link rubyStringDelimiter GruvboxGreen 1496 | hi! link rubyInterpolationDelimiter GruvboxAqua 1497 | hi! link rubyDefinedOperator rubyKeyword 1498 | 1499 | " }}} 1500 | " ObjectiveC: {{{ 1501 | 1502 | hi! link objcTypeModifier GruvboxRed 1503 | hi! link objcDirective GruvboxBlue 1504 | 1505 | " }}} 1506 | " Go: {{{ 1507 | 1508 | hi! link goDirective GruvboxAqua 1509 | hi! link goConstants GruvboxPurple 1510 | hi! link goDeclaration GruvboxRed 1511 | hi! link goDeclType GruvboxBlue 1512 | hi! link goBuiltins GruvboxOrange 1513 | 1514 | " }}} 1515 | " Lua: {{{ 1516 | 1517 | hi! link luaIn GruvboxRed 1518 | hi! link luaFunction GruvboxAqua 1519 | hi! link luaTable GruvboxOrange 1520 | 1521 | " }}} 1522 | " MoonScript: {{{ 1523 | 1524 | hi! link moonSpecialOp GruvboxFg3 1525 | hi! link moonExtendedOp GruvboxFg3 1526 | hi! link moonFunction GruvboxFg3 1527 | hi! link moonObject GruvboxYellow 1528 | 1529 | " }}} 1530 | " Java: {{{ 1531 | 1532 | hi! link javaAnnotation GruvboxBlue 1533 | hi! link javaDocTags GruvboxAqua 1534 | hi! link javaCommentTitle vimCommentTitle 1535 | hi! link javaParen GruvboxFg3 1536 | hi! link javaParen1 GruvboxFg3 1537 | hi! link javaParen2 GruvboxFg3 1538 | hi! link javaParen3 GruvboxFg3 1539 | hi! link javaParen4 GruvboxFg3 1540 | hi! link javaParen5 GruvboxFg3 1541 | hi! link javaOperator GruvboxOrange 1542 | 1543 | hi! link javaVarArg GruvboxGreen 1544 | 1545 | " }}} 1546 | " Elixir: {{{ 1547 | 1548 | hi! link elixirDocString Comment 1549 | 1550 | hi! link elixirStringDelimiter GruvboxGreen 1551 | hi! link elixirInterpolationDelimiter GruvboxAqua 1552 | 1553 | hi! link elixirModuleDeclaration GruvboxYellow 1554 | 1555 | " }}} 1556 | " Scala: {{{ 1557 | 1558 | " NB: scala vim syntax file is kinda horrible 1559 | hi! link scalaNameDefinition GruvboxFg1 1560 | hi! link scalaCaseFollowing GruvboxFg1 1561 | hi! link scalaCapitalWord GruvboxFg1 1562 | hi! link scalaTypeExtension GruvboxFg1 1563 | 1564 | hi! link scalaKeyword GruvboxRed 1565 | hi! link scalaKeywordModifier GruvboxRed 1566 | 1567 | hi! link scalaSpecial GruvboxAqua 1568 | hi! link scalaOperator GruvboxFg1 1569 | 1570 | hi! link scalaTypeDeclaration GruvboxYellow 1571 | hi! link scalaTypeTypePostDeclaration GruvboxYellow 1572 | 1573 | hi! link scalaInstanceDeclaration GruvboxFg1 1574 | hi! link scalaInterpolation GruvboxAqua 1575 | 1576 | " }}} 1577 | " Markdown: {{{ 1578 | 1579 | call s:HL('markdownItalic', s:fg3, s:none, s:italic) 1580 | call s:HL('markdownBold', s:fg3, s:none, s:bold) 1581 | call s:HL('markdownBoldItalic', s:fg3, s:none, s:bold . s:italic) 1582 | 1583 | hi! link markdownH1 GruvboxGreenBold 1584 | hi! link markdownH2 GruvboxGreenBold 1585 | hi! link markdownH3 GruvboxYellowBold 1586 | hi! link markdownH4 GruvboxYellowBold 1587 | hi! link markdownH5 GruvboxYellow 1588 | hi! link markdownH6 GruvboxYellow 1589 | 1590 | hi! link markdownCode GruvboxAqua 1591 | hi! link markdownCodeBlock GruvboxAqua 1592 | hi! link markdownCodeDelimiter GruvboxAqua 1593 | 1594 | hi! link markdownBlockquote GruvboxGray 1595 | hi! link markdownListMarker GruvboxGray 1596 | hi! link markdownOrderedListMarker GruvboxGray 1597 | hi! link markdownRule GruvboxGray 1598 | hi! link markdownHeadingRule GruvboxGray 1599 | 1600 | hi! link markdownUrlDelimiter GruvboxFg3 1601 | hi! link markdownLinkDelimiter GruvboxFg3 1602 | hi! link markdownLinkTextDelimiter GruvboxFg3 1603 | 1604 | hi! link markdownHeadingDelimiter GruvboxOrange 1605 | hi! link markdownUrl GruvboxPurple 1606 | hi! link markdownUrlTitleDelimiter GruvboxGreen 1607 | 1608 | call s:HL('markdownLinkText', s:gray, s:none, s:underline) 1609 | hi! link markdownIdDeclaration markdownLinkText 1610 | 1611 | " }}} 1612 | " Haskell: {{{ 1613 | 1614 | hi! link haskellType GruvboxBlue 1615 | hi! link haskellIdentifier GruvboxAqua 1616 | hi! link haskellSeparator GruvboxFg4 1617 | hi! link haskellDelimiter GruvboxOrange 1618 | hi! link haskellOperators GruvboxPurple 1619 | 1620 | hi! link haskellBacktick GruvboxOrange 1621 | hi! link haskellStatement GruvboxPurple 1622 | hi! link haskellConditional GruvboxPurple 1623 | 1624 | hi! link haskellLet GruvboxRed 1625 | hi! link haskellDefault GruvboxRed 1626 | hi! link haskellWhere GruvboxRed 1627 | hi! link haskellBottom GruvboxRedBold 1628 | hi! link haskellImportKeywords GruvboxPurpleBold 1629 | hi! link haskellDeclKeyword GruvboxOrange 1630 | hi! link haskellDecl GruvboxOrange 1631 | hi! link haskellDeriving GruvboxPurple 1632 | hi! link haskellAssocType GruvboxAqua 1633 | 1634 | hi! link haskellNumber GruvboxAqua 1635 | hi! link haskellPragma GruvboxRedBold 1636 | 1637 | hi! link haskellTH GruvboxAquaBold 1638 | hi! link haskellForeignKeywords GruvboxGreen 1639 | hi! link haskellKeyword GruvboxRed 1640 | hi! link haskellFloat GruvboxAqua 1641 | hi! link haskellInfix GruvboxPurple 1642 | hi! link haskellQuote GruvboxGreenBold 1643 | hi! link haskellShebang GruvboxYellowBold 1644 | hi! link haskellLiquid GruvboxPurpleBold 1645 | hi! link haskellQuasiQuoted GruvboxBlueBold 1646 | hi! link haskellRecursiveDo GruvboxPurple 1647 | hi! link haskellQuotedType GruvboxRed 1648 | hi! link haskellPreProc GruvboxFg4 1649 | hi! link haskellTypeRoles GruvboxRedBold 1650 | hi! link haskellTypeForall GruvboxRed 1651 | hi! link haskellPatternKeyword GruvboxBlue 1652 | 1653 | " }}} 1654 | " Json: {{{ 1655 | 1656 | hi! link jsonKeyword GruvboxGreen 1657 | hi! link jsonQuote GruvboxGreen 1658 | hi! link jsonBraces GruvboxFg1 1659 | hi! link jsonString GruvboxFg1 1660 | 1661 | " }}} 1662 | " Mail: {{{ 1663 | 1664 | " Override some defaults defined by mail.vim 1665 | " mail quoted text 1666 | hi! link mailQuoted1 GruvBoxAqua 1667 | hi! link mailQuoted2 GruvBoxPurple 1668 | hi! link mailQuoted3 GruvBoxYellow 1669 | hi! link mailQuoted4 GruvBoxGreen 1670 | hi! link mailQuoted5 GruvBoxRed 1671 | hi! link mailQuoted6 GruvBoxOrange 1672 | 1673 | hi! link mailSignature Comment 1674 | 1675 | " }}} 1676 | " C#: {{{ 1677 | 1678 | hi! link csBraces GruvboxFg1 1679 | hi! link csEndColon GruvboxFg1 1680 | hi! link csLogicSymbols GruvboxFg1 1681 | hi! link csParens GruvboxFg3 1682 | hi! link csOpSymbols GruvboxFg3 1683 | hi! link csInterpolationDelimiter GruvboxFg3 1684 | hi! link csInterpolationAlignDel GruvboxAquaBold 1685 | hi! link csInterpolationFormat GruvboxAqua 1686 | hi! link csInterpolationFormatDel GruvboxAquaBold 1687 | 1688 | " }}} 1689 | " Rust: {{{ 1690 | 1691 | hi! link rustSigil GruvboxOrange 1692 | hi! link rustEscape GruvboxAqua 1693 | hi! link rustStringContinuation GruvboxAqua 1694 | hi! link rustEnum GruvboxAqua 1695 | hi! link rustStructure GruvboxAqua 1696 | hi! link rustModPathSep GruvboxFg2 1697 | hi! link rustCommentLineDoc Comment 1698 | hi! link rustDefault GruvboxAqua 1699 | 1700 | " }}} 1701 | " Ocaml: {{{ 1702 | 1703 | hi! link ocamlOperator GruvboxFg1 1704 | hi! link ocamlKeyChar GruvboxOrange 1705 | hi! link ocamlArrow GruvboxOrange 1706 | hi! link ocamlInfixOpKeyword GruvboxRed 1707 | hi! link ocamlConstructor GruvboxOrange 1708 | 1709 | " }}} 1710 | 1711 | 1712 | " Functions ------------------------------------------------------------------- 1713 | " Search Highlighting Cursor {{{ 1714 | 1715 | function! GruvboxHlsShowCursor() 1716 | call s:HL('Cursor', s:bg0, s:hls_cursor) 1717 | endfunction 1718 | 1719 | function! GruvboxHlsHideCursor() 1720 | call s:HL('Cursor', s:none, s:none, s:inverse) 1721 | endfunction 1722 | 1723 | " }}} 1724 | 1725 | " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: 1726 | -------------------------------------------------------------------------------- /nvim/init.lua: -------------------------------------------------------------------------------- 1 | ---------------------- 2 | -- all settings 3 | ---------------------- 4 | require "settings/keymaps" 5 | require "settings/options" 6 | require "settings/styles" 7 | ---------------------------------- 8 | -- all configurations for plugins 9 | ---------------------------------- 10 | require "plugins" 11 | require "plugins/configs/cmp" 12 | require "plugins/configs/nvim-treesitter" 13 | require "plugins/configs/telescope" 14 | ------------------------------------------- 15 | -- mason --> mason-lspconfig --> lspconfig 16 | -- must be setup in this order 17 | ------------------------------------------- 18 | require "plugins/configs/mason" 19 | require "plugins/configs/mason-lspconfig" 20 | require "plugins/configs/lspconfig" 21 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/cmp.lua: -------------------------------------------------------------------------------- 1 | local present, cmp = pcall(require, "cmp") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | cmp.setup({ 8 | snippet = { 9 | expand = function(args) 10 | require('luasnip').lsp_expand(args.body) -- For `luasnip` users. 11 | end, 12 | }, 13 | window = { 14 | completion = cmp.config.window.bordered(), 15 | documentation = cmp.config.window.bordered(), 16 | }, 17 | mapping = cmp.mapping.preset.insert({ 18 | [''] = cmp.mapping.scroll_docs(-4), 19 | [''] = cmp.mapping.scroll_docs(4), 20 | [''] = cmp.mapping.complete(), 21 | [''] = cmp.mapping.abort(), 22 | [''] = cmp.mapping.confirm({ select = true }), 23 | }), 24 | sources = cmp.config.sources({ 25 | { name = 'nvim_lsp' }, 26 | { name = 'luasnip' }, -- For luasnip users. 27 | }, { 28 | { name = 'buffer' }, 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/lspconfig.lua: -------------------------------------------------------------------------------- 1 | local present, lspconfig = pcall(require, "lspconfig") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | local opts = { noremap=true, silent=true } 8 | vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) 9 | vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) 10 | vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) 11 | vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) 12 | 13 | local on_attach = function(client, bufnr) 14 | -- Enable completion triggered by 15 | vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') 16 | local vim_version = vim.version() 17 | 18 | if vim_version.minor > 7 then 19 | -- nightly 20 | client.server_capabilities.documentFormattingProvider = false 21 | client.server_capabilities.documentRangeFormattingProvider = false 22 | else 23 | -- stable 24 | client.resolved_capabilities.document_formatting = false 25 | client.resolved_capabilities.document_range_formatting = false 26 | end 27 | 28 | -- Mappings. 29 | -- See `:help vim.lsp.*` for documentation on any of the below functions 30 | local bufopts = { noremap=true, silent=true, buffer=bufnr } 31 | vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) 32 | vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) 33 | vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) 34 | vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) 35 | vim.keymap.set('n', '', vim.lsp.buf.signature_help, bufopts) 36 | vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) 37 | vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) 38 | vim.keymap.set('n', 'wl', function() 39 | print(vim.inspect(vim.lsp.buf.list_workspace_folders())) 40 | end, bufopts) 41 | vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) 42 | vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) 43 | vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) 44 | vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) 45 | vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) 46 | end 47 | 48 | local capabilities = vim.lsp.protocol.make_client_capabilities() 49 | 50 | lspconfig.sumneko_lua.setup { 51 | on_attach = on_attach, 52 | capabilities = capabilities, 53 | 54 | settings = { 55 | Lua = { 56 | diagnostics = { 57 | globals = { "vim" }, 58 | }, 59 | }, 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/mason-lspconfig.lua: -------------------------------------------------------------------------------- 1 | local present, masonLspconfig = pcall(require, "mason-lspconfig") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | masonLspconfig.setup({ 8 | automatic_installation = true, 9 | ensure_installed = { "sumneko_lua" } 10 | }) 11 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/mason.lua: -------------------------------------------------------------------------------- 1 | local present, mason = pcall(require, "mason") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | mason.setup({ 8 | ui = { 9 | icons = { 10 | package_installed = "✓", 11 | package_pending = "➜", 12 | package_uninstalled = "✗" 13 | } 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/nvim-treesitter.lua: -------------------------------------------------------------------------------- 1 | local present, treesitter = pcall(require, "nvim-treesitter.configs") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | treesitter.setup { 8 | -- A list of parser names, or "all" 9 | ensure_installed = { "lua" }, 10 | 11 | -- Install parsers synchronously (only applied to `ensure_installed`) 12 | sync_install = false, 13 | 14 | -- Automatically install missing parsers when entering buffer 15 | auto_install = true, 16 | 17 | -- List of parsers to ignore installing (for "all") 18 | ignore_install = { "phpdoc" }, 19 | 20 | highlight = { 21 | -- `false` will disable the whole extension 22 | enable = true, 23 | 24 | -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to 25 | -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is 26 | -- the name of the parser) 27 | -- list of language that will be disabled 28 | disable = { }, 29 | 30 | -- Setting this to true will run `:h syntax` and tree-sitter at the same time. 31 | -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). 32 | -- Using this option may slow down your editor, and you may see some duplicate highlights. 33 | -- Instead of true it can also be a list of languages 34 | additional_vim_regex_highlighting = false, 35 | }, 36 | } 37 | -------------------------------------------------------------------------------- /nvim/lua/plugins/configs/telescope.lua: -------------------------------------------------------------------------------- 1 | local present, telescope = pcall(require, "telescope") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | telescope.setup{ 8 | defaults = { 9 | -- Default configuration for telescope goes here: 10 | -- config_key = value, 11 | mappings = { 12 | i = { 13 | -- map actions.which_key to (default: ) 14 | -- actions.which_key shows the mappings for your picker, 15 | -- e.g. git_{create, delete, ...}_branch for the git_branches picker 16 | } 17 | } 18 | }, 19 | pickers = { 20 | -- Default configuration for builtin pickers goes here: 21 | -- picker_name = { 22 | -- picker_config_key = value, 23 | -- ... 24 | -- } 25 | -- Now the picker_config_key will be applied every time you call this 26 | -- builtin picker 27 | }, 28 | extensions = { 29 | -- Your extension configuration goes here: 30 | -- extension_name = { 31 | -- extension_config_key = value, 32 | -- } 33 | -- please take a look at the readme of the extension you want to configure 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /nvim/lua/plugins/init.lua: -------------------------------------------------------------------------------- 1 | local fn = vim.fn 2 | -- Automatically install packer on initial startup 3 | local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' 4 | if fn.empty(fn.glob(install_path)) > 0 then 5 | Packer_Bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) 6 | print "---------------------------------------------------------" 7 | print "Press Enter to install packer and plugins." 8 | print "After install -- close and reopen Neovim to load configs!" 9 | print "---------------------------------------------------------" 10 | vim.cmd [[packadd packer.nvim]] 11 | end 12 | 13 | -- Use a protected call 14 | local present, packer = pcall(require, "packer") 15 | 16 | if not present then 17 | return 18 | end 19 | 20 | packer.startup(function(use) 21 | use 'wbthomason/packer.nvim' -- Packer manages itself 22 | use 'nvim-lua/plenary.nvim' -- Avoids callbacks, used by other plugins 23 | use 'nvim-lua/popup.nvim' -- Popup for other plugins 24 | use 'nvim-treesitter/nvim-treesitter' -- Language parsing completion engine 25 | use "williamboman/mason.nvim" -- UI for fetching/downloading LSPs 26 | use "williamboman/mason-lspconfig.nvim" -- Bridges mason and lspconfig 27 | use 'neovim/nvim-lspconfig' -- Language server protocol implementation 28 | use 'hrsh7th/nvim-cmp' -- Vim completion engine 29 | use 'L3MON4D3/LuaSnip' -- More snippets 30 | use 'saadparwaiz1/cmp_luasnip' -- Even more snippets 31 | use 'hrsh7th/cmp-nvim-lsp' -- Cmp's own LSP 32 | use 'hrsh7th/cmp-buffer' -- Cmp source for buffer words 33 | use 'hrsh7th/cmp-path' -- Cmp source for path words 34 | use 'nvim-telescope/telescope.nvim' -- Finder, requires fzf and ripgrep 35 | use 'gruvbox-community/gruvbox' -- Schmexy colors 36 | 37 | -- Automatically set up your configuration after cloning packer.nvim 38 | -- Put this at the end after all plugins 39 | if Packer_Bootstrap then 40 | require('packer').sync() 41 | end 42 | end) 43 | 44 | -------------------------------------------------------------------------------- /nvim/lua/settings/keymaps.lua: -------------------------------------------------------------------------------- 1 | local opts = { noremap = true, silent = true } 2 | 3 | -- Shorten keymap nvim call 4 | local keymap = vim.api.nvim_set_keymap 5 | 6 | -- Remap space as leader key 7 | keymap("", "", "", opts) 8 | vim.g.mapleader = " " 9 | vim.g.maplocalleader = " " 10 | 11 | -- Modes: 12 | -- Normal = "n" 13 | -- Insert = "i" 14 | -- Visual = "v" 15 | -- Visual_Block = "x" 16 | -- Terminal = "t" 17 | -- Command = "c" 18 | 19 | keymap("n", "v", ":Vex", opts) 20 | keymap("n", "ff", "Telescope find_files", opts) 21 | keymap("n", "rg", "Telescope live_grep", opts) 22 | 23 | -- try these out in normal mode! 24 | -- make sure you have fzf and ripgrep installed. 25 | -------------------------------------------------------------------------------- /nvim/lua/settings/options.lua: -------------------------------------------------------------------------------- 1 | local g = vim.g 2 | local opt = vim.opt 3 | 4 | -- No Netrw Banner (remove this line if you're into that sort of thing) 5 | g.netrw_banner = 0 6 | -- Colors 7 | opt.termguicolors = true 8 | -- Indenting 9 | opt.expandtab = true 10 | opt.shiftwidth = 2 11 | opt.smartindent = true 12 | -- Line Numbers 13 | opt.number = true 14 | opt.numberwidth = 2 15 | opt.ruler = false 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /nvim/lua/settings/styles.lua: -------------------------------------------------------------------------------- 1 | local colorscheme = "gruvbox" 2 | local status_ok, _ = pcall(vim.api.nvim_command, "colorscheme " .. colorscheme) 3 | if not status_ok then 4 | print("colorscheme " .. colorscheme .. " not found!") 5 | return 6 | end 7 | --------------------------------------------------------------------------------