2020-02-24 15:15:50 +00:00
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
|
2020-02-25 12:48:15 +00:00
|
|
|
" Contains lots of sensible configurations, which I have in turn omitted from this file
|
|
|
|
Plug 'tpope/vim-sensible'
|
|
|
|
|
2020-02-27 23:09:43 +00:00
|
|
|
" Always enabled, non-language plugins
|
2020-02-25 12:48:15 +00:00
|
|
|
Plug 'tpope/vim-eunuch'
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
Plug 'tpope/vim-endwise'
|
2020-02-24 15:15:50 +00:00
|
|
|
Plug 'w0rp/ale'
|
|
|
|
Plug 'morhetz/gruvbox'
|
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
Plug 'edkolev/tmuxline.vim'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
Plug 'vimwiki/vimwiki'
|
2020-02-25 12:48:15 +00:00
|
|
|
Plug 'junegunn/goyo.vim'
|
2020-10-31 22:18:29 +00:00
|
|
|
Plug 'junegunn/fzf'
|
|
|
|
Plug 'autozimu/LanguageClient-neovim', {
|
|
|
|
\ 'branch': 'next',
|
|
|
|
\ 'do': 'bash install.sh',
|
|
|
|
\ }
|
|
|
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
|
|
|
2020-02-25 12:48:15 +00:00
|
|
|
|
2020-02-27 23:09:43 +00:00
|
|
|
" Conditionally loaded plugins
|
2020-04-17 21:36:44 +00:00
|
|
|
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'], 'for': 'gitcommit' }
|
2020-02-25 12:48:15 +00:00
|
|
|
Plug 'mileszs/ack.vim', { 'on': 'Ack' }
|
|
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
|
|
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
|
|
|
|
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
|
|
|
|
2020-02-27 23:09:43 +00:00
|
|
|
" Language specific plugins
|
|
|
|
Plug 'dart-lang/dart-vim-plugin'
|
|
|
|
Plug 'elixir-editors/vim-elixir'
|
2020-10-19 20:19:09 +00:00
|
|
|
Plug 'georgewitteman/vim-fish'
|
2020-02-27 23:09:43 +00:00
|
|
|
Plug 'fatih/vim-go'
|
|
|
|
Plug 'jparise/vim-graphql'
|
|
|
|
Plug 'pangloss/vim-javascript'
|
|
|
|
Plug 'vim-ruby/vim-ruby'
|
|
|
|
Plug 'cespare/vim-toml'
|
|
|
|
Plug 'OmniSharp/omnisharp-vim'
|
|
|
|
Plug 'HerringtonDarkholme/yats.vim'
|
|
|
|
Plug 'MaxMEllon/vim-jsx-pretty'
|
2020-10-31 22:18:29 +00:00
|
|
|
Plug 'ionide/Ionide-vim'
|
2020-07-08 01:40:49 +00:00
|
|
|
Plug 'b4b4r07/vim-hcl'
|
2020-07-10 18:26:38 +00:00
|
|
|
Plug 'hashivim/vim-terraform'
|
2020-03-07 22:55:11 +00:00
|
|
|
Plug 'PProvost/vim-ps1'
|
2020-05-15 21:58:26 +00:00
|
|
|
Plug 'vmchale/dhall-vim'
|
2020-02-24 15:15:50 +00:00
|
|
|
|
|
|
|
call plug#end()
|
2019-08-15 04:44:46 +00:00
|
|
|
|
|
|
|
set colorcolumn=100
|
|
|
|
set cursorline
|
|
|
|
set showmatch
|
|
|
|
set lazyredraw
|
|
|
|
set hlsearch
|
|
|
|
set mouse=a
|
|
|
|
set number
|
|
|
|
set noshowmode
|
|
|
|
set background=dark
|
2020-02-29 00:28:03 +00:00
|
|
|
set nowrap
|
2020-03-07 22:55:11 +00:00
|
|
|
set tabstop=2
|
|
|
|
set shiftwidth=0
|
|
|
|
set expandtab
|
|
|
|
set textwidth=100
|
2019-08-15 04:44:46 +00:00
|
|
|
|
2020-01-22 00:51:32 +00:00
|
|
|
nnoremap <C-p> :FZF<cr>
|
|
|
|
|
2019-08-15 04:44:46 +00:00
|
|
|
let mapleader = 'j'
|
|
|
|
inoremap <leader>j <Esc>
|
|
|
|
|
|
|
|
let mapleader = ','
|
2020-10-31 22:18:29 +00:00
|
|
|
nmap <leader>g <Plug>(lcn-definition)
|
|
|
|
nmap <leader>r <Plug>(lcn-references)
|
|
|
|
nmap <leader>m <Plug>(lcn-menu)
|
|
|
|
nmap <leader>h <Plug>(lcn-hover)
|
|
|
|
nmap <leader>c <Plug>(lcn-code-lens-action)
|
|
|
|
nmap <leader>d <Plug>(lcn-explain-error)
|
|
|
|
nnoremap <leader>ls :LanguageClientStop<cr>
|
|
|
|
nnoremap <leader>ll :LanguageClientStart<cr>
|
2020-02-25 12:48:15 +00:00
|
|
|
nnoremap <leader>n :NERDTreeToggle<cr>
|
2020-01-22 00:51:32 +00:00
|
|
|
nnoremap <leader>p :FZF<cr>
|
2020-01-27 21:40:04 +00:00
|
|
|
nnoremap <leader>a :Ack<cr>
|
2020-01-28 14:53:25 +00:00
|
|
|
nnoremap <leader>we :VimwikiAll2HTML<cr>
|
2020-07-28 01:45:39 +00:00
|
|
|
nnoremap <leader>wz :VimwikiIndex<cr> :Goyo<cr>
|
2020-10-19 20:19:09 +00:00
|
|
|
nnoremap <leader>wg :VimwikiGoto
|
2020-07-08 01:40:49 +00:00
|
|
|
nnoremap <leader>z :Goyo 101x100%<cr>
|
2019-08-15 04:44:46 +00:00
|
|
|
|
2020-03-07 22:55:11 +00:00
|
|
|
" Allows you to use // in order to search for the visually selected text
|
|
|
|
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
|
|
|
2019-09-09 13:53:26 +00:00
|
|
|
" next line is necessary to prevent background rendering bug with kitty term
|
|
|
|
let &t_ut=''
|
|
|
|
|
2019-08-15 04:44:46 +00:00
|
|
|
let g:gruvbox_italic=1
|
|
|
|
colorscheme gruvbox
|
|
|
|
|
2020-07-08 01:40:49 +00:00
|
|
|
highlight Normal ctermbg=None
|
|
|
|
|
2020-10-31 22:18:29 +00:00
|
|
|
let g:deoplete#enable_at_startup = 1
|
|
|
|
|
|
|
|
let g:LanguageClient_serverCommands = {
|
|
|
|
\ 'javascript': ['typescript-language-server', '--stdio'],
|
|
|
|
\ 'javascript.jsx': ['typescript-language-server', '--stdio'],
|
|
|
|
\ 'typescript': ['typescript-language-server', '--stdio'],
|
|
|
|
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
|
|
|
|
\ 'elixir': ['~/code/elixir-lsp/elixir-ls/bin/language_server.sh'],
|
|
|
|
\ 'go': ['gopls'],
|
|
|
|
\ 'fsharp': ['dotnet', '~/code/fsprojects/fsharp-language-server/bin/FSharpLanguageServer.dll'],
|
2020-11-06 00:52:50 +00:00
|
|
|
\ 'dhall': ['dhall-lsp-server'],
|
2020-10-31 22:18:29 +00:00
|
|
|
\ }
|
|
|
|
|
|
|
|
|
2019-08-22 23:52:29 +00:00
|
|
|
let g:ackprg = 'ag --nogroup --nocolor --column'
|
|
|
|
|
2019-08-15 04:44:46 +00:00
|
|
|
let g:lightline = {
|
2020-10-31 22:18:29 +00:00
|
|
|
\ 'colorscheme': 'gruvbox',
|
|
|
|
\ }
|
2019-08-15 04:44:46 +00:00
|
|
|
|
|
|
|
let g:ale_linters = {
|
2020-10-31 22:18:29 +00:00
|
|
|
\ 'javascript': ['eslint', 'stylelint'],
|
|
|
|
\ 'go': ['golint', 'go vet'],
|
|
|
|
\ 'typescript': ['eslint', 'stylelint'],
|
|
|
|
\ 'make': ['checkmake'],
|
|
|
|
\ 'proto': ['protoc-gen-lint'],
|
|
|
|
\ 'dockerfile': ['hadolint'],
|
|
|
|
\ 'dart': ['dartanalyzer'],
|
|
|
|
\ 'fish': ['fish'],
|
|
|
|
\ 'vim': ['vint'],
|
|
|
|
\ 'elixir': ['credo'],
|
|
|
|
\ 'cs': ['OmniSharp'],
|
|
|
|
\ 'terraform': ['tflint'],
|
|
|
|
\ 'ruby': ['rubocop'],
|
|
|
|
\ 'css': ['stylelint'],
|
|
|
|
\ 'sh': ['shellcheck'],
|
|
|
|
\ }
|
2019-08-15 04:44:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
let g:ale_fixers = {
|
2020-10-31 22:18:29 +00:00
|
|
|
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
|
|
|
\ 'graphql': ['prettier'],
|
|
|
|
\ 'javascript': ['eslint', 'prettier'],
|
|
|
|
\ 'typescript': ['eslint', 'prettier'],
|
|
|
|
\ 'css': ['prettier', 'stylelint'],
|
|
|
|
\ 'yaml': ['prettier'],
|
|
|
|
\ 'json': ['prettier'],
|
|
|
|
\ 'dart': ['dartfmt'],
|
|
|
|
\ 'html': ['prettier'],
|
|
|
|
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
|
|
|
\ 'elixir': ['mix_format'],
|
|
|
|
\ 'terraform': ['terraform'],
|
|
|
|
\ 'ruby': ['rubocop'],
|
|
|
|
\ }
|
2019-08-15 04:44:46 +00:00
|
|
|
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
let g:ale_linters_explicit = 1
|
2020-10-31 22:18:29 +00:00
|
|
|
let g:ale_completion_enabled = 0
|
2019-08-15 04:44:46 +00:00
|
|
|
|
2019-11-17 19:28:31 +00:00
|
|
|
let g:OmniSharp_server_stdio = 1
|
2019-12-30 15:06:57 +00:00
|
|
|
|
2020-02-29 00:28:03 +00:00
|
|
|
let g:pencil#map#suspend_af = 'K'
|
|
|
|
|
2020-07-12 08:48:16 +00:00
|
|
|
let g:vimwiki_list = [{'path': expand('~/.wiki/')}]
|
2020-01-22 05:16:00 +00:00
|
|
|
|
2020-10-19 20:19:09 +00:00
|
|
|
augroup ft_jsx
|
2019-12-30 15:06:57 +00:00
|
|
|
au!
|
2020-10-19 20:19:09 +00:00
|
|
|
autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx
|
|
|
|
autocmd BufNewFile,BufRead *.tsx set filetype=typescript.tsx
|
2020-02-28 14:36:44 +00:00
|
|
|
augroup END
|
|
|
|
|
2020-10-19 20:19:09 +00:00
|
|
|
augroup ft_wiki
|
2020-07-10 18:26:38 +00:00
|
|
|
au!
|
2020-10-19 20:19:09 +00:00
|
|
|
autocmd FileType vimwiki set textwidth=70 colorcolumn=70
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
augroup ft_fish
|
|
|
|
au!
|
|
|
|
autocmd FileType fish set tabstop=4
|
2020-07-10 18:26:38 +00:00
|
|
|
augroup END
|
|
|
|
|
2020-10-31 22:18:29 +00:00
|
|
|
augroup ft_cs
|
|
|
|
au!
|
|
|
|
autocmd FileType cs nmap <leader>g <Plug>(omnisharp_go_to_definition)
|
|
|
|
autocmd FileType cs nmap <leader>r <Plug>(omnisharp_find_usages)
|
|
|
|
autocmd FileType cs nmap <leader>h <Plug>(omnisharp_preview_definition)
|
|
|
|
autocmd FileType cs nmap <leader>c <Plug>(omnisharp_code_actions)
|
|
|
|
augroup END
|
|
|
|
|
2020-02-27 23:09:43 +00:00
|
|
|
if exists('$TMUX')
|
|
|
|
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
|
|
|
|
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
|
|
|
|
else
|
|
|
|
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
|
|
|
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
|
|
|
endif
|