37 Commits

Author SHA1 Message Date
Julian Ospald
7efad8aba1 Try to fix clojurescript plugins 2018-09-17 15:44:46 +08:00
Julian Ospald
353281ff32 Enable vim-rainbow for haskell as well 2018-09-17 15:44:18 +08:00
Julian Ospald
649f4db641 Add neoformat 2018-09-17 15:42:18 +08:00
Julian Ospald
275a07bf4e Fix Rag and add <leader>ag shortcut 2018-08-19 14:15:09 +08:00
Julian Ospald
3adeb5e04e Utilize fzf tag jump too
* ctg -> create tags
* gd -> classic ctags jump
* tg -> fzf tags jump with list
2018-08-19 14:14:22 +08:00
Julian Ospald
77a5eb5742 Restructure colorschemes to bottom 2018-08-16 01:09:29 +08:00
Julian Ospald
e7c9a509c6 Add vim-code-dark VSCode like colorscheme 2018-08-16 01:09:19 +08:00
Julian Ospald
fcf39e4352 Use correct repo for cpsm 2018-08-16 01:08:36 +08:00
Julian Ospald
4eca702e94 Add Rag command for fzf 2018-08-16 00:19:38 +08:00
Julian Ospald
8ca26b851d Update vim-plug 2018-08-15 00:57:55 +08:00
Julian Ospald
841afeb278 Fix fzf 2018-08-15 00:57:32 +08:00
Julian Ospald
056d16651d Silence ATTENTION messages when swap file already exists 2018-08-14 23:55:58 +08:00
0b2a3aa3fc Use ctrlP caching 2018-08-13 20:36:02 +08:00
60ea3da091 Add fzf 2018-08-13 20:35:35 +08:00
5f149871f7 Add ctrlp 2018-08-12 17:41:31 +08:00
7a8a1f425f Unfuck haskell config for large projects 2018-08-04 19:42:36 +08:00
ea4275de9c Use stack for lushtags 2018-08-04 19:42:09 +08:00
728fc1cc94 Add custom snippets 2018-08-04 19:41:56 +08:00
cb32e85d5c Enable deoplete at startup 2018-08-04 19:41:47 +08:00
fd0ec0ec30 Disable sume clojure stuff 2018-08-04 19:41:12 +08:00
2f8ea2f5bc Disable liquidtypes 2018-07-08 16:56:34 +08:00
aa30843b94 Add hoogle support 2018-07-08 16:54:57 +08:00
9347f35352 Fix hasktags and hscope 2018-07-08 16:54:08 +08:00
6fb310f1f4 Use hie-wrapper 2018-07-03 18:27:21 +08:00
37f6c79332 Remove remnants of powerline 2018-06-27 12:04:03 +02:00
7e7201f6d7 Deoplete logging 2018-06-20 15:50:00 +02:00
2f0190fad6 Update argon 2018-06-20 15:49:50 +02:00
c58eab1c0e Brittany 2018-06-20 15:49:42 +02:00
c5c5364205 Style fix 2018-06-18 12:03:43 +02:00
23e2f09a8b Configure argon 2018-06-18 12:03:43 +02:00
901d336d82 Add argon ale linter and allow local linters 2018-06-18 12:03:43 +02:00
6b6c3628bb Fix cabal indenting 2018-06-18 12:03:43 +02:00
635cc5748c Allow textDocument_hover() in visual mode for LSP haskell 2018-06-16 15:54:56 +02:00
cf05781c02 Set <C-p> mapping for closing preview window 2018-06-16 15:54:34 +02:00
23abdd12ac Use vim-airline instead of powerline 2018-06-16 11:27:10 +02:00
b1e614cddc Add patch to fuzzyfinder 2018-06-16 11:26:55 +02:00
47a0889a7d Don't disable runtime snippets 2018-06-16 01:43:16 +02:00
11 changed files with 293 additions and 59 deletions

1
after/ftplugin/cabal.vim Normal file
View File

@@ -0,0 +1 @@
setlocal expandtab

View File

