Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions homes/ngogober/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,12 @@
zsh-powerlevel10k
meslo-lgs-nf
];

file = {
".vimrc".source = ./vim/.vimrc;
".vim/vim_plugins.vim".source = ./vim/vim_plugins.vim;
".vim/common.vim".source = ./vim/common.vim;
".vim/base.vim".source = ./vim/base.vim;
};
};
}
19 changes: 19 additions & 0 deletions homes/ngogober/vim/.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
" do `source ~/superhome/config/vim/.vimrc` in ~/.vimrc
source ~/.vim/common.vim

" ':set' vs 'set'
" https://vi.stackexchange.com/questions/6778/what-is-the-difference-between-set-and-set-commands-with-or-without-a-leading

" `zo` to open a single fold under the cursor
" `zc` to close the fold under the cursor
" `zR` to open all folds
" `zM` to close all folds
" `:help folding` for more info


" Vim-specific Settings -------------------------------------------------------- {{{

source ~/.vim/vim_plugins.vim

" }}}

61 changes: 61 additions & 0 deletions homes/ngogober/vim/base.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
" common to vim (.vimrc) neovim (.config/nvim/init.vim), and VS Code's use of
" neovim

" ':set' vs 'set'
" https://vi.stackexchange.com/questions/6778/what-is-the-difference-between-set-and-set-commands-with-or-without-a-leading

" `zo` to open a single fold under the cursor
" `zc` to close the fold under the cursor
" `zR` to open all folds
" `zM` to close all folds
" `:help folding` for more info

" General Settings -------------------------------------------------------- {{{

" yank to clipboard
if has('clipboard')
set clipboard=unnamed " copy to the system clipboard
endif

" }}}


" Visual Settings -------------------------------------------------------- {{{

" turn off highlight of search terms by default
set nohls

" }}}


" MAPPINGS --------------------------------------------------------------- {{{

" Mappings code goes here.

let g:mapleader = " "
let g:maplocalleader = ","

map \o o<esc>^DA
map \O O<esc>^DA
map \u o<esc>^Do.<esc>k0Dj$xA
map \U O<esc>^DO.<esc>j0Dk$xA
"
" toggle on/off highlight of search terms
map \\ :set hls!<CR>

