New beginning.

master
blallo 4 years ago
commit 11dcf9bee3
  1. 2
      .gitignore
  2. 13
      archbootstrap.sh
  3. 2526
      autoload/plug.vim
  4. 1
      bundle/Dockerfile.vim
  5. 1
      bundle/ale
  6. 1
      bundle/auto-pairs
  7. 1
      bundle/awesome-vim-colorschemes
  8. 1
      bundle/black
  9. 1
      bundle/cosmic_latte
  10. 1
      bundle/deoplete.nvim
  11. 1
      bundle/fzf.vim
  12. 1
      bundle/nerdtree
  13. 1
      bundle/nerdtree-git-plugin
  14. 1
      bundle/nvim-yarp
  15. 1
      bundle/rust.vim
  16. 1
      bundle/seoul256.vim
  17. 1
      bundle/srcery-vim
  18. 1
      bundle/tagbar
  19. 1
      bundle/vim
  20. 1
      bundle/vim-airline
  21. 1
      bundle/vim-airline-themes
  22. 1
      bundle/vim-fugitive
  23. 1
      bundle/vim-go
  24. 1
      bundle/vim-hug-neovim-rpc
  25. 1
      bundle/vim-hybrid
  26. 1
      bundle/vim-hybrid-material
  27. 1
      bundle/vim-multiple-cursors
  28. 1
      bundle/vim-toml
  29. 1
      bundle/yaml-vim
  30. 74
      colors/fruidle.vim
  31. 65
      ftplugin/python.vim
  32. 302
      vimrc

2
.gitignore vendored

