Initial commit
This commit is contained in:
8
after/ftplugin/c.vim
Normal file
8
after/ftplugin/c.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
let g:ale_linters = {'c':['clang']}
|
||||
"let g:ale_fixers = {
|
||||
" \ 'c': ['clang-format'],
|
||||
" \}
|
||||
let g:ale_c_clangformat_options = '-style=file'
|
||||
|
||||
let g:ycm_goto_buffer_command = 'same-buffer'
|
||||
|
||||
1
after/ftplugin/clojure.vim
Normal file
1
after/ftplugin/clojure.vim
Normal file
@@ -0,0 +1 @@
|
||||
call CmdAlias('Piggie','Piggieback (figwheel-sidecar.repl-api/repl-env)')
|
||||
67
after/ftplugin/go.vim
Normal file
67
after/ftplugin/go.vim
Normal file
@@ -0,0 +1,67 @@
|
||||
let g:tagbar_type_go = {
|
||||
\ 'ctagstype' : 'go',
|
||||
\ 'kinds' : [
|
||||
\ 'p:package',
|
||||
\ 'i:imports:1',
|
||||
\ 'c:constants',
|
||||
\ 'v:variables',
|
||||
\ 't:types',
|
||||
\ 'n:interfaces',
|
||||
\ 'w:fields',
|
||||
\ 'e:embedded',
|
||||
\ 'm:methods',
|
||||
\ 'r:constructor',
|
||||
\ 'f:functions'
|
||||
\ ],
|
||||
\ 'sro' : '.',
|
||||
\ 'kind2scope' : {
|
||||
\ 't' : 'ctype',
|
||||
\ 'n' : 'ntype'
|
||||
\ },
|
||||
\ 'scope2kind' : {
|
||||
\ 'ctype' : 't',
|
||||
\ 'ntype' : 'n'
|
||||
\ },
|
||||
\ 'ctagsbin' : 'gotags',
|
||||
\ 'ctagsargs' : '-sort -silent'
|
||||
\ }
|
||||
|
||||
|
||||
let g:go_auto_type_info = 0
|
||||
|
||||
|
||||
" mappings
|
||||
noremap <C-B> :TagbarToggle<CR>
|
||||
inoremap <C-B> <C-O>:TagbarToggle<CR>
|
||||
nmap <F3> :GoInfo<CR>
|
||||
|
||||
|
||||
function! MakePublic()
|
||||
let l:wordUnderCursor = expand('<cword>')
|
||||
let l:upperCaseWord = substitute(l:wordUnderCursor, '[A-Za-z]', '\\U&', '')
|
||||
execute 'GoRename ' l:upperCaseWord
|
||||
endfunction
|
||||
|
||||
|
||||
nmap <F6> :GoDocBrowser<CR><CR>
|
||||
nmap <F7> :GoDoc<CR>
|
||||
nmap <F8> :call MakePublic()<CR><CR>
|
||||
|
||||
|
||||
" ALE
|
||||
" let g:ale_linters = {'go':['gofmt', "go build"], 'c':['clang']}
|
||||
let g:ale_linters = {'go':['go build', 'gometalinter', 'gofmt'], 'c':['clang']}
|
||||
let g:ale_fixers = {
|
||||
\ 'go': ['gofmt', 'goimports'],
|
||||
\ 'c': ['clang-format'],
|
||||
\ 'cpp': ['clang-format'],
|
||||
\ 'js': ['eslint'],
|
||||
\ 'python': ['yapf'],
|
||||
\}
|
||||
let g:ale_go_gobuild_options = "-gcflags='-e'"
|
||||
let g:ale_go_gometalinter_options = '--fast'
|
||||
|
||||
" vim-go
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_space_tab_error = 1
|
||||
let g:go_highlight_chan_whitespace_error = 1
|
||||
98
after/ftplugin/haskell.vim
Normal file
98
after/ftplugin/haskell.vim
Normal file
@@ -0,0 +1,98 @@
|
||||
setlocal ts=2 sw=2 expandtab omnifunc=necoghc#omnifunc
|
||||
|
||||
"set background=light
|
||||
"set guifont=Neep\ Medium\ Semi-Condensed\ 18
|
||||
|
||||
let g:haskell_classic_highlighting = 1
|
||||
|
||||
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
||||
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
|
||||
call CmdAlias('hasktags', '!/home/jule/.cabal/bin/hasktags -c .<CR>')
|
||||
|
||||
|
||||
let g:necoghc_enable_detailed_browse = 1
|
||||
|
||||
" ALE
|
||||
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
|
||||
" let g:ale_fixers = {
|
||||
" \ 'go': ['gofmt', 'goimports'],
|
||||
" \}
|
||||
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
|
||||
|
||||
" neco-ghc
|
||||
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' : ['.']}
|
||||
|
||||
|
||||
function! HaskellDocCurrentWord()
|
||||
let word = expand("<cword>")
|
||||
exe "IDoc " . word
|
||||
endfunction
|
||||
|
||||
|
||||
" clear search
|
||||
nmap <F2> :noh<CR>:GhcModTypeClear<CR>
|
||||
imap <F2> <C-O>:noh<CR>:GhcModTypeClear<CR>
|
||||
|
||||
" unmap <F3>
|
||||
" unmap <F4>
|
||||
|
||||
nmap <F6> :GhcModType<CR>
|
||||
nmap <F8> :call HaskellDocCurrentWord()<CR><CR>
|
||||
|
||||
|
||||
nmap <silent> <F3> :silent update <bar> HsimportModule<CR>
|
||||
nmap <silent> <F4> :silent update <bar> HsimportSymbol<CR>
|
||||
|
||||
" haskell-vim
|
||||
|
||||
" let g:haskell_enable_quantification = 1
|
||||
" let g:haskell_enable_recursivedo = 1
|
||||
" let g:haskell_enable_arrowsyntax = 1
|
||||
" let g:haskell_enable_pattern_synonyms = 1
|
||||
" let g:haskell_enable_typeroles = 1
|
||||
|
||||
" let g:haskell_indent_if = 3
|
||||
" let g:haskell_indent_case = 5
|
||||
" let g:haskell_indent_let = 4
|
||||
" let g:haskell_indent_where = 6
|
||||
" let g:haskell_indent_do = 3
|
||||
" let g:haskell_indent_in = 1
|
||||
|
||||
|
||||
" liquid-types
|
||||
let g:vim_annotations_offset = '/.liquid/'
|
||||
|
||||
|
||||
" autocmd BufWritePost *.hs call s:check_and_lint()
|
||||
" function! s:check_and_lint()
|
||||
" let l:path = expand('%:p')
|
||||
" let l:qflist = ghcmod#make('check', l:path)
|
||||
" call extend(l:qflist, ghcmod#make('lint', l:path))
|
||||
" call setqflist(l:qflist)
|
||||
" cwindow
|
||||
" if empty(l:qflist)
|
||||
" echo "No errors found"
|
||||
" endif
|
||||
" endfunction
|
||||
|
||||
|
||||
" let g:deoplete#enable_at_startup = 1
|
||||
|
||||
" set hidden
|
||||
|
||||
" let g:LanguageClient_serverCommands = {
|
||||
" \ 'haskell': ['hie', '--lsp', '-d', '-l', '/home/hasufell/lang-server.log'],
|
||||
" \ }
|
||||
|
||||
" nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
|
||||
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
" nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
|
||||
" autocmd VimEnter * LanguageClientStart
|
||||
21
after/ftplugin/rust.vim
Normal file
21
after/ftplugin/rust.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
let g:rustfmt_autosave = 0
|
||||
|
||||
let g:tagbar_ctags_bin = '/usr/bin/universal-ctags'
|
||||
|
||||
let g:rust_doc#define_map_K = 0
|
||||
let g:rust_doc#downloaded_rust_doc_dir = '~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
|
||||
|
||||
function! s:search_under_cursor(query) range
|
||||
if a:query ==# ''
|
||||
echomsg "rust-doc: No identifier is found under the cursor"
|
||||
return
|
||||
endif
|
||||
|
||||
call rust_doc#open_fuzzy(a:query)
|
||||
endfunction
|
||||
|
||||
nnoremap <buffer><silent><F6> :<C-u>call <SID>search_under_cursor(expand('<cword>'))<CR>
|
||||
vnoremap <buffer><silent><F6> "gy:call <SID>search_under_cursor(getreg('g'))<CR>
|
||||
|
||||
|
||||
let g:ale_fixers = { }
|
||||
Reference in New Issue
Block a user