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 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') 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) -- cgit v1.2.3 From 361b6cd44adf12a9f2f36e4ac00bb373a7a5aae7 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 11 Feb 2020 14:09:38 +0000 Subject: Use master branch for iron --- bin/.local/bin/keyboard | 8 +++--- vim/.vimrc | 66 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 11 deletions(-) (limited to 'bin') diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index b7f5e90..ee1cc61 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -46,10 +46,10 @@ xmodmap -e "keycode any = space" xcape -e 'Super_L=space' # Make return (Control_R, Return) -xmodmap -e "keysym Return = Control_R" -xmodmap -e "add Control = Control_R" -xmodmap -e "keycode any = Return" -xcape -e 'Control_R=Return' +# xmodmap -e "keysym Return = Control_R" +# xmodmap -e "add Control = Control_R" +# xmodmap -e "keycode any = Return" +# xcape -e 'Control_R=Return' # Make eject an Insert xmodmap -e "keysym XF86Eject = Insert" diff --git a/vim/.vimrc b/vim/.vimrc index b4e5cea..a8bce6a 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -66,9 +66,12 @@ 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") @@ -76,7 +79,9 @@ if has("nvim") " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } " 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 @@ -139,11 +144,29 @@ nnoremap gh :set opfunc=Call_heytmuxg@ xnoremap gh :Heytmux! " Iron +if has("nvim") + let g:iron_map_defaults=0 + let g:iron_map_extended=0 + nmap yr (iron-send-motion) + xmap R (iron-send-motion) + 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 (iron-send-motion) -xmap R (iron-send-motion) -nmap yrr VR +endif " Easy align xmap ga (EasyAlign) @@ -168,6 +191,7 @@ if &runtimepath =~ 'remembrall' autocmd FileType tex nnoremap ,l Remembrall(',l') augroup END endif +let g:remembrall_suffixes = [""] " LanguageClient if executable('pyls') @@ -196,6 +220,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 @@ -303,6 +329,7 @@ set foldmethod=marker set hidden set ignorecase set lazyredraw +set laststatus=2 set mouse=a set nojoinspaces set nowrap @@ -576,10 +603,21 @@ function! FloatingFZF() \ } call nvim_open_win(buf, v:true, opts) + call setbufvar(buf, '&laststatus', '2') endfunction -" hi Pmenu ctermfg=3 ctermbg=239 -" let g:remembrall_window = 'call FloatingFZF()' +" 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({ @@ -592,6 +630,20 @@ endfunction " let g:lsp_config_sourced = 1 " endif +" lua < Remembrall('') +nnoremap h lua vim.lsp.buf.hover() +nnoremap a lua vim.lsp.buf.declaration() +nnoremap d lua vim.lsp.buf.definition() +nnoremap i lua vim.lsp.buf.implementation() +nnoremap s lua vim.lsp.buf.signature_help() +nnoremap t lua vim.lsp.buf.type_definition() " inoremap :call remembrall#remind('i', '') " nnoremap Remembrall('') -- cgit v1.2.3 From ebe9521c37b97959df974f8adeb4c7bfed0a527a Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 12:23:18 +0000 Subject: Fix i3 script --- bin/.local/bin/workspace | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index ad378ef..4f2ab67 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# List of workspaces +# List of workspaces: (id, number, name) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; - FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")" + FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $2, $4, $8, $11 + print $4, $6 + }' | sort) act_on_container() { -- cgit v1.2.3