|
|
@ -7,6 +7,16 @@ set backspace=indent,eol,start
|
|
|
|
set grepprg=rg\ --vimgrep\ --smart-case\ --follow
|
|
|
|
set grepprg=rg\ --vimgrep\ --smart-case\ --follow
|
|
|
|
set clipboard+=unnamedplus
|
|
|
|
set clipboard+=unnamedplus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Indents word-wrapped lines as much as the 'parent' line
|
|
|
|
|
|
|
|
set wrap
|
|
|
|
|
|
|
|
set breakindent
|
|
|
|
|
|
|
|
" Ensures word-wrap does not split words
|
|
|
|
|
|
|
|
set formatoptions=l
|
|
|
|
|
|
|
|
set lbr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Set colorscheme
|
|
|
|
" Set colorscheme
|
|
|
|
colorscheme codedark
|
|
|
|
colorscheme codedark
|
|
|
|
|
|
|
|
|
|
|
@ -91,8 +101,6 @@ call plug#begin('~/.vim/plugged')
|
|
|
|
|
|
|
|
|
|
|
|
Plug 'tomasiser/vim-code-dark'
|
|
|
|
Plug 'tomasiser/vim-code-dark'
|
|
|
|
|
|
|
|
|
|
|
|
Plug 'dense-analysis/ale'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
Plug 'preservim/nerdtree'
|
|
|
|
Plug 'mbbill/undotree'
|
|
|
|
Plug 'mbbill/undotree'
|
|
|
|
|
|
|
|
|
|
|
@ -121,10 +129,24 @@ call plug#begin('~/.vim/plugged')
|
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
|
|
|
|
|
|
|
|
|
|
|
if has('nvim')
|
|
|
|
if has('nvim')
|
|
|
|
|
|
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter-context'
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter-context'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plug 'neovim/nvim-lspconfig'
|
|
|
|
|
|
|
|
Plug 'nvim-lua/completion-nvim'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" :MasonUpdate updates registry contents
|
|
|
|
|
|
|
|
Plug 'williamboman/mason.nvim', { 'do': ':MasonUpdate' }
|
|
|
|
|
|
|
|
Plug 'jose-elias-alvarez/null-ls.nvim'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" if has('nvim')
|
|
|
|
" if has('nvim')
|
|
|
|
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
|
|
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
|
|
" else
|
|
|
|
" else
|
|
|
@ -137,22 +159,7 @@ call plug#begin('~/.vim/plugged')
|
|
|
|
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
luafile ~/.vim/lsp_config.lua
|
|
|
|
let g:ale_linters = {
|
|
|
|
|
|
|
|
\ 'python': ['flake8'],
|
|
|
|
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let g:ale_fixers = {
|
|
|
|
|
|
|
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
|
|
|
|
|
|
|
\ 'javascript': ['prettier_eslint'],
|
|
|
|
|
|
|
|
\ 'css': ['prettier'],
|
|
|
|
|
|
|
|
\ 'python': ['black', 'isort']
|
|
|
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let g:ale_sign_error = '●'
|
|
|
|
|
|
|
|
let g:ale_sign_warning = '.'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" call deoplete#custom#option('sources', {
|
|
|
|
" call deoplete#custom#option('sources', {
|
|
|
@ -238,6 +245,11 @@ nmap <down> ]e
|
|
|
|
vmap <up> [egv
|
|
|
|
vmap <up> [egv
|
|
|
|
vmap <down> ]egv
|
|
|
|
vmap <down> ]egv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nmap <A-j> ]e
|
|
|
|
|
|
|
|
nmap <A-k> [e
|
|
|
|
|
|
|
|
vmap <A-j> ]egv
|
|
|
|
|
|
|
|
vmap <A-k> [egv
|
|
|
|
|
|
|
|
|
|
|
|
" fzf specific mappings
|
|
|
|
" fzf specific mappings
|
|
|
|
nnoremap <silent> <Leader>b :Buffer<CR>
|
|
|
|
nnoremap <silent> <Leader>b :Buffer<CR>
|
|
|
|
nnoremap <silent> <C-f> :Files<CR>
|
|
|
|
nnoremap <silent> <C-f> :Files<CR>
|
|
|
@ -279,6 +291,22 @@ nnoremap <F4> :UndotreeToggle<CR>
|
|
|
|
|
|
|
|
|
|
|
|
nmap <silent> <C-e> <Plug>(ale_next_wrap)
|
|
|
|
nmap <silent> <C-e> <Plug>(ale_next_wrap)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" lspconfig mappings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.set_loclist()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> <leader>f <cmd>lua vim.lsp.buf.formatting()<CR>
|
|
|
|
|
|
|
|
nnoremap <silent> <leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nnoremap <silent> <leader>a <cmd>lua vim.lsp.buf.code_action()<CR>
|
|
|
|
|
|
|
|
xmap <silent> <leader>a <cmd>lua vim.lsp.buf.range_code_action()<CR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
|
" VIMSCRIPT ----------------------------------------------------------------- {{{
|
|
|
|
" VIMSCRIPT ----------------------------------------------------------------- {{{
|
|
|
|