diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-20 13:57:02 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-09-20 13:57:02 +0200 |
commit | f154d3f778214e5cca7f2e6fb9412184b57edf04 (patch) | |
tree | 072ec5bf989c2328944414e7708ba5ae9671a8ed /stow | |
parent | 26fdb2bcb24881a4c3ab6a1859bdcb9b646aa876 (diff) | |
download | configs-f154d3f778214e5cca7f2e6fb9412184b57edf04.tar.gz configs-f154d3f778214e5cca7f2e6fb9412184b57edf04.zip |
Changes mostly to vim, trying neovim LSP.
Diffstat (limited to 'stow')
-rw-r--r-- | stow/nvim/.config/nvim/ftplugin/python/python.vim | 17 | ||||
-rw-r--r-- | stow/nvim/.config/nvim/ftplugin/sh/sh.vim | 16 | ||||
-rw-r--r-- | stow/nvim/.config/nvim/init.vim | 28 | ||||
-rw-r--r-- | stow/qutebrowser/.config/qutebrowser/config.py | 5 | ||||
-rw-r--r-- | stow/rcs/.bash_vars | 7 | ||||
-rw-r--r-- | stow/sxhkd/.config/sxhkd/sxhkdrc | 8 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/python/python.vim | 15 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/sh.vim | 3 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/snippets/template.txt | 18 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/tex/tex.vim | 5 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim | 2 | ||||
-rw-r--r-- | stow/vim/.vim/rc/color.vim | 1 | ||||
-rw-r--r-- | stow/vim/.vim/rc/vimwiki.vim | 29 | ||||
-rw-r--r-- | stow/vim/.vimrc | 9 |
14 files changed, 133 insertions, 30 deletions
diff --git a/stow/nvim/.config/nvim/ftplugin/python/python.vim b/stow/nvim/.config/nvim/ftplugin/python/python.vim new file mode 100644 index 0000000..9e56582 --- /dev/null +++ b/stow/nvim/.config/nvim/ftplugin/python/python.vim @@ -0,0 +1,17 @@ +let mapleader = " " + +nnoremap <buffer> K :lua vim.lsp.buf.hover()<CR> +nnoremap <buffer><silent> gd :lua vim.lsp.buf.definition()<CR> +nnoremap <buffer> gr :lua vim.lsp.buf.references()<CR> +nnoremap <buffer> gR :lua vim.lsp.buf.rename()<CR> +nnoremap <buffer> <leader>e :lua vim.diagnostic.open_float()<CR> +nnoremap <buffer> <leader>E :lua vim.diagnostic.setloclist()<CR> +nnoremap <buffer> [e :lua vim.diagnostic.goto_prev({float=false})<CR> +nnoremap <buffer> ]e :lua vim.diagnostic.goto_next({float=false})<CR> +nnoremap <buffer> <leader>a :lua vim.lsp.buf.code_action()<CR> +nnoremap <buffer> <leader>ds :lua vim.lsp.buf.document_symbol()<CR> + +let mapleader = "," + +setlocal omnifunc=v:lua.vim.lsp.omnifunc +setlocal formatexpr=v:lua.vim.lsp.formatexpr() diff --git a/stow/nvim/.config/nvim/ftplugin/sh/sh.vim b/stow/nvim/.config/nvim/ftplugin/sh/sh.vim new file mode 100644 index 0000000..ca7a246 --- /dev/null +++ b/stow/nvim/.config/nvim/ftplugin/sh/sh.vim @@ -0,0 +1,16 @@ +let mapleader = " " + +nnoremap <buffer> K :lua vim.lsp.buf.hover()<CR> +nnoremap <buffer><silent> gd :lua vim.lsp.buf.definition()<CR> +nnoremap <buffer> gr :lua vim.lsp.buf.references()<CR> +nnoremap <buffer> gR :lua vim.lsp.buf.rename()<CR> +nnoremap <buffer> <leader>e :lua vim.diagnostic.open_float()<CR> +nnoremap <buffer> <leader>E :lua vim.diagnostic.setloclist()<CR> +nnoremap <buffer> [e :lua vim.diagnostic.goto_prev({float=false})<CR> +nnoremap <buffer> ]e :lua vim.diagnostic.goto_next({float=false})<CR> +nnoremap <buffer> <leader>ds :lua vim.lsp.buf.document_symbol()<CR> + +let mapleader = "," + +setlocal omnifunc=v:lua.vim.lsp.omnifunc +setlocal formatexpr=v:lua.vim.lsp.formatexpr() diff --git a/stow/nvim/.config/nvim/init.vim b/stow/nvim/.config/nvim/init.vim index f182e5b..f5360b1 100644 --- a/stow/nvim/.config/nvim/init.vim +++ b/stow/nvim/.config/nvim/init.vim @@ -1,3 +1,31 @@ set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath source ~/.vimrc + +sign define DiagnosticSignError text= texthl= linehl= numhl=DiagnosticSignError +sign define DiagnosticSignWarn text= texthl= linehl= numhl=DiagnosticSignWarn +sign define DiagnosticSignInfo text= texthl= linehl= numhl=DiagnosticSignInfo +sign define DiagnosticSignHint text= texthl= linehl= numhl=DiagnosticSignHint + +lua vim.diagnostic.config({ + \virtual_text = true, + \signs = true, underline = true, + \update_in_insert = + \true, severity_sort = true +\}) + +lua require('lspconfig').bashls.setup{} + +lua require('lspconfig').texlab.setup{} + +lua require('lspconfig').pylsp.setup{ + \settings = { + \pylsp = { + \plugins = { + \pycodestyle = { + \maxLineLength = 90 + \} + \} + \} + \} +\} diff --git a/stow/qutebrowser/.config/qutebrowser/config.py b/stow/qutebrowser/.config/qutebrowser/config.py index 7eb1365..2e0d422 100644 --- a/stow/qutebrowser/.config/qutebrowser/config.py +++ b/stow/qutebrowser/.config/qutebrowser/config.py @@ -1394,7 +1394,10 @@ c.url.searchengines = { 'keys': 'https://keys.openpgp.org/search?q={}', # openPGP keys 'fl': 'https://fallenlondon.wiki/w/index.php?search={}', # Fallen London wiki 'gt': 'https://translate.google.com/?sl=en&tl=es&text={}', # Google Translate - 'tiempo': 'https://www.eltiempo.es/{}.html', # eltiempo.es + 't': 'https://simplytranslate.org/?engine=google&text={}&sl=auto&tl=es', # SimplyTranslate + 'te': 'https://simplytranslate.org/?engine=google&text={}&sl=auto&tl=en', # SimplyTranslate to English + 'tiempo': 'https://www.eltiempo.es/{}.html', # eltiempo.es, + 'dq': 'https://dream-quest.fandom.com/wiki/{}', # Dream Quest 'wb': 'https://wiby.me/?q={}' # Wiby } diff --git a/stow/rcs/.bash_vars b/stow/rcs/.bash_vars index a73a118..40b751e 100644 --- a/stow/rcs/.bash_vars +++ b/stow/rcs/.bash_vars @@ -29,7 +29,10 @@ export CONFIG_DIC_ES="/usr/share/dict/spanish" export CONFIG_DIC_EN="/usr/share/dict/british" export CONFIG_DIC_PL="/usr/share/dict/słowa.txt" -export CONFIG_FOLDER_RANDOMBG="$HOME/images/wallpapers/shufs/current" +export CONFIG_FOLDER_RANDOMWP="$HOME/images/wallpapers/shufs/current" +export CONFIG_WPLIST="$HOME/.local/share/wpHistory.dat" +export CONFIG_WPPOINTER="/tmp/wppointer" + export CONFIG_FOLDER_LOGS="$HOME/logs" export CONFIG_WIFI_DEV="wlp2s0" @@ -65,7 +68,7 @@ export LESS_TERMCAP_ue=$'\E[0m' # Set LS_COLORS (enable color support of ls and others) if [ -x /usr/bin/dircolors ]; then dircolorsFile="$HOME/.config/dircolors" - [ -r "$dircolorsFile" ] && + [ -r "$dircolorsFile" ] && eval "$(dircolors -b $dircolorsFile)" || eval "$(dircolors -b)" fi diff --git a/stow/sxhkd/.config/sxhkd/sxhkdrc b/stow/sxhkd/.config/sxhkd/sxhkdrc index 5556aa9..7f3f786 100644 --- a/stow/sxhkd/.config/sxhkd/sxhkdrc +++ b/stow/sxhkd/.config/sxhkd/sxhkdrc @@ -74,12 +74,12 @@ super + q super + shift + f firefox -# super + shift + w -# prevBG - super + w setRandomBG.sh +super + ctrl + w; {n,p,o} + wpPointer.sh -{n,p,o} + Print screenshot.sh @@ -101,7 +101,7 @@ super + shift + c super + d dmenuDic.sh -super + shift + t +super + t dmenutranslate # Emoji keyboard diff --git a/stow/vim/.vim/ftplugin/python/python.vim b/stow/vim/.vim/ftplugin/python/python.vim index 0aeff8c..dab8c22 100644 --- a/stow/vim/.vim/ftplugin/python/python.vim +++ b/stow/vim/.vim/ftplugin/python/python.vim @@ -10,21 +10,20 @@ setlocal list call matchadd('ColorColumn', '\%91v', 100) setlocal textwidth=90 -let b:ale_python_pylint_options = '-d invalid-name' -let b:ale_fixers = ['yapf'] +"let b:ale_python_pylint_options = '-d invalid-name' +"let b:ale_fixers = ['yapf'] " Mappings let mapleader = " " nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/python/python.vim<CR> -nnoremap <buffer> <leader>x :! ./% -nnoremap <buffer> <leader>X :! ./%<CR> +nnoremap <buffer> <leader>x :w<CR>:!./%<Space> +nnoremap <buffer> <leader>X :w<CR>:!./%<CR> -nnoremap <buffer> gd <Plug>(coc-definition) -nnoremap <buffer> gy <Plug>(coc-type-definition) -nnoremap <buffer> gi <Plug>(coc-implementation) -nnoremap <buffer> gr <Plug>(coc-references) +"nnoremap <buffer> gd <Plug>(coc-definition) +"nnoremap <buffer> gy <Plug>(coc-type-definition) +"nnoremap <buffer> gr <Plug>(coc-references) nnoremap <buffer> <leader>s oimport pdb<Enter>pdb.set_trace()<Esc>2k nnoremap <buffer> <leader>db :!tmux split-window -l '40\%' 'python -m̀ pdb %' diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim index cc52e08..58d39fe 100644 --- a/stow/vim/.vim/ftplugin/sh/sh.vim +++ b/stow/vim/.vim/ftplugin/sh/sh.vim @@ -11,13 +11,12 @@ setlocal textwidth=110 let mapleader = " " nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/sh/sh.vim<CR><CR> -nnoremap <buffer> <leader>sh :read ~/.vim/ftplugin/sh/snippets/template.txt<CR><CR> nnoremap <buffer> <leader>+x :!chmod 744 %<CR><CR> nnoremap <buffer> <leader>x :w<CR>:!./%<Space> nnoremap <buffer> <leader>X :w<CR>:!./%<CR><CR> -nnoremap <buffer> <leader>e :Errors<CR> let mapleader = "," +inoremap <buffer> <leader>sh <Esc>:read ~/.vim/ftplugin/sh/snippets/template.txt<CR><CR> inoremap <buffer> <leader>if <Esc>:read ~/.vim/ftplugin/sh/snippets/if.txt<CR>kdd/<+++><CR>cf> inoremap <buffer> <leader>case <Esc>:read ~/.vim/ftplugin/sh/snippets/case.txt<CR>kdd/<+++><CR>cf> diff --git a/stow/vim/.vim/ftplugin/sh/snippets/template.txt b/stow/vim/.vim/ftplugin/sh/snippets/template.txt index 64d3a2e..171dcf8 100644 --- a/stow/vim/.vim/ftplugin/sh/snippets/template.txt +++ b/stow/vim/.vim/ftplugin/sh/snippets/template.txt @@ -4,7 +4,15 @@ # # Usage: template.sh [-ac] [-b OPTARG] FILE... -usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..." +usageMessage="Usage: ${0} [-ac] [-b OPTARG] FILE..." + +error() { + printf '%s error: %s\n' "$0" "$*" >&2 +} + +errorAndUsage() { + printf '%s error: %s\n%s\n' "$0" "$*" "$usageMessage" >&2 +} # Process options while getopts ':ab:c' opt; do @@ -15,7 +23,7 @@ while getopts ':ab:c' opt; do ;; 'b' ) - echo b $OPTARG + echo b "$OPTARG" ;; 'c' ) @@ -23,11 +31,9 @@ while getopts ':ab:c' opt; do ;; '?' ) - printf "${usageMessage}\n" + printf '%s\n' "$usageMessage" exit 1 esac done -shift $(($OPTIND - 1)) - -<++> +shift $((OPTIND - 1)) diff --git a/stow/vim/.vim/ftplugin/tex/tex.vim b/stow/vim/.vim/ftplugin/tex/tex.vim index 87f3c88..f84f73e 100644 --- a/stow/vim/.vim/ftplugin/tex/tex.vim +++ b/stow/vim/.vim/ftplugin/tex/tex.vim @@ -6,10 +6,15 @@ call matchadd('ColorColumn', '\%91v', 100) setlocal textwidth=80 +setlocal omnifunc=v:lua.vim.lsp.omnifunc +setlocal formatexpr=v:lua.vim.lsp.formatexpr() + let mapleader = " " nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/tex/tex.vim<CR> nnoremap <buffer> <leader>e :Errors<CR> +nnoremap <buffer> K :lua vim.lsp.buf.hover()<CR> +nnoremap <buffer> gd :lua vim.lsp.buf.definition()<CR> " proselint not enabled by default (it's slow) "nnoremap <buffer> <leader>sp :SyntasticCheck proselint<CR> diff --git a/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim index d51844b..3a6a661 100644 --- a/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim +++ b/stow/vim/.vim/ftplugin/vimwiki/vimwiki.vim @@ -20,8 +20,6 @@ highlight Title ctermfg=blue highlight TitleHash ctermfg=cyan match TitleHash /^##*/ -setlocal conceallevel=0 - let mapleader = " " nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/vimwiki/vimwiki.vim<CR> diff --git a/stow/vim/.vim/rc/color.vim b/stow/vim/.vim/rc/color.vim index ea8bf0e..ec18335 100644 --- a/stow/vim/.vim/rc/color.vim +++ b/stow/vim/.vim/rc/color.vim @@ -25,6 +25,7 @@ highlight MatchParen ctermbg=cyan ctermfg=black " Errors colors highlight Error ctermbg=red ctermfg=black +highlight ErrorMsg ctermbg=red ctermfg=black highlight SpellBad ctermbg=red ctermfg=black " Comments colors diff --git a/stow/vim/.vim/rc/vimwiki.vim b/stow/vim/.vim/rc/vimwiki.vim index e31d2da..c46f815 100644 --- a/stow/vim/.vim/rc/vimwiki.vim +++ b/stow/vim/.vim/rc/vimwiki.vim @@ -2,6 +2,33 @@ Plug 'vimwiki/vimwiki' " For vimwiki " filetype plugin on + +" Register relationships of extensions to syntaxes let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} -let g:vimwiki_list = [{'path': '~/docs/notas/', 'syntax': 'markdown', 'ext': '.md'}, + +let g:vimwiki_list = [{'path': '~/docs/notas/', 'syntax': 'markdown', 'ext': '.md', 'diary_rel_path': 'diario/', 'diary_index': 'index'}, \ {'path': '~/docs/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] + +let g:vimwiki_conceallevel = 1 + +" Treat files with registered extensions as vimwiki +let g:vimwiki_global_ext = 1 + +" Symbols to show progression of list items +let g:vimwiki_listsyms = ' .oOX' + +" Append wiki file extension to links in Markdown +let g:vimwiki_markdown_link_ext = 1 + +" Perform an :lcd to the wiki's root folder on page opening +let g:vimwiki_auto_chdir = 1 + +" Automatically generate a level 1 header when creating a new wiki page +let g:vimwiki_auto_header = 1 + +let g:vimwiki_diary_months = { + \ 1: 'Enero', 2: 'Febrero', 3: 'Marzo', + \ 4: 'Abril', 5: 'Mayo', 6: 'Junio', + \ 7: 'Julio', 8: 'Agosto', 9: 'Septiembre', + \ 10: 'Octubre', 11: 'Noviembre', 12: 'Diciembre' +\ } diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc index db8302a..9ef44be 100644 --- a/stow/vim/.vimrc +++ b/stow/vim/.vimrc @@ -15,18 +15,16 @@ source ~/.vim/rc/git.vim call plug#begin('~/.vim/plugged') "Update with PlugInstall Plug 'PotatoesMaster/i3-vim-syntax' +Plug 'dylanaraps/wal.vim' Plug 'arcticicestudio/nord-vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' "Plug 'psliwka/vim-smoothie' -Plug 'dylanaraps/wal.vim' +Plug 'neovim/nvim-lspconfig' source ~/.vim/rc/goyo.vim source ~/.vim/rc/fzf.vim source ~/.vim/rc/vimwiki.vim source ~/.vim/rc/airline.vim -source ~/.vim/rc/nvim-jdtls.vim -"source ~/.vim/rc/ale.vim -source ~/.vim/rc/coc.vim call plug#end() @@ -36,4 +34,7 @@ call plug#end() "source ~/.vim/rc/omnisharp.vim "source ~/.vim/rc/syntastic.vim "source ~/.vim/rc/deoplete.vim +"source ~/.vim/rc/ale.vim +"source ~/.vim/rc/coc.vim "source ~/.vim/rc/youCompleteMe.vim +"source ~/.vim/rc/nvim-jdtls.vim |