" change tab settings
map \t :set expandtab!<CR>:set expandtab?<CR>
"
" increase tab size by 2 spaces
map ]T :set softtabstop+=2 tabstop+=2 shiftwidth+=2<CR>
"
" decrease tab size by 2 spaces
map [T :set softtabstop-=2 tabstop-=2 shiftwidth-=2<CR>

" }}}


" VIMSCRIPT -------------------------------------------------------------- {{{

" }}}

156 changes: 156 additions & 0 deletions homes/ngogober/vim/colors/dark-meadow.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
" Name: dark-meadow
" Author: jliu2179
" Maintainer: jliu2179
" License: MIT

highlight clear

if exists('syntax_on')
syntax reset
endif

let g:colors_name = 'dark-meadow'
set background=dark

" Color palette
let s:clear = ['NONE', 'NONE' ]
let s:DeepSkyBlue3 = ['31' , '#0087af']
let s:Purple4 = ['55' , '#5f00af']
let s:Purple3 = ['56' , '#5f00ff']
let s:SteelBlue1 = ['81' , '#5fd7ff']
let s:DarkMagenta = ['90' , '#870087']
let s:SkyBlue1 = ['117' , '#87afff']
let s:DarkViolet = ['128' , '#af00d7']
let s:Magenta2 = ['165' , '#d700ff']
let s:Red1 = ['196' , '#ff0000']
let s:Magenta1 = ['201' , '#ff00ff']
let s:HotPink = ['206' , '#ff5fd7']
let s:MediumOrchid1 = ['207' , '#ff5faf']
let s:Yellow1 = ['226' , '#ffff00']
let s:MistyRose1 = ['224' , '#ffd7ff']
let s:Grey7 = ['233' , '#121212']
let s:Grey42 = ['242' , '#6c6c6c']
let s:Grey54 = ['245' , '#8a8a8a']
let s:Grey66 = ['248' , '#a8a8a8']


" Text style
let s:italic = 'italic'
let s:bold = 'bold'
let s:underline = 'underline'
let s:none = 'NONE'

" Helper function to set up highlight executions
function! s:highlight(group, fg, bg, style)
exec "highlight " . a:group
\ . " ctermfg=" . a:fg[0]
\ . " ctermbg=" . a:bg[0]
\ . " cterm=" . a:style
\ . " guifg=" . a:fg[1]
\ . " guibg=" . a:bg[1]
\ . " gui=" . a:style
endfunction

" Syntax highlighting groups
"
" For reference on what each group does, please refer to this:
" vimdoc.sourceforge.net/htmldoc/syntax.html
"
call s:highlight('Comment', s:DeepSkyBlue3, s:clear, s:italic )
call s:highlight('Constant', s:DarkViolet, s:clear, s:none )
call s:highlight('String', s:DarkMagenta, s:clear, s:none )
call s:highlight('Character', s:MediumOrchid1, s:clear, s:none )
call s:highlight('Number', s:SteelBlue1, s:clear, s:none )
call s:highlight('Boolean', s:Yellow1, s:clear, s:none )
call s:highlight('Float', s:SteelBlue1, s:clear, s:none )
call s:highlight('Identifier', s:MistyRose1, s:clear, s:none )
call s:highlight('Function', s:Purple4, s:clear, s:none )
call s:highlight('Statement', s:MediumOrchid1, s:clear, s:bold )
call s:highlight('Conditional', s:SkyBlue1, s:clear, s:bold )
call s:highlight('Repeat', s:Magenta1, s:clear, s:bold )
call s:highlight('Label', s:SkyBlue1, s:clear, s:bold )
call s:highlight('Operator', s:Purple3, s:clear, s:none )
call s:highlight('Keyword', s:Purple3, s:clear, s:none )
call s:highlight('Exception', s:Magenta1, s:clear, s:italic )
call s:highlight('PreProc', s:Grey54, s:clear, s:italic )
call s:highlight('Include', s:Purple4, s:clear, s:italic )
call s:highlight('Define', s:Magenta2, s:clear, s:italic )
call s:highlight('Macro', s:HotPink, s:clear, s:italic )
call s:highlight('PreCondit', s:Purple4, s:clear, s:italic )
call s:highlight('Type', s:MediumOrchid1, s:clear, s:bold )
call s:highlight('StorageClass', s:Purple3, s:clear, s:bold )
call s:highlight('Structure', s:Purple3, s:clear, s:bold )
call s:highlight('Typedef', s:Purple3, s:clear, s:bold )
call s:highlight('Special', s:Grey66, s:clear, s:none )
call s:highlight('SpecialChar', s:MediumOrchid1, s:clear, s:none )
call s:highlight('Delimiter', s:DeepSkyBlue3, s:clear, s:none )
call s:highlight('SpecialComment', s:Grey54, s:clear, s:none )
call s:highlight('Debug', s:Red1, s:clear, s:none )
call s:highlight('Underlined', s:Grey54, s:clear, s:underline )
call s:highlight('Error', s:Red1, s:clear, s:underline )
call s:highlight('Todo', s:Yellow1, s:clear, s:none )
" Nodar changes
call s:highlight('ColorColumn', s:clear, s:DeepSkyBlue3, s:none )


" Interface highlighting
call s:highlight('Normal', s:clear, s:Grey7, s:none )
call s:highlight('Visual', s:clear, s:Grey42, s:none )
call s:highlight('Cursor', s:Grey66, s:clear, s:none )
call s:highlight('LineNr', s:MistyRose1, s:clear, s:none )
call s:highlight('CursorLineNr', s:DarkMagenta, s:clear, s:italic )


" Java syntax highlighting
call s:highlight('javaParen', s:DarkMagenta, s:clear, s:none )
call s:highlight('javaCommentTitle', s:DeepSkyBlue3, s:clear, s:none )
call s:highlight('javaDocParam', s:DeepSkyBlue3, s:clear, s:none )
call s:highlight('javaDocTags', s:DeepSkyBlue3, s:clear, s:none )
call s:highlight('javaScopeDecl', s:Grey66, s:clear, s:none )
call s:highlight('javaStorageClass', s:MediumOrchid1, s:clear, s:none )


" Python syntax highlighting
call s:highlight('pythonFunction', s:Grey66, s:clear, s:none )
call s:highlight('pythonBuiltin', s:Grey66, s:clear, s:italic )


" Vimscript syntax highlighting
call s:highlight('vimOption', s:DarkViolet, s:clear, s:none )


" *NOTE*
"
" The following groups are plug specific and would require the following plugs
" from github in order for the groups to work.
"

" Elm syntax highlighting
" Requires plug: ElmCast/Magenta2-vim
"
call s:highlight('elmTypeDef', s:MediumOrchid1, s:clear, s:bold )
call s:highlight('elmAlias', s:Grey66, s:clear, s:none )
call s:highlight('elmTopLevelDecl', s:SkyBlue1, s:clear, s:bold )
call s:highlight('elmBraces', s:DarkMagenta, s:clear, s:none )


" Elixir syntax highlighting
" Requires plug: elixir-editors/vim-elixir
"
call s:highlight('elixirAlias', s:Magenta2, s:clear, s:italic )
call s:highlight('elixirDefine', s:MediumOrchid1, s:clear, s:none )
call s:highlight('elixirBlockDefinition', s:MediumOrchid1, s:clear, s:none )
call s:highlight('elixirFunctionDeclaration', s:Grey66, s:clear, s:none )


" GOLang syntax highlighting
" Requires plug: fatih/vim-go
"
call s:highlight('goPackage', s:Magenta2, s:clear, s:italic )
call s:highlight('goImport', s:Purple4, s:clear, s:italic )


" Rust syntax highlighting
" Requires plug: rust-lang/rust.vim
"
call s:highlight('rustMacro', s:MediumOrchid1, s:clear, s:none )
Loading