mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 00:58:16 +00:00
Initial commit
This commit is contained in:
1
.config/nvim/colors/xoria256.vim
Symbolic link
1
.config/nvim/colors/xoria256.vim
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../.vim/colors/xoria256.vim
|
169
.config/nvim/init.vim
Executable file
169
.config/nvim/init.vim
Executable file
@@ -0,0 +1,169 @@
|
||||
" nvim config
|
||||
|
||||
set nocompatible
|
||||
filetype off
|
||||
|
||||
" disable swap files
|
||||
set noswapfile
|
||||
|
||||
" Set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
|
||||
" Plugins
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'fatih/vim-go'
|
||||
Plug 'hashivim/vim-terraform'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'junegunn/fzf'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'psf/black'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'vifm/vifm.vim'
|
||||
Plug 'vim-syntastic/syntastic'
|
||||
Plug 'yuki-ycino/fzf-preview.vim'
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
" Security
|
||||
set modelines=0
|
||||
|
||||
" Show line numbers
|
||||
set number
|
||||
|
||||
" Show file stats
|
||||
set ruler
|
||||
|
||||
" Highlight current line
|
||||
set cursorline
|
||||
|
||||
" Encoding
|
||||
set encoding=utf-8
|
||||
|
||||
" ignore case when searching
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Status bar
|
||||
set laststatus=2
|
||||
|
||||
" Last line
|
||||
set showmode
|
||||
set showcmd
|
||||
|
||||
" autoread
|
||||
set autoread
|
||||
|
||||
" Mouse
|
||||
set mouse=a
|
||||
|
||||
" Search down into subfolders
|
||||
" Provides tab-completion for all file-related tasks
|
||||
set path+=**
|
||||
|
||||
" Display all matching files when we tab complete
|
||||
set wildmenu
|
||||
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" Enable folding
|
||||
set foldmethod=indent
|
||||
set foldlevel=99
|
||||
|
||||
" Incremental search
|
||||
set incsearch
|
||||
|
||||
" highlight search
|
||||
set hlsearch
|
||||
|
||||
" Enable folding with the spacebar
|
||||
nnoremap <space> za
|
||||
|
||||
" replace visually selected
|
||||
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left>
|
||||
|
||||
" Custom Commands
|
||||
command JsonFormat execute "::%!jq '.'"
|
||||
|
||||
" Shortcuts
|
||||
map <Leader>r :Rg<CR>
|
||||
map <Leader>g :Rg<CR>
|
||||
map <Leader>f :FzfPreviewDirectoryFiles<CR>
|
||||
map <Leader>n :NERDTree<CR>
|
||||
|
||||
noremap <Leader>y "*y
|
||||
noremap <Leader>p "*p
|
||||
noremap <Leader>Y "+y
|
||||
noremap <Leader>P "+p
|
||||
|
||||
set pastetoggle=<F3>
|
||||
|
||||
" Python indentation
|
||||
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
|
||||
|
||||
let python_highlight_all=1
|
||||
|
||||
syntax on
|
||||
set t_Co=256
|
||||
colorscheme xoria256
|
||||
" Transparency
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" highlight red lines
|
||||
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
match ExtraWhitespace /\s\+$/
|
||||
|
||||
" groovy syntax
|
||||
au BufNewFile,BufRead Jenkinsfile setf groovy
|
||||
au BufNewFile,BufRead Jenkinsfile set tabstop=2 shiftwidth=2 expandtab
|
||||
|
||||
" vim-go
|
||||
let g:go_auto_sameids = 0
|
||||
let g:go_fmt_command = "goimports"
|
||||
let g:go_fmt_experimental = 1
|
||||
let g:go_highlight_array_whitespace_error = 1
|
||||
let g:go_highlight_build_constraints = 1
|
||||
let g:go_highlight_chan_whitespace_error = 1
|
||||
let g:go_highlight_extra_types = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_format_strings = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
let g:go_highlight_function_parameters = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_generate_tags = 1
|
||||
let g:go_highlight_operators = 1
|
||||
let g:go_highlight_space_tab_error = 1
|
||||
let g:go_highlight_string_spellcheck = 1
|
||||
let g:go_highlight_trailing_whitespace_error = 0
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_variable_assignments = 1
|
||||
let g:go_highlight_variable_declarations = 1
|
||||
let g:go_metalinter_autosave=1
|
||||
let g:go_metalinter_autosave_enabled=['golint', 'govet']
|
||||
|
||||
" vim-terraform
|
||||
let g:terraform_align=1
|
||||
let g:terraform_fmt_on_save=1
|
||||
let g:terraform_fold_sections=1
|
||||
|
||||
" rust.vim
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
" syntastic
|
||||
set statusline+=%#warningmsg#
|
||||
set statusline+=%{SyntasticStatuslineFlag()}
|
||||
set statusline+=%*
|
||||
|
||||
let g:syntastic_always_populate_loc_list = 1
|
||||
let g:syntastic_auto_loc_list = 1
|
||||
let g:syntastic_check_on_open = 1
|
||||
let g:syntastic_check_on_wq = 0
|
120
.config/nvim/nvim/colors/xoria256.vim
Executable file
120
.config/nvim/nvim/colors/xoria256.vim
Executable file
@@ -0,0 +1,120 @@
|
||||
" Vim color file
|
||||
"
|
||||
" Name: xoria256.vim
|
||||
" Version: 1.5
|
||||
" Maintainer: Dmitriy Y. Zotikov (xio) <xio@ungrund.org>
|
||||
"
|
||||
" Should work in recent 256 color terminals. 88-color terms like urxvt are
|
||||
" NOT supported.
|
||||
"
|
||||
" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or
|
||||
" similar value.
|
||||
"
|
||||
" Color numbers (0-255) see:
|
||||
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
|
||||
"
|
||||
" For a specific filetype highlighting rules issue :syntax list when a file of
|
||||
" that type is opened.
|
||||
|
||||
" Initialization {{{
|
||||
if &t_Co != 256 && ! has("gui_running")
|
||||
echomsg ""
|
||||
echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)"
|
||||
echomsg ""
|
||||
finish
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
|
||||
hi clear
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "xoria256"
|
||||
"}}}
|
||||
" Colours {{{1
|
||||
"" General {{{2
|
||||
hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none
|
||||
hi Cursor ctermbg=214 guibg=#ffaf00
|
||||
hi CursorColumn ctermbg=238 guibg=#444444
|
||||
hi CursorLine ctermbg=237 guibg=#3a3a3a cterm=none gui=none
|
||||
hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
|
||||
hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
|
||||
hi FoldColumn ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
|
||||
hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
|
||||
hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none
|
||||
hi LineNr ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
|
||||
hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold
|
||||
hi Pmenu ctermfg=0 guifg=#000000 ctermbg=250 guibg=#bcbcbc
|
||||
hi PmenuSel ctermfg=255 guifg=#eeeeee ctermbg=243 guibg=#767676
|
||||
hi PmenuSbar ctermbg=252 guibg=#d0d0d0
|
||||
hi PmenuThumb ctermfg=243 guifg=#767676
|
||||
hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f
|
||||
hi SignColumn ctermfg=248 guifg=#a8a8a8
|
||||
hi SpecialKey ctermfg=77 guifg=#5fdf5f
|
||||
hi SpellBad ctermfg=160 guifg=fg ctermbg=bg cterm=underline guisp=#df0000
|
||||
hi SpellCap ctermfg=189 guifg=#dfdfff ctermbg=bg guibg=bg cterm=underline gui=underline
|
||||
hi SpellRare ctermfg=168 guifg=#df5f87 ctermbg=bg guibg=bg cterm=underline gui=underline
|
||||
hi SpellLocal ctermfg=98 guifg=#875fdf ctermbg=bg guibg=bg cterm=underline gui=underline
|
||||
hi StatusLine ctermfg=15 guifg=#ffffff ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold
|
||||
hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none
|
||||
hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=none gui=none
|
||||
hi TabLineFill ctermfg=fg guifg=fg ctermbg=237 guibg=#3a3a3a cterm=none gui=none
|
||||
hi Title ctermfg=225 guifg=#ffdfff
|
||||
hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00
|
||||
hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline
|
||||
hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none
|
||||
hi Visual ctermfg=255 guifg=#eeeeee ctermbg=96 guibg=#875f87
|
||||
hi VisualNOS ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
|
||||
hi WildMenu ctermfg=0 guifg=#000000 ctermbg=150 guibg=#afdf87 cterm=bold gui=bold
|
||||
|
||||
"" Syntax highlighting {{{2
|
||||
hi Comment guifg=#787882 ctermfg=243 guibg=NONE ctermbg=NONE gui=Italic cterm=Italic
|
||||
hi Constant ctermfg=229 guifg=#ffffaf
|
||||
hi Identifier ctermfg=182 guifg=#dfafdf cterm=none
|
||||
hi Ignore ctermfg=238 guifg=#444444
|
||||
hi Number ctermfg=180 guifg=#dfaf87
|
||||
hi PreProc ctermfg=150 guifg=#afdf87
|
||||
hi Special ctermfg=174 guifg=#df8787
|
||||
hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none
|
||||
hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none
|
||||
|
||||
"" Special {{{2
|
||||
""" .diff {{{3
|
||||
hi diffAdded ctermfg=150 guifg=#afdf87
|
||||
hi diffRemoved ctermfg=174 guifg=#df8787
|
||||
""" vimdiff {{{3
|
||||
hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf
|
||||
"hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none
|
||||
hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none
|
||||
hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf
|
||||
hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none
|
||||
""" HTML {{{3
|
||||
" hi htmlTag ctermfg=146 guifg=#afafdf
|
||||
" hi htmlEndTag ctermfg=146 guifg=#afafdf
|
||||
hi htmlTag ctermfg=244
|
||||
hi htmlEndTag ctermfg=244
|
||||
hi htmlArg ctermfg=182 guifg=#dfafdf
|
||||
hi htmlValue ctermfg=187 guifg=#dfdfaf
|
||||
hi htmlTitle ctermfg=254 ctermbg=95
|
||||
" hi htmlArg ctermfg=146
|
||||
" hi htmlTagName ctermfg=146
|
||||
" hi htmlString ctermfg=187
|
||||
""" django {{{3
|
||||
hi djangoVarBlock ctermfg=180
|
||||
hi djangoTagBlock ctermfg=150
|
||||
hi djangoStatement ctermfg=146
|
||||
hi djangoFilter ctermfg=174
|
||||
""" python {{{3
|
||||
hi pythonExceptions ctermfg=174
|
||||
""" NERDTree {{{3
|
||||
hi Directory ctermfg=110 guifg=#87afdf
|
||||
hi treeCWD ctermfg=180 guifg=#dfaf87
|
||||
hi treeClosable ctermfg=174 guifg=#df8787
|
||||
hi treeOpenable ctermfg=150 guifg=#afdf87
|
||||
hi treePart ctermfg=244 guifg=#808080
|
||||
hi treeDirSlash ctermfg=244 guifg=#808080
|
||||
hi treeLink ctermfg=182 guifg=#dfafdf
|
||||
|
131
.config/nvim/nvim/init.vim
Executable file
131
.config/nvim/nvim/init.vim
Executable file
@@ -0,0 +1,131 @@
|
||||
set nocompatible
|
||||
filetype off
|
||||
set noswapfile
|
||||
|
||||
" Set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
|
||||
" Specify a directory for plugins
|
||||
" - Avoid using standard Vim directory names like 'plugin'
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'fatih/vim-go'
|
||||
Plug 'junegunn/fzf'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'psf/black'
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
" Security
|
||||
set modelines=0
|
||||
|
||||
" Show line numbers
|
||||
set number
|
||||
|
||||
" Show file stats
|
||||
set ruler
|
||||
|
||||
" Highlight current line
|
||||
set cursorline
|
||||
|
||||
" Encoding
|
||||
set encoding=utf-8
|
||||
|
||||
" ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" Status bar
|
||||
set laststatus=2
|
||||
|
||||
" Last line
|
||||
set showmode
|
||||
set showcmd
|
||||
|
||||
" Mouse
|
||||
set mouse=a
|
||||
|
||||
" FINDING FILES
|
||||
|
||||
" Search down into subfolders
|
||||
" Provides tab-completion for all file-related tasks
|
||||
set path+=**
|
||||
|
||||
" Display all matching files when we tab complete
|
||||
set wildmenu
|
||||
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" Enable folding
|
||||
set foldmethod=indent
|
||||
set foldlevel=99
|
||||
|
||||
" Enable folding with the spacebar
|
||||
nnoremap <space> za
|
||||
|
||||
" replace visually selected
|
||||
vnoremap <C-r> "hy:%s/<C-r>h//g<left><left>
|
||||
|
||||
" Custom Commands
|
||||
command JsonFormat execute "::%!jq '.'"
|
||||
|
||||
" Shortcuts
|
||||
map <Leader>r :Rg<CR>
|
||||
map <Leader>f :FZF<CR>
|
||||
map <Leader>n :NERDTree<CR>
|
||||
|
||||
noremap <Leader>y "*y
|
||||
noremap <Leader>p "*p
|
||||
noremap <Leader>Y "+y
|
||||
noremap <Leader>P "+p
|
||||
|
||||
set pastetoggle=<F3>
|
||||
|
||||
" Python indentation
|
||||
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
|
||||
|
||||
let python_highlight_all=1
|
||||
|
||||
syntax on
|
||||
set t_Co=256
|
||||
colorscheme xoria256
|
||||
" Transparency
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" highlight red lines
|
||||
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
match ExtraWhitespace /\s\+$/
|
||||
|
||||
" groovy syntax
|
||||
au BufNewFile,BufRead Jenkinsfile setf groovy
|
||||
au BufNewFile,BufRead Jenkinsfile set tabstop=2 shiftwidth=2 expandtab
|
||||
|
||||
" vim-go
|
||||
let g:go_auto_sameids = 1
|
||||
let g:go_fmt_command = "goimports"
|
||||
let g:go_fmt_experimental = 1
|
||||
let g:go_highlight_array_whitespace_error = 1
|
||||
let g:go_highlight_build_constraints = 1
|
||||
let g:go_highlight_chan_whitespace_error = 1
|
||||
let g:go_highlight_extra_types = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_format_strings = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
let g:go_highlight_function_parameters = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_generate_tags = 1
|
||||
let g:go_highlight_operators = 1
|
||||
let g:go_highlight_space_tab_error = 1
|
||||
let g:go_highlight_string_spellcheck = 1
|
||||
let g:go_highlight_trailing_whitespace_error = 0
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_variable_assignments = 1
|
||||
let g:go_highlight_variable_declarations = 1
|
||||
let g:go_metalinter_autosave=1
|
||||
let g:go_metalinter_autosave_enabled=['golint', 'govet']
|
Reference in New Issue
Block a user