@ -0,0 +1,2 @@
/black
__pycache__/*

@ -0,0 +1,13 @@
#!/usr/bin/env bash
sudo pacman -Sy \
base-devel \
prettier \
yapf \
autopep8 \
python-black \
mypy \
python-greenlet
pip3 install --user pynvim

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
Subproject commit da5d2b890d567e610d5f0f44a199d95b1f3148c5

@ -0,0 +1 @@
Subproject commit 79e42fed14b35767d53d7d443a644a037e012b89

@ -0,0 +1 @@
Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76

@ -0,0 +1 @@
Subproject commit dec452fcf71c8d09c4029fe28d9ac12af935f6ac

@ -0,0 +1 @@
Subproject commit 188c31db7c831741e69b067c53dd040917ac03f7

@ -0,0 +1 @@
Subproject commit 1e0e8ad982ec592709634c16a451e8ab286d20b7

@ -0,0 +1 @@
Subproject commit 9d4e88f6cce63ed1b52ca2401d809c55ab443b25

@ -0,0 +1 @@
Subproject commit ac4e7bfb36c88d27799c080218cea3bb833bdbd9

@ -0,0 +1 @@
Subproject commit 67fa9b3116948466234978aa6287649f98e666bd

@ -0,0 +1 @@
Subproject commit 325a1298b0c9d8a4c61388a2f9956a534a9068cd

@ -0,0 +1 @@
Subproject commit 1524cf7988d1e1ed7475ead3654987f64943a1f0

@ -0,0 +1 @@
Subproject commit 9984b9753606fe2c8d7f3d4f9d67c1777a967cd6

@ -0,0 +1 @@
Subproject commit 1475b7610663c68aa90b6e565997c8792ce0d222

@ -0,0 +1 @@
Subproject commit a52ad903402cddc204e105fde94c4ceaa024b8b5

@ -0,0 +1 @@
Subproject commit 387bbadda98e1376ff3871aa461b1f0abd4ece70

@ -0,0 +1 @@
Subproject commit 837fd7292274e0ee2f3b5aee4519c3f74d7dc3d1

@ -0,0 +1 @@
Subproject commit 9a1acf144fd63cae6f48a3b445958d737c0b167e

@ -0,0 +1 @@
Subproject commit e6f233231b232b6027cde6aebeeb18d9138e5324

@ -0,0 +1 @@
Subproject commit 5d99841b22928f1597d447c68de844989bf9a804

@ -0,0 +1 @@
Subproject commit c4b419db6c57125e91d6f292daa664b73b155b7b

@ -0,0 +1 @@
Subproject commit 55db7affbc9527464a88fb2d5f133f4994415f10

@ -0,0 +1 @@
Subproject commit f44c626c9ea72a091ee8b90dbaab1659f8980ab1

@ -0,0 +1 @@
Subproject commit f2e92ac7e5c4bb75d72f0abaea939e4364e00e2e

@ -0,0 +1 @@
Subproject commit 8cb8e83ffb040f25cefa597f21608ca6a64aed70

@ -0,0 +1 @@
Subproject commit 2295e612d936671048035dbc447f5400cbee60de

@ -0,0 +1 @@
Subproject commit 509eef523082d69a75652739d4e7e6068eeb6506

@ -0,0 +1,74 @@
" Vim color file
" Maintainer: Andrés Suárez <ansuga@gmail.com>
" Last Change: 2009/02/10 Tue 16:55
" version: 1.2
" This color scheme uses a light background.
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "fruidle"
" Normal
hi Normal guifg=#404040 guibg=#ffffff
" Search
hi IncSearch gui=UNDERLINE guifg=#404040 guibg=#40ffff
hi Search gui=NONE guifg=#404040 guibg=#ffff60
" Messages
hi ErrorMsg gui=NONE guifg=#ff0000 guibg=#ffe4e4
hi WarningMsg gui=NONE guifg=#ff0000 guibg=#ffe4e4
hi ModeMsg gui=NONE guifg=#dd0000 guibg=NONE
hi MoreMsg gui=NONE guifg=#009070 guibg=NONE
hi Question gui=NONE guifg=#ff7700 guibg=NONE
" Split area
hi StatusLine gui=BOLD guifg=#f8f8f8 guibg=#404040
hi StatusLineNC gui=NONE guifg=#a4a4a4 guibg=#404040
hi VertSplit gui=NONE guifg=#f8f8f8 guibg=#404040
hi WildMenu gui=BOLD guifg=#f8f8f8 guibg=#dd0000
" Diff
hi DiffText gui=NONE guifg=#e04040 guibg=#ffd8d8
hi DiffChange gui=NONE guifg=#408040 guibg=#d0f0d0
hi DiffDelete gui=NONE guifg=#4848ff guibg=#ffd0ff
hi DiffAdd gui=NONE guifg=#4848ff guibg=#ffd0ff
" Cursor
hi Cursor gui=NONE guifg=#0000ff guibg=#00e0ff
hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff
hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff
" Fold
hi Folded gui=NONE guifg=#20605c guibg=#b8e8dc
hi FoldColumn gui=NONE guifg=#40a098 guibg=#f0f0f0
" Other
hi Directory gui=NONE guifg=#0070b8 guibg=NONE
hi LineNr gui=NONE guifg=#acacac guibg=NONE
hi NonText gui=BOLD guifg=#00a0c0 guibg=#ececec
hi SpecialKey gui=NONE guifg=#4040ff guibg=NONE
hi Title gui=NONE guifg=#0050a0 guibg=#c0e8ff
hi Visual gui=NONE guifg=#484848 guibg=#e0e0e0
" hi VisualNOS gui=NONE guifg=#484848 guibg=#e0e0e0
" Syntax group
hi Comment gui=NONE guifg=#dd0000 guibg=NONE
hi Constant gui=NONE guifg=#0070e6 guibg=NONE
hi Number gui=NONE guifg=#aa0094 guibg=NONE
hi Identifier gui=NONE guifg=#0070e6 guibg=NONE
hi Error gui=BOLD guifg=#ffffff guibg=#dd0000
hi Ignore gui=NONE guifg=#f8f8f8 guibg=NONE
hi PreProc gui=BOLD guifg=#e06800 guibg=NONE
hi Special gui=NONE guifg=#4a9400 guibg=NONE
hi Statement gui=NONE guifg=#ff7700 guibg=NONE
hi Todo gui=UNDERLINE guifg=#ff0070 guibg=#ffe0f4
hi Type gui=BOLD guifg=#0070e6 guibg=NONE
hi Underlined gui=UNDERLINE guifg=fg guibg=NONE
hi Include gui=BOLD guifg=#dd0000 guibg=NONE
hi Function gui=BOLD guifg=#00aa00 guibg=NONE
hi String gui=NONE guifg=#00aa00 ctermfg=1

@ -0,0 +1,65 @@
setlocal expandtab
setlocal colorcolumn=88
setlocal textwidth=88
" Enable comment continuation.
" setlocal formatoptions+=cro
" setlocal foldmethod=indent
" setlocal foldminlines=10
" setlocal textwidth=0
" Multi-line commenting and uncommenting.
vmap <buffer> <C-m> :s/^\(\s*\)/\1#/<Return>
vmap <buffer> <C-,> :s/^\(\s*\)#/\1/<Return>
" Use the AutoPythonImport tool.
map <buffer> <C-n> :call AutoPythonImport(expand("<cword>"))<Return>
" Change the line length for Python files based on configuration files.
function! ChangePythonLineLength() abort
let l:conf = ale#path#FindNearestFile(bufnr(''), 'setup.cfg')
" Reset settings back to defaults when configuration files are not found
let l:line_length = 79
if !empty(l:conf)
for l:match in ale#util#GetMatches(
\ readfile(l:conf),
\ '\v^ *max-line-length *\= *(\d+)',
\)
let l:line_length = str2nr(l:match[1])
endfor
endif
let &l:colorcolumn = l:line_length + 1
endfunction
call ChangePythonLineLength()
let b:ale_linters = ['flake8']
let b:ale_fixers = [
\ 'remove_trailing_lines',
\ 'autopep8',
\ 'yapf',
\]
let b:ale_completion_excluded_words = ['and', 'or', 'if']
if expand('%:e') is# 'pyi'
let b:ale_linters = ['mypy']
endif
map <buffer> <silent> <F9> :TestFile<CR>
let s:virtualenv = ale#python#FindVirtualenv(bufnr(''))
if !empty(s:virtualenv)
if executable(s:virtualenv . '/bin/pytest')
let g:test#python#runner = 'pytest'
let g:test#python#pytest#executable =
\ ale#path#CdString(ale#path#Dirname(s:virtualenv))
\ . ale#Escape(s:virtualenv . '/bin/pytest')
else
let g:test#python#runner = 'djangotest'
let g:test#python#djangotest#executable =
\ ale#Escape(s:virtualenv . '/bin/python')
\ . ' ' . ale#Escape(ale#path#Dirname(s:virtualenv) . '/manage.py') . ' test'
endif
endif

302
vimrc

@ -0,0 +1,302 @@
let $VIMHOME = expand('~/.vim')
" check if in tty
let g:is_tty = system('case $(tty) in (/dev/tty[0-9]) echo 1;; (*) echo 0;; esac')
" vim-plug init
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/bundle')
""" Install Plugs
" Deoplete.vim
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
let g:deoplete#enable_at_startup = 1
" fzf
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" NERDTree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" tagbar
Plug 'majutsushi/tagbar'
" vim-fugitive
Plug 'tpope/vim-fugitive'
" ALE
Plug 'w0rp/ale'
" vim-airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Colorschemes
Plug 'junegunn/seoul256.vim'
Plug 'scwood/vim-hybrid'
Plug 'kristijanhusak/vim-hybrid-material'
Plug 'srcery-colors/srcery-vim'
Plug 'nightsense/cosmic_latte'
Plug 'rafi/awesome-vim-colorschemes'
" Dockerfile.vim
Plug 'ekalinin/Dockerfile.vim'
" YAML
Plug 'mrk21/yaml-vim'
" Python
Plug 'ambv/black'
" TOML
Plug 'cespare/vim-toml'
" Autoclose
Plug 'jiangmiao/auto-pairs'
" vim-go
Plug 'fatih/vim-go'
" vim-multiple-cursor
Plug 'terryma/vim-multiple-cursors'
" rust.vim
Plug 'rust-lang/rust.vim'
call plug#end()
"""
""" ALE configuration
let g:ale_sign_error = '->'
let g:ale_sign_warning = '~>'
let g:deoplete#sources = {'_': ['ale']}
let g:ale_completion_enabled = 1
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'golang': ['gopls', 'gofmt'],
\ 'python': ['flake8', 'python-language-server'],
\ 'rust': ['cargo'],
\}
let g:ale_fixers = {
\ 'javascript': ['prettier'],
\ 'golang': ['gopls', 'gofmt', 'goimports'],
\ 'python': ['black', 'python-language-server'],
\ 'rust': ['cargo'],
\}
let g:ale_echo_msg_error_str = 'Err'
let g:ale_echo_msg_warning_str = 'Warn'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_go_langserver_executable = 'gopls'
""" Themes and colors
set term=linux
set t_Co=256
set background=dark
colorscheme hybrid_reverse
let g:airline_theme='hybrid'
set number
let g:enable_bold_font = 1
let g:enable_italic_font = 1
" air-line
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols') && !g:is_tty
let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''"
" let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
" let g:airline_symbols.paste = 'Þ'
" let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
""" FZF
let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
let g:fzf_action = {
\ 'ctrl-t': 'tabedit',
\ 'ctrl-v': 'vsplit',
\ 'ctrl-x': 'split' }
let g:fzf_buffers_jump = 1
let g:fzf_commands_expect = 'alt-enter,ctrl-x'
""" NERDTree
" Close NERDTree automatically after opening a file with it.
let g:NERDTreeQuitOnOpen = 1
" Use a single click for opening things in NERDTree
let g:NERDTreeMouseMode = 3
let g:NERDTreeMapActivateNode = '<Space>'
let g:NERDTreeIgnore = [
\ '\.pyc$',
\ '^__pycache__$',
\]
" ripgrep
if executable('rg')
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
set grepprg=rg\ --vimgrep
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
endif
" Search in files with ripgrep + preview with bat
function! Fzf_dev()
let l:fzf_files_options = '--preview "bat --style=numbers,changes --color always {2..-1} | head -'.&lines.'"'
function! s:files()
let l:files = split(system($FZF_DEFAULT_COMMAND), '\n')
return s:format_list(l:files)
endfunction
function! s:format_list(candidates)
let l:result = []
for l:candidate in a:candidates
let l:filename = fnamemodify(l:candidate, ':p:t')
let l:icon = ">-"
call add(l:result, printf('%s %s', l:icon, l:candidate))
endfor
return l:result
endfunction
function! s:edit_file(item)
let l:pos = stridx(a:item, ' ')
let l:file_path = a:item[pos+1:-1]
execute 'silent e' l:file_path
endfunction
call fzf#run({
\ 'source': <sid>files(),
\ 'sink': function('s:edit_file'),
\ 'options': '-m ' . l:fzf_files_options,
\ 'down': '40%' })
endfunction
""" general
set nospell
packloadall
silent! helptags ALL
" Enable persistent undo
set undodir=$VIMHOME/.undo//
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
" Automatically re-open files after they have changed without prompting.
" This can be a little more destructive, but a lot less annoying.
set autoread
set autochdir
set autoindent
set showmatch
" Put all special files in the right place
set backupdir=$VIMHOME/.backup//
set directory=$VIMHOME/.swp//
" Draw tabs and trailing spaces.
" set listchars=tab:<->
set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
set list
" Set the right margin.
set colorcolumn=89
" Automatically split words at the margin.
set wrap
" Default to spaces instead of tabs
set expandtab
" Set tab width to 4.
set tabstop=4
set shiftwidth=4
" Setting this will make backspace delete space indents
set softtabstop=4
" Disable automatic wrapping.
set textwidth=0
" Make :Q and :W work like :q and :w
command! W w
command! Q q
" Make completion smarter.
set ignorecase
set smartcase
" viminfo settings
" '100 : Remember marks for 100 previously edited files.
" <50 : ???
" s10 : ???
" h : ???
" "100 : Save 100 lines for each register
" :50 : Remember 50 lines of command history
set viminfo='100,<50,s10,h,\"100,:50
" Jump at last opened cursor position position, if valid
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" Warn about not being able to write to .viminfo, which messes up restoring
" the cursor position when editing.
let s:info_filename = expand('~/.viminfo')
if !empty(glob(s:info_filename)) && !filewritable(s:info_filename)
echoerr 'The .viminfo file cannot be written to!'
endif
""" keybindings
let mapleader = ','
nnoremap <silent> <C-d> :bd<CR>
nnoremap <C-e> :NERDTree<CR>
nnoremap <C-h> <C-w><Left>
nnoremap <C-j> <C-w><Down>
nnoremap <C-k> <C-w><Up>
nnoremap <C-l> <C-w><Right>
nnoremap <C-t> :Tagbar<CR>
nnoremap <leader>b :Gblame<CR>
nnoremap <C-p> :FZF<CR>
nnoremap <C-a> :Buffers<CR>
nnoremap <C-F> :Files<CR>
nnoremap <C-\> :Rg<CR>
nnoremap <leader>\ :call Fzf_dev()<CR>
nnoremap <leader>c :Commits
map <leader><Tab> :bnext<CR>
map <leader><S-Tab> :bprev<CR>
Loading…
Cancel
Save