@@ -5,3 +5,6 @@ let g:rainbow_active = 1
let g:ScreenImpl = 'Tmux'
let g:sexp_enable_insert_mode_mappings = 0
" cljfmt
let g:clj_fmt_autosave = 0

View File

@@ -7,7 +7,47 @@ syntax on
filetype plugin indent on
call CmdAlias('hasktags', '!/home/jule/.cabal/bin/hasktags -c .<CR>')
" tags
call CmdAlias('hasktags', '!hasktags -c .<CR>')
" from
" https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/git-hscope
call CmdAlias('codex', 'call system("haskell-ctags")<CR><CR>call LoadHscope()<CR>')
map <leader>ctg :codex<CR>
set tags=tags;/,codex.tags;/
" classic ctags jump
nnoremap <leader>gd <C-]>
nnoremap <silent> <leader>cgd :cs find g <C-R>=expand("<cword>")<CR><CR>
nnoremap <silent> <C-\> :cs find c <C-R>=expand("<cword>")<CR><CR>
set cscopeprg=do_at_stack_root\ hscope
set csre
set csto=1 " search codex tags first
set nocst
" set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
function! LoadHscope()
set nocscopeverbose " suppress 'duplicate connection' error
let hsf = findfile("hscope.out", ".;")
if filereadable(hsf)
exe "cs add " . hsf
elseif $HSCOPE_DB != ""
cs add $HSCOPE_DB
endif
set cscopeverbose
endfunction
au BufEnter /*.hs call LoadHscope()
"hoogle
nnoremap <leader>ho :Hoogle<CR>
nnoremap <leader>hc :HoogleClose<CR>
" haskell-vim
@@ -58,43 +98,48 @@ let g:vim_annotations_offset = '/.liquid/'
" LSP
let g:LanguageClient_autoStart = 1
let g:LanguageClient_autoStart = 0
let g:LanguageClient_serverCommands = {
\ 'haskell': ['hie', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
\ 'haskell': ['hie-wrapper', '--lsp', '-d', '-l', $HOME.'/lang-server.log'],
\ }
" we use ALE instead
let g:LanguageClient_diagnosticsEnable = 0
nnoremap <leader>lc :call LanguageClient_contextMenu()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> <F8> :call LanguageClient#textDocument_rename()<CR>
vnoremap <silent> <C-F6> :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> <C-F8> :call LanguageClient#textDocument_rename()<CR>
" deoplete
call deoplete#custom#option('sources',{
\ '_': ['buffer'],
\ 'haskell': ['neosnippet', 'buffer', 'file', 'LanguageClient']
\ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
\ })
" \ 'haskell': ['neosnippet', 'buffer', 'file', 'neco-ghc']
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
call deoplete#enable()
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
" ALE
let g:ale_enabled = 1
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
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 = {
" \ 'go': ['gofmt', 'goimports'],
" \ 'haskell': ['brittany'],
" \}
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
let g:ale_haskell_argon_error_level = 14
let g:ale_haskell_argon_warn_level = 10
let g:ale_haskell_argon_info_level = 6
" completion
"
" neco-ghc
" let g:necoghc_enable_detailed_browse = 1
" let g:haskellmode_completion_ghc = 0
" let g:necoghc_enable_detailed_browse = 1
" autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
" let g:ycm_semantic_triggers = {'haskell' : ['.']}
@@ -130,10 +175,25 @@ nmap <F6> :GhcModType<CR>
" let g:intero_window_size = 15
" " Sets the intero window to split vertically; default is horizontal
" let g:intero_vertical_split = 1
" " let g:intero_vertical_split = 1
" " let g:intero_ghci_options = '-dynamic'
" " OPTIONAL: Make the update time shorter, so the type info will trigger faster.
" set updatetime=1000
let g:neoformat_enabled_haskell = ['brittany']
" rainbow
let g:rainbow_conf = {
\ 'guifgs': ['#DC322F', 'royalblue3', 'darkorange3', 'seagreen3'],
\ 'ctermfgs': ['lightred', 'lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
\}
" map <silent> <leader>t <Plug>InteroGenericType
" nnoremap <silent> <leader>jd :InteroGoToDef<CR>
" map <silent> <leader>T <Plug>InteroType
" nnoremap <silent> <leader>it :InteroTypeInsert<CR>
" nnoremap <leader>ist :InteroSetTargets<SPACE>
" endif

View File

@@ -0,0 +1,69 @@
" Author: Julian Ospald <hasufell@hasufell.de>
" Description: argon for Haskell files
call ale#Set('haskell_argon_executable', 'argon')
call ale#Set('haskell_argon_options', '')
call ale#Set('haskell_argon_error_level', 12)
call ale#Set('haskell_argon_warn_level', 8)
call ale#Set('haskell_argon_info_level', 4)
function! ale_linters#haskell#argon#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'haskell_argon_executable')
endfunction
function! ale_linters#haskell#argon#GetCommand(buffer) abort
return ale#Escape(ale_linters#haskell#argon#GetExecutable(a:buffer))
\ . ' '
\ . ale#Var(a:buffer, 'haskell_argon_options')
\ . ' -m ' . ale#Var(a:buffer, 'haskell_argon_info_level')
\ . ' -j'
\ . ' %t'
endfunction
function! ale_linters#haskell#argon#Handle(buffer, lines) abort
let l:output = []
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
if !has_key(l:error, 'blocks')
" this cannot be formatted properly into an ALE error
execute 'echom ''[argon] '' l:error.message'
return l:output
endif
for l:block in l:error.blocks
let l:complexity = l:block.complexity
if l:complexity >= ale#Var(a:buffer, 'haskell_argon_error_level')
let l:type = 'E'
let l:max_c = ale#Var(a:buffer, 'haskell_argon_error_level')
elseif l:complexity >= ale#Var(a:buffer, 'haskell_argon_warn_level')
let l:type = 'W'
let l:max_c = ale#Var(a:buffer, 'haskell_argon_warn_level')
else
let l:type = 'I'
let l:max_c = ale#Var(a:buffer, 'haskell_argon_info_level')
endif
call add(l:output, {
\ 'filename': l:error.path,
\ 'lnum': l:block.lineno,
\ 'col': l:block.col,
\ 'text': l:block.name . ': cyclomatic complexity of ' . l:complexity,
\ 'type': l:type,
\})
endfor
endfor
return l:output
endfunction
call ale#linter#Define('haskell', {
\ 'name': 'argon',
\ 'executable_callback': 'ale_linters#haskell#argon#GetExecutable',
\ 'command_callback': 'ale_linters#haskell#argon#GetCommand',
\ 'callback': 'ale_linters#haskell#argon#Handle',
\})

View File

@@ -96,7 +96,7 @@ let s:plug_src = 'https://github.com/junegunn/vim-plug.git'
let s:plug_tab = get(s:, 'plug_tab', -1)
let s:plug_buf = get(s:, 'plug_buf', -1)
let s:mac_gui = has('gui_macvim') && has('gui_running')
let s:is_win = has('win32') || has('win64')
let s:is_win = has('win32')
let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win)
let s:vim8 = has('patch-8.0.0039') && exists('*job_start')
let s:me = resolve(expand('<sfile>:p'))
@@ -763,6 +763,9 @@ function! s:prepare(...)
execute 'silent! unmap <buffer>' k
endfor
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell
if exists('+colorcolumn')
setlocal colorcolumn=
endif
setf vim-plug
if exists('g:syntax_on')
call s:syntax()
@@ -2426,8 +2429,13 @@ function! s:diff()
\ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : ''))
if cnts[0] || cnts[1]
nnoremap <silent> <buffer> <cr> :silent! call <SID>preview_commit()<cr>
nnoremap <silent> <buffer> o :silent! call <SID>preview_commit()<cr>
nnoremap <silent> <buffer> <plug>(plug-preview) :silent! call <SID>preview_commit()<cr>
if empty(maparg("\<cr>", 'n'))
nmap <buffer> <cr> <plug>(plug-preview)
endif
if empty(maparg('o', 'n'))
nmap <buffer> o <plug>(plug-preview)
endif
endif
if cnts[0]
nnoremap <silent> <buffer> X :call <SID>revert()<cr>

View File

@@ -0,0 +1,4 @@
snippet docsec
------------------------
--[ ${0:DOCUMENT SECTION} ]--
------------------------

View File

@@ -0,0 +1,2 @@
snippet tc
\textcolor{${1:red}}{${0}}

View File

@@ -37,6 +37,9 @@ noremap <leader>bd <Esc>:bd<CR>
noremap <leader>wc <Esc>:bd<CR>
noremap <leader>bo <Esc>:Bufonly<CR>
" close preview
nmap <C-p> :pc<CR>
" Remap window commands
" map <leader>ws <Esc>:wincmd s<CR>
" map <leader>wv <Esc>:wincmd v<CR>
@@ -150,3 +153,8 @@ inoremap <C-V> <C-O>:call Paste("i")<CR>
" select all
nnoremap <C-A> ggVG<CR>
inoremap <C-A> <C-O>:call Select()<CR>
" fzf
nnoremap <leader>ag :call fzf#vim#ag(expand('<cword>'), WithGitRoot())<CR>
nnoremap <leader>tg :call fzf#vim#tags(expand('<cword>'), {'options': '--exact --select-1 --exit-0'})<CR>

View File

@@ -706,6 +706,11 @@ let s:FUF_BUF_NAME = '[fuf]'
"
function s:activateFufBuffer()
" Save the last window number so we can switch back to it later (otherwise,
" at least with more recent versions of Vim, we end up with the top left
" window focused)
let s:fuf_buffer_last_winnr = winnr()
" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
" if 'autochdir' was set on.
lcd .
@@ -733,6 +738,7 @@ function s:deactivateFufBuffer()
AutoComplPopUnlock
endif
call l9#tempbuffer#close(s:FUF_BUF_NAME)
exec s:fuf_buffer_last_winnr . "wincmd w"
endfunction
" }}}1

View File

@@ -0,0 +1,36 @@
From fd41e8d68b6774324b58c02692b896a6a36a0397 Mon Sep 17 00:00:00 2001
From: David Wolever <david@wolever.net>
Date: Thu, 1 Jun 2017 10:11:43 -0400
Subject: [PATCH] Fix focus top left window bug
With newer versions of Vim, the top left window will be focused after
opening the fuf menu. This patch restores the window focus after the
menu is closed.
---
autoload/fuf.vim | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/autoload/fuf.vim b/autoload/fuf.vim
index fe9e6eb..78be490 100644
--- a/autoload/fuf.vim
+++ b/autoload/fuf.vim
@@ -706,6 +706,11 @@ let s:FUF_BUF_NAME = '[fuf]'
"
function s:activateFufBuffer()
+ " Save the last window number so we can switch back to it later (otherwise,
+ " at least with more recent versions of Vim, we end up with the top left
+ " window focused)
+ let s:fuf_buffer_last_winnr = winnr()
+
" lcd . : To avoid the strange behavior that unnamed buffer changes its cwd
" if 'autochdir' was set on.
lcd .
@@ -733,6 +738,7 @@ function s:deactivateFufBuffer()
AutoComplPopUnlock
endif
call l9#tempbuffer#close(s:FUF_BUF_NAME)
+ exec s:fuf_buffer_last_winnr . "wincmd w"
endfunction
" }}}1

125
vimrc
View File

@@ -1,5 +1,7 @@
" ===== hasufell's vimrc ))))
" no ATTENTION messages when swap file is already found
set shortmess+=A
" plugin stuff
filetype plugin on
@@ -11,47 +13,33 @@ filetype indent on
call plug#begin('~/.vim/plugged')
Plug 'mileszs/ack.vim'
Plug 'romainl/Apprentice'
Plug 'chriskempson/base16-vim'
Plug 'fneu/breezy'
Plug 'vim-scripts/cmdalias.vim'
Plug 'Raimondi/delimitMate'
Plug 'romainl/Disciple'
Plug 'vim-scripts/genindent.vim'
Plug 'sjl/gundo.vim'
Plug 'idris-hackers/idris-vim'
Plug 'wimstefan/Lightning'
Plug 'yegappan/mru'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'NLKNguyen/papercolor-theme'
Plug 'vim-scripts/promela.vim'
Plug 'AndrewRadev/simple_bookmarks.vim'
Plug 'Keithbsmiley/swift.vim'
Plug 'majutsushi/tagbar'
Plug 'ternjs/tern_for_vim'
Plug 'flazz/vim-colorschemes'
Plug 'reedes/vim-colors-pencil'
Plug 'altercation/vim-colors-solarized'
Plug 'xolox/vim-easytags'
Plug 'tpope/vim-fugitive'
Plug 'whatyouhide/vim-gotham'
Plug 'noahfrederick/vim-hemisu'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'xolox/vim-misc'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'tpope/vim-rhubarb'
Plug 'sjbach/lusty'
if has("nvim")
Plug 'iCyMind/NeoSolarized'
Plug 'vim-airline/vim-airline'
else
Plug 'powerline/powerline', {
\ 'branch': 'develop',
\ 'do': 'python3 setup.py install --user',
\ 'rtp': 'powerline/bindings/vim',
\ }
endif
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'kien/ctrlp.vim'
Plug 'nixprime/cpsm', { 'do': 'PY3=ON ./install.sh' }
Plug 'junegunn/fzf', { 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'sbdchd/neoformat'
" local_vimrc
Plug 'LucHermitte/lh-vim-lib'
@@ -81,43 +69,47 @@ Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
" (Optional) Multi-entry selection UI.
Plug 'junegunn/fzf', { 'for': 'haskell' }
" linting/compilation
Plug 'w0rp/ale'
Plug 'w0rp/ale', {
\ 'do': 'bash -c \"cp -R ~/.vim/ale_linters .\"',
\ }
" haskell
" if has("nvim")
" Plug 'parsonsmatt/intero-neovim'
" endif
Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
" Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
" completion based on ghc-mod, not LSP
" Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'lukerandall/haskellmode-vim', { 'for': 'haskell' }
Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' }
Plug 'neovimhaskell/haskell-vim', { 'for': ['haskell', 'cabal'] }
" Plug 'ucsd-progsys/liquid-types.vim', { 'for': 'haskell' }
Plug 'bitc/lushtags', {
\ 'do': 'bash -c \"cabal clean && cabal sandbox delete && cabal sandbox init && cabal install && cp .cabal-sandbox/bin/lushtags ~/.cabal/bin/lushtags\"',
\ 'do': 'bash -c \"stack install\"',
\ 'for': 'haskell',
\ }
" Plug 'timmytofu/vim-cabal-context', { 'for': 'haskell' }
Plug 'itchyny/vim-haskell-indent', { 'for': 'haskell' }
Plug 'dan-t/vim-hsimport', { 'for': 'haskell' }
Plug 'Twinside/vim-hoogle', { 'for': 'haskell' }
" clojure
" Plug '~/.vim/unmanaged-vim-plug/paredit', { 'for': 'clojure' }
" Plug '~/.vim/unmanaged-vim-plug/tslime', { 'for': 'clojure' }
Plug 'guns/vim-slamhound', {'for': 'clojure'}
Plug 'guns/vim-sexp', {'for': 'clojure'}
Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
Plug 'kovisoft/paredit', {'for': 'clojure'}
" Plug 'guns/vim-slamhound', {'for': 'clojure'}
" Plug 'guns/vim-sexp', {'for': 'clojure'}
" Plug 'tpope/vim-sexp-mappings-for-regular-people', {'for': 'clojure'}
" Plug 'kovisoft/paredit', {'for': 'clojure'}
Plug 'luochen1990/rainbow', { 'for': ['clojure', 'haskell'] }
" Plug 'typedclojure/vim-typedclojure', {'for': 'clojure'}
" heavy clojurescript
" Plug 'tpope/vim-classpath', { 'for': 'clojure' }
Plug 'guns/vim-clojure-static', { 'for': 'clojure' }
Plug 'tpope/vim-salve', { 'for': 'clojure' }
Plug 'tpope/vim-projectionist', { 'for': 'clojure' }
Plug 'tpope/vim-dispatch', { 'for': 'clojure' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'luochen1990/rainbow', { 'for': 'clojure' }
Plug 'typedclojure/vim-typedclojure', {'for': 'clojure'}
Plug 'venantius/vim-cljfmt', {'for': 'clojure'}
" go
@@ -138,6 +130,23 @@ Plug 'icedwater/vimpython', { 'for': 'python' }
" scala
Plug 'derekwyatt/vim-scala', { 'for': 'scala' }
" color and beauty
Plug 'tomasiser/vim-code-dark'
Plug 'romainl/Apprentice'
Plug 'chriskempson/base16-vim'
Plug 'fneu/breezy'
Plug 'romainl/Disciple'
Plug 'wimstefan/Lightning'
Plug 'NLKNguyen/papercolor-theme'
Plug 'flazz/vim-colorschemes'
Plug 'altercation/vim-colors-solarized'
Plug 'reedes/vim-colors-pencil'
Plug 'whatyouhide/vim-gotham'
if has("nvim")
Plug 'iCyMind/NeoSolarized'
endif
Plug 'noahfrederick/vim-hemisu'
" unmanaged
Plug '~/.vim/unmanaged-vim-plug/bufonly'
Plug '~/.vim/unmanaged-vim-plug/colorschemedegrade'
@@ -160,12 +169,6 @@ so ~/.vim/plugged/cmdalias.vim/plugin/cmdalias.vim
if !has("nvim")
"powerline
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
set laststatus=2
" lj
let g:LustyJugglerSuppressRubyWarning = 1
endif
@@ -192,14 +195,22 @@ if has('conceal')
endif
" Enable snipMate compatibility feature.
let g:neosnippet#enable_snipmate_compatibility = 1
let g:neosnippet#disable_runtime_snippets = 1
let g:neosnippet#snippets_directory='~/.vim/custom-snippets'
" rainbow
let g:rainbow_active = 1
" vim airline
" let g:airline#extensions#tabline#enabled = 1
" LSP
let g:LanguageClient_autoStart = 0
" deoplete
let g:deoplete#enable_at_startup = 0
let g:deoplete#enable_at_startup = 1
" ==== delimitMate ====
let g:delimitMate_matchpairs = "(:),[:],{:}"
@@ -252,6 +263,32 @@ let NERDCreateDefaultMappings=0
let g:haddock_browser='/usr/bin/firefox'
let g:haddock_browser_callformat='%s file://%s >/dev/null 2>&1 &'
" ctrlp
let g:ctrlp_user_command = 'fd --type f --color=never "" %s'
let g:ctrlp_use_caching = 1
let g:ctrlp_match_func = { 'match': 'cpsm#CtrlPMatch' }
" fzf
" --column: Show column number
" --line-number: Show line number
" --no-heading: Do not show file headings in results
" --fixed-strings: Search term as a literal string
" --ignore-case: Case insensitive search
" --no-ignore: Do not respect .gitignore, etc...
" --hidden: Search hidden files and folders
" --follow: Follow symlinks
" --glob: Additional conditions for search (in this case ignore everything in the .git/ folder)
" --color: Search color options
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
function! WithGitRoot()
let groot = systemlist('git -C ' . expand('%:p:h') . ' rev-parse --show-toplevel')[0]
return v:shell_error ? {} : {'dir': groot}
endfunction
command! -nargs=* Rag
\ call fzf#vim#ag(<q-args>, WithGitRoot())
" ==== conque ====
" command aliases
@@ -294,7 +331,7 @@ vnoremap x "_x
nnoremap x "_x
" Syntax
syntax enable
syntax on
" pane navigation
" Use ctrl-[hjkl] to select the active split!