diff options
author | Urbain Vaes <urbain@vaes.uk> | 2020-10-02 10:16:37 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2020-10-02 10:16:37 +0100 |
commit | 93eab33d13f8f30c8ba0088f20721d14c981fd16 (patch) | |
tree | 81625a57a7e915f3fe539fe3ccfd5bea3a7af22d /vim | |
parent | 60496da375fa7355a0f01d0e3dd6bf8afc46ffe5 (diff) | |
parent | 104ca1e11721518f9224527459e8506a858692c9 (diff) |
Merge branch 'master' of localhost:public/dotfiles into master
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vim/spell/en.utf-8.add | 1 | ||||
-rw-r--r-- | vim/.vimrc | 105 |
2 files changed, 94 insertions, 12 deletions
diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 999f578..ddbe70a 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -61,3 +61,4 @@ unitarily multimodal Kalman i.e. +Stratonovich @@ -66,17 +66,22 @@ Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' " Plug 'zchee/deoplete-clang' +Plug 'liuchengxu/vim-which-key' + if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' + Plug '~/dotfiles/plugins/darjeeling' endif if has("nvim") " Plug 'roxma/nvim-completion-manager' " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } - Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } + " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } " Plug 'zchee/deoplete-jedi' - Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } + " Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } + Plug 'hkupty/iron.nvim' + Plug 'neovim/nvim-lsp' else Plug 'Shougo/neocomplete.vim' endif @@ -91,17 +96,18 @@ Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' Plug 'joshdick/onedark.vim' " Plug 'josuegaleas/jay' + +" Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() "" Plugin configuration {{{1 " Toggles nnoremap cpg :GitGutterToggle<cr> -nnoremap cpr :IronRepl<cr> nnoremap cpn :NERDTreeToggle<cr> nnoremap cpt :TagbarToggle<cr> nnoremap cpu :GundoToggle<cr> -nnoremap <nowait> <expr> cp Remembrall('cp') +nnoremap <expr> cp Remembrall('cp') " Easy motion map gs <Plug>(easymotion-prefix) @@ -137,11 +143,31 @@ nnoremap <silent> gh :set opfunc=Call_heytmux<cr>g@ xnoremap <silent> gh :Heytmux!<cr> " Iron +if has("nvim") + let g:iron_map_defaults=0 + let g:iron_map_extended=0 + nnoremap cpr :IronRepl<cr> + nmap yr <Plug>(iron-send-motion) + xmap R <Plug>(iron-send-motion) + nmap yp <Plug>(iron-repeat-cmd) + nmap yrr VR + +lua << EOF +local iron = require("iron") + +local open_repl = function(buffer) + vim.api.nvim_command('vnew') +end + +iron.core.set_config{ + preferred = { + python = "ipython" + }, + repl_open_cmd = open_repl +} +EOF " let g:iron_repl_open_cmd = 'vsplit' -let g:iron_map_defaults=0 -nmap yr <Plug>(iron-send-motion) -xmap R <Plug>(iron-send-motion) -nmap yrr VR +endif " Easy align xmap ga <Plug>(EasyAlign) @@ -161,12 +187,12 @@ nnoremap ,pc :PlugClean<cr> if &runtimepath =~ 'remembrall' let g:remembrall_auto_accept = 0 nnoremap <buffer> <nowait> <expr> ,p Remembrall(',p') - nnoremap <silent> ,, :call remembrall#remind('n', '')<cr> - nnoremap <silent> y :<c-u>call remembrall#remind('n', 'y')<cr> + nnoremap <silent> <expr> ,, Remembrall('') augroup remembrall autocmd FileType tex nnoremap <buffer> <silent> <expr> ,l Remembrall(',l') augroup END endif +let g:remembrall_suffixes = [""] " LanguageClient if executable('pyls') @@ -195,6 +221,8 @@ let g:neomake_gcc_args=[ \ '-I.', '-I..', '-I../..' \ ] +let g:neomake_python_enabled_makers = ['python', 'pylint'] + " Deoplete let g:deoplete#enable_at_startup = 1 let g:deoplete#sources#jedi#show_docstring = 1 @@ -246,6 +274,7 @@ let g:vimtex_syntax_enabled=1 " Pilot let g:pilot_boundary='ignore' let g:pilot_mode='wintab' +" let g:pilot_split_or_new='new' " let g:pilot_key_h='<a-h>' " let g:pilot_key_j='<a-j>' " let g:pilot_key_k='<a-k>' @@ -302,6 +331,7 @@ set foldmethod=marker set hidden set ignorecase set lazyredraw +set laststatus=2 set mouse=a set nojoinspaces set nowrap @@ -352,7 +382,7 @@ nnoremap ,th :-tabmove<cr> nnoremap ,t0 :tabmove 0<cr> nnoremap ,t$ :tabmove<cr> -nnoremap <Leader>c :!rm ~/.vim/swap/\%*<cr> +nnoremap <Leader>c :call delete($HOME."/.vim/swap/".substitute(expand('%:p'), '/', '%', 'g').".swp")<cr> nnoremap <Leader>r :Start %:p<cr> nnoremap <Leader>R :Start! %:p<cr> @@ -408,6 +438,7 @@ nnoremap ,cl :set background=light<cr>:colorscheme solarized<cr> nnoremap ,cl :set background=dark<cr>:colorscheme solarized<cr> nnoremap ,cs :colorscheme seoul256<cr> nnoremap ,cn :colorscheme nord<cr> +set notermguicolors colo seoul256 "" Autocommands {{{1 @@ -557,9 +588,10 @@ nnoremap ,e :e **/*<C-z><S-Tab> let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_layout = { 'window': 'call FloatingFZF()' } +hi Pmenu ctermfg=3 ctermbg=239 function! FloatingFZF() let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&signcolumn', 'no') + call setbufvar(buf, '&laststatus', '1') let height = &lines - 10 let width = float2nr(&columns - (&columns * 2 / 10)) @@ -574,4 +606,53 @@ function! FloatingFZF() \ } call nvim_open_win(buf, v:true, opts) + call setbufvar(buf, '&laststatus', '2') endfunction + +" highlight default link LspDiagnosticsError Delimiter +" highlight default link LspDiagnosticsWarning Delimiter +" lua << EOF +" require'nvim_lsp'.pyls.setup{} +" EOF + +" Default Values: +" cmd = { "pyls" } +" filetypes = { "python" } +" log_level = 2 +" root_dir = vim's starting directory +" settings = {} + +" if !exists('g:lsp_config_sourced') +" call lsp#add_filetype_config({ +" \ 'filetype': 'python', +" \ 'name': 'pyls', +" \ 'cmd': 'pyls', +" \ 'callbacks': {} +" \ }) +" autocmd Filetype python setl omnifunc=lsp#omnifunc +" let g:lsp_config_sourced = 1 +" endif + +" lua <<EOF +" vim.lsp.start_client({"pyls"}) +" EOF +" nvim_lsp = require('nvim_lsp') +" print(nvim_lsp.skeleton) + +autocmd Filetype python setl omnifunc=v:lua.vim.lsp.omnifunc +nnoremap <expr> <c-g> Remembrall('<c-g>') +nnoremap <silent> <c-g>h <cmd>lua vim.lsp.buf.hover()<cr> +nnoremap <silent> <c-g>a <cmd>lua vim.lsp.buf.declaration()<cr> +nnoremap <silent> <c-g>d <cmd>lua vim.lsp.buf.definition()<cr> +nnoremap <silent> <c-g>i <cmd>lua vim.lsp.buf.implementation()<cr> +nnoremap <silent> <c-g>s <cmd>lua vim.lsp.buf.signature_help()<cr> +nnoremap <silent> <c-g>t <cmd>lua vim.lsp.buf.type_definition()<cr> + +" inoremap <c-g><esc>:call remembrall#remind('i', '<c-g>')<cr> +" nnoremap <expr> <c-g> Remembrall('<c-g>') +" nnoremap <c-g>h <esc>:call lsp#text_document_hover()<cr> +" nnoremap <c-g>a <esc>:call lsp#text_document_declaration()<cr> +" nnoremap <c-g>d <esc>:call lsp#text_document_definition()<cr> +" nnoremap <c-g>i <esc>:call lsp#text_document_implementation()<cr> +" nnoremap <c-g>s <esc>:call lsp#text_document_signature_help()<cr> +" nnoremap <c-g>t <esc>:call lsp#text_document_type_definition()<cr> |