aboutsummaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc46
1 files changed, 42 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 3dea6be..dc7631f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -100,6 +100,8 @@ call plug#begin()
"Plug 'vim-scripts/AutoComplPop'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
+Plug 'ycm-core/YouCompleteMe'
+Plug 'airblade/vim-tailwind'
Plug 'lambdalisue/fern.vim'
Plug 'junegunn/goyo.vim'
Plug 'sheerun/vim-polyglot'
@@ -118,8 +120,44 @@ Plug 'honza/vim-snippets'
Plug 'dense-analysis/ale'
call plug#end()
+" vim-tailwind
+function! s:is_tailwind()
+ return !empty(findfile('tailwind.config.js', '.;')) ||
+ \ !empty(findfile('theme/static_src/tailwind.config.js', '.;'))
+endfunction
+
+nmap <silent> <buffer> gk <Plug>(tailwind-lookup)
+
+autocmd BufEnter *.html,*.slim if s:is_tailwind() |
+ \ setlocal omnifunc=tailwind#Complete |
+ \ endif
+
+" YCM
+let g:ycm_enable_inlay_hints = 1
+nnoremap <silent> <localleader>h <Plug>(YCMToggleInlayHints)
+nnoremap gd :YcmCompleter GoToDefinition<CR>
+nnoremap <leader>gr :YcmCompleter GoToReferences<CR>
+nnoremap K :YcmCompleter GetDoc<CR>
+" this will disable tab, allowing it to be used for ultisnips
+let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
+let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
+let g:ycm_python_interpreter_path = '.venv/bin/python3'
+let g:ycm_auto_trigger = 0
+let g:ycm_python_sys_path = []
+let g:ycm_show_diagnostics_ui = 1
+let g:ycm_extra_conf_vim_data = [
+ \ 'g:ycm_python_interpreter_path',
+ \ 'g:ycm_python_sys_path'
+ \]
+"let g:ycm_global_ycm_extra_conf = '~/.global_extra_conf.py'
+nnoremap <leader>jd :YcmCompleter GoTo<CR>
+imap <silent> <C-l> <Plug>(YCMToggleSignatureHelp)'.
+
+
+let g:ycm_enable_inlay_hints = 1
+
" ALE ale config
-let g:ale_enabled = 0
+let g:ale_enabled = 1
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_sign_error = '✘'
let g:ale_sign_warning = '⚠'
@@ -137,7 +175,7 @@ let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%linter% - %code: %%s'
let g:ale_loclist_msg_format = '%linter% - %code: %%s'
let g:ale_echo_msg_warning_str = 'Warning'
-let g:ale_linters = {'python': ['flake8', 'mypy'],
+let g:ale_linters = {'python': ['pyright', 'flake8', 'mypy'],
\ 'ocaml': ['merlin'],
\ 'cpp': ['clang'],
\ 'yaml': ['yamllint'],
@@ -145,7 +183,7 @@ let g:ale_linters = {'python': ['flake8', 'mypy'],
\ 'go': ['gopls', 'golint', 'gofmt'],
\}
let g:ale_fixers = {
-\ 'python': ['isort', 'yapf', 'black'],
+\ 'python': ['autoimport', 'isort', 'yapf', 'black'],
\ 'go': ['gofmt'],
\ 'rust': ['rustfmt']
\ }
@@ -198,7 +236,7 @@ nmap <silent> ts :TestSuite<CR>
nmap <silent> tl :TestLast<CR>
nmap <silent> <leader>tv :TestVisit<CR>
let test#strategy = "basic"
-let test#python#pytest#options = '-q -s'
+let test#python#pytest#options = '-q -s -n2'
let test#python#runner = 'pytest'
let test#vimterminal#term_position = "belowright"