diff --git a/plugin/keys.vim b/plugin/keys.vim index a6b962f..0cdc6d0 100644 --- a/plugin/keys.vim +++ b/plugin/keys.vim @@ -3,6 +3,12 @@ let g:mapleader = ' ' inoremap +nnoremap :tabprevious +nnoremap :tabnext + +noremap gT +noremap gt + " nnoremap tk T @@ -271,7 +277,7 @@ nnoremap " write noremap :w -inoremap :w +inoremap :w " exit noremap :qa! @@ -335,9 +341,10 @@ nmap :YcmCompleter GoTo:wincmd o nnoremap ag :Clap grep ++query= " nnoremap tg :Clap proj_tags ++query= nmap :Clap files -nmap :Clap tags +nmap :Clap tags +nmap :Clap proj_tags nmap :Clap buffers -nnoremap tb :Clap tags ++query= +nnoremap tb :Clap generated_tags ++query= nnoremap tg :tag =expand("") nnoremap tp :ptag =expand("") diff --git a/plugins.toml b/plugins.toml index bc63f7b..bc81a20 100644 --- a/plugins.toml +++ b/plugins.toml @@ -126,9 +126,39 @@ repo = 'kshenoy/vim-signature' repo = 'liuchengxu/vim-clap' build = 'make' hook_add = ''' - command -nargs=* Rag Clap grep ++query= + autocmd Filetype clap_input inoremap =clap#navigation#scroll('down') + autocmd Filetype clap_input inoremap =clap#navigation#scroll('up') + autocmd Filetype clap_input nnoremap =clap#navigation#scroll('down') + autocmd Filetype clap_input nnoremap =clap#navigation#scroll('up') + + let g:clap_popup_move_manager = { + \ "\": "\", + \ "\": "\", + \ } + let g:clap_layout = {'relative': 'editor', 'width': '95%', 'height': '33%', 'row': '33%', 'col': '5%'} let g:clap_use_pure_python = 1 + + function! MultiGrep(...) abort + let opts = map(copy(a:000), "printf('++query=%s', v:val)") + execute 'Clap grep' join(opts, ' ') + endfunction + + command! -nargs=* Rag call MultiGrep() + + let g:clap_provider_generated_tags = { + \ 'source': {-> Tags__source()}, + \ 'sink': {line -> Tags__sink(line)}, + \} + + function! Tags__source () + return flatten(map(tagfiles(), {_, file -> filter(readfile(file), 'stridx(v:val, "!_TAG") != 0')})) + endfunc + + function! Tags__sink (line) + " Let vim handle the tag + execute 'tag' split(a:line, '\t')[0] + endfunc ''' # scm @@ -192,17 +222,14 @@ on_if = '!has("nvim")' # linting/compilation [[plugins]] -repo = 'w0rp/ale' -build = 'bash -c "cp -R ~/.vim/ale_linters ."' +repo = 'dense-analysis/ale' +# build = 'bash -c "cp -R ~/.vim/ale_linters ."' on_ft = ['sh', 'vim'] hook_add = ''' - let g:ale_enabled = 0 - let g:ale_linters = {'haskell':[], 'c':['clang']} - " let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']} - " let g:ale_fixers = { - " \ 'haskell': ['brittany'], - " \} - let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'" + let g:ale_enabled = 1 + let g:ale_haskell_hie_executable = $HOME . '/.ghcup/bin/haskell-language-server-wrapper' + let g:ale_linters = {'haskell':['hie'], 'c':[]} + let g:ale_linters_explicit = 1 let g:ale_haskell_argon_error_level = 14 let g:ale_haskell_argon_warn_level = 10 let g:ale_haskell_argon_info_level = 6 @@ -325,7 +352,7 @@ repo = 'neovimhaskell/haskell-vim' on_ft = ['haskell', 'cabal'] hook_add = ''' let g:haskell_classic_highlighting = 1 - let g:haskell_indent_disable = 0 + let g:haskell_indent_disable = 1 " let g:haskell_enable_quantification = 1 " let g:haskell_enable_recursivedo = 1 " let g:haskell_enable_arrowsyntax = 1 @@ -345,7 +372,7 @@ hook_add = ''' [[plugins]] repo = 'Twinside/vim-hoogle' on_ft = ['haskell'] -hook_add = ''' +hook_source = ''' nnoremap ho :Hoogle nnoremap hc :HoogleClose ''' @@ -466,7 +493,7 @@ rtp = 'colorschemedegrade' [[plugins]] name = 'exheres-syntax' repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' -rtp = 'exheres-syntax-20160116' +rtp = 'exheres-syntax-20160115' [[plugins]] name = 'fontzoom' repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git'