From 246f4416bc57abaa8653e43b319cc34036272166 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 16 Nov 2019 16:06:59 +0000 Subject: Add tentative lsp configuration --- bin/.local/bin/keyboard | 7 ++++--- i3/.config/i3/config | 3 +++ vim/.vimrc | 32 +++++++++++++++++++++++++++----- zsh/.zshenv | 3 +++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index b5d3900..b7f5e90 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -3,8 +3,9 @@ # Key repeat rate xset r rate 400 50 -# Xcape settings -killall -9 xcape +# Kill xcape +# ('pgrep -l xcape' can be used to list the processes) +pkill xcape # Compose key on left control # https://vi.stackexchange.com/questions/2254/what-is-the-easiest-way-to-insert-unicode-characters-into-a-document @@ -30,7 +31,7 @@ xcape -e 'Control_L=Escape' xmodmap -e "keysym Print = Print Caps_Lock" xmodmap -e "add Lock = Caps_Lock" -# Make Shift (Shift, :) +# Make Shift (Shift, :) (for vim) xcape -e 'Shift_L=Shift_L|semicolon' # Make Tab (Alt_L, Tab) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index dc439fc..28fd656 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -215,4 +215,7 @@ gaps outer 5 # Launch compositor exec compton +# Kill xcape if bug +bindsym $mod+F3 exec --no-startup-id killall -9 xcape + # vim:filetype=i3 diff --git a/vim/.vimrc b/vim/.vimrc index 9e65bc0..b1af11e 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -74,7 +74,7 @@ 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' } else @@ -91,6 +91,8 @@ 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 @@ -101,7 +103,7 @@ nnoremap cpr :IronRepl nnoremap cpn :NERDTreeToggle nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle -nnoremap cp Remembrall('cp') +nnoremap cp Remembrall('cp') " Easy motion map gs (easymotion-prefix) @@ -161,8 +163,7 @@ nnoremap ,pc :PlugClean if &runtimepath =~ 'remembrall' let g:remembrall_auto_accept = 0 nnoremap ,p Remembrall(',p') - nnoremap ,, :call remembrall#remind('n', '') - nnoremap y :call remembrall#remind('n', 'y') + nnoremap ,, Remembrall('') augroup remembrall autocmd FileType tex nnoremap ,l Remembrall(',l') augroup END @@ -352,7 +353,7 @@ nnoremap ,th :-tabmove nnoremap ,t0 :tabmove 0 nnoremap ,t$ :tabmove -nnoremap c :!rm ~/.vim/swap/\%* +nnoremap c :call delete($HOME."/.vim/swap/".substitute(expand('%:p'), '/', '%', 'g').".swp") nnoremap r :Start %:p nnoremap R :Start! %:p @@ -575,3 +576,24 @@ function! FloatingFZF() call nvim_open_win(buf, v:true, opts) endfunction + +" 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 + + +" inoremap :call remembrall#remind('i', '') +" nnoremap Remembrall('') +" nnoremap h :call lsp#text_document_hover() +" nnoremap a :call lsp#text_document_declaration() +" nnoremap d :call lsp#text_document_definition() +" nnoremap i :call lsp#text_document_implementation() +" nnoremap s :call lsp#text_document_signature_help() +" nnoremap t :call lsp#text_document_type_definition() diff --git a/zsh/.zshenv b/zsh/.zshenv index 7917e82..ae9fd6b 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -8,6 +8,9 @@ export -U PATH="/usr/local/sbin${PATH:+:}$PATH" export -U PATH="/usr/bin${PATH:+:}$PATH" export -U PATH="/usr/local/sbin:/usr/local/bin${PATH:+:}$PATH" +# Necessary for fenics to work +export PYTHONPATH="/usr/lib/python3.7/site-packages/:/usr/lib/python3.8/site-packages/" + if [[ -d "$HOME/.gem/ruby" ]]; then export -U PATH=$(echo "$HOME/.gem/ruby/"*"/bin")"${PATH:+:}$PATH" fi -- cgit v1.2.3