diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/ale_linters/tex/textidote.vim | 32 | ||||
-rw-r--r-- | .config/nvim/init.vim | 20 | ||||
m--------- | .config/nvim/pack/plugins/start/gitsigns.nvim | 0 | ||||
m--------- | .config/nvim/pack/plugins/start/my-quicktex-keywords | 0 | ||||
m--------- | .config/nvim/pack/plugins/start/vimtex | 0 |
5 files changed, 48 insertions, 4 deletions
diff --git a/.config/nvim/ale_linters/tex/textidote.vim b/.config/nvim/ale_linters/tex/textidote.vim new file mode 100644 index 0000000..9640ef4 --- /dev/null +++ b/.config/nvim/ale_linters/tex/textidote.vim @@ -0,0 +1,32 @@ +" Author: Jordi Altayo <jordiag@kth.se> +" Description: support for textidote grammar and syntax checker + +call ale#Set('tex_textidote_executable', 'textidote') +call ale#Set('tex_textidote_options', '') + +function! ale_linters#tex#textidote#Handle(buffer, lines) abort + let l:pattern = '.*' . expand('%:t:r') . '\.tex(L\(\d\+\)C\(\d\+\)-L\d\+C\d\+): \(.*\)".*"' + let l:output = [] + + for l:match in ale#util#GetMatches(a:lines, l:pattern) + call add(l:output, { + \ 'lnum': l:match[1] + 0, + \ 'col' : l:match[2] + 0, + \ 'text': l:match[3], + \ 'type': 'E', + \}) + endfor + + return l:output +endfunction + +function! ale_linters#tex#textidote#GetCommand(buffer) abort + return '%e --no-color --output singleline' . ale#Pad(ale#Var(a:buffer, 'tex_textidote_options')) . ale#Pad('%s') +endfunction + +call ale#linter#Define('tex', { +\ 'name': 'textidote', +\ 'executable': {b -> ale#Var(b, 'tex_textidote_executable')}, +\ 'command': function('ale_linters#tex#textidote#GetCommand'), +\ 'callback': 'ale_linters#tex#textidote#Handle', +\}) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index db5ff31..a0395e3 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -19,6 +19,8 @@ set shiftwidth=2 set softtabstop=2 set expandtab +set clipboard=unnamed + " Filter the command history without leaving the home row (PV34) cnoremap <C-p> <Up> cnoremap <C-n> <Down> @@ -38,6 +40,7 @@ augroup END set spelllang=en_gb +set wildcharm=<C-Z> let mapleader = ' ' autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=250} @@ -68,11 +71,14 @@ nmap <leader>i <Plug>(ale_info) nmap <silent> <C-k> <Plug>(ale_previous_wrap) nmap <silent> <C-j> <Plug>(ale_next_wrap) let g:ale_linters = { + \ 'PKGBUILD' : ['shellcheck'], + \ 'lua' : ['luacheck', 'lua_language_server'], \ 'sh' : ['shellcheck'], - \ 'text' : ['cspell', 'languagetool'], + \ 'text' : ['cspell', 'languagetool'], \ 'yaml' : ['yamllint'], \} let g:ale_fixers = { + \ '*' : ['remove_trailing_lines', 'trim_whitespace'], \ 'css' : ['prettier'], \ 'html' : ['prettier'], \ 'javascript' : ['prettier'], @@ -88,14 +94,13 @@ let g:ale_markdown_markdownlint_options = '--disable MD025 --' let g:ale_tex_chktex_options = '-I -n1 -n3 -n24' " VimTeX does '-n1 -n3 -n8 -n25 -n36' let g:ale_sh_shfmt_options = '--indent 2 --case-indent --binary-next-line' -set omnifunc=ale#completion#OmniFunc - " ----- Gitsigns ----- lua require('gitsigns').setup() " ----- QuickTex ----- let g:quicktex_usedefault = 0 -let g:quicktex_excludechar = ['\$', '(', ')', '\[', ']', '{', '}', '\.', ',', ':', ';', '-', '+', '*', '"'] +let g:quicktex_excludechar = ['\$', '(', ')', '\[', ']', '{', '}', '\.', ',', ':', ';', '-', '+', '*', '"', ''''] +nmap <leader>g :GenerateQuicktexDictionaries<CR> " ----- Vifm ----- nmap <leader>f :Vifm<CR> @@ -103,9 +108,16 @@ nmap <leader>f :Vifm<CR> " ----- VimTeX ----- nmap <leader>c <Plug>(vimtex-compile) nmap <leader>v <Plug>(vimtex-view) +nmap <leader>t <Plug>(vimtex-toc-toggle) let g:vimtex_view_method = 'zathura' let g:vimtex_quickfix_open_on_warning = 0 let g:vimtex_indent_enabled = 0 let g:vimtex_indent_on_ampersands = 0 + "\ 'lt_directory' : '~/code/LanguageTool-6.0/', +let g:vimtex_grammar_vlty = { + \ 'lt_command' : 'languagetool', + \ 'shell_options' : '--equation-punctuation display', + \ 'show_suggestions' : '1', + \} " vim: ft=vim diff --git a/.config/nvim/pack/plugins/start/gitsigns.nvim b/.config/nvim/pack/plugins/start/gitsigns.nvim -Subproject d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa +Subproject bdeba1cec3faddd89146690c10b9a87949c0ee6 diff --git a/.config/nvim/pack/plugins/start/my-quicktex-keywords b/.config/nvim/pack/plugins/start/my-quicktex-keywords -Subproject 6007ece6a7d712e091fef5a62985b3291748953 +Subproject f41c8124953f118f945f42de7a1b7b4b407a06a diff --git a/.config/nvim/pack/plugins/start/vimtex b/.config/nvim/pack/plugins/start/vimtex -Subproject 6179414f2eb3db977a513b7b19c23e7e62a0f38 +Subproject f9b19d09ee6f0ba70dad0b5c2e710dd70068100 |