Updates
This commit is contained in:
		
							parent
							
								
									b8e13b4e34
								
							
						
					
					
						commit
						d07f8f78e1
					
				| @ -0,0 +1,33 @@ | ||||
| if has('nvim') | ||||
| lua << EOF | ||||
| 	vim.diagnostic.config({ | ||||
| 	  virtual_text = false, | ||||
| 	  signs = true, | ||||
| 	  underline = true, | ||||
| 	  update_in_insert = false, | ||||
| 	  severity_sort = false, | ||||
| 	}) | ||||
| 
 | ||||
| vim.cmd('autocmd CursorHold * lua vim.diagnostic.open_float()') | ||||
| vim.o.updatetime = 300 | ||||
| 
 | ||||
| -- Show all diagnostics on current line in floating window | ||||
| --vim.api.nvim_set_keymap( | ||||
| --  'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>', | ||||
| --  { noremap = true, silent = true } | ||||
| --) | ||||
| -- Go to next diagnostic (if there are multiple on the same line, only shows | ||||
| -- one at a time in the floating window) | ||||
| --vim.api.nvim_set_keymap( | ||||
| --  'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>', | ||||
| --  { noremap = true, silent = true } | ||||
| --) | ||||
| -- Go to prev diagnostic (if there are multiple on the same line, only shows | ||||
| -- one at a time in the floating window) | ||||
| --vim.api.nvim_set_keymap( | ||||
| --  'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>', | ||||
| --  { noremap = true, silent = true } | ||||
| --) | ||||
| 
 | ||||
| EOF | ||||
| endif | ||||
| @ -1,69 +0,0 @@ | ||||
| " 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', | ||||
| \}) | ||||
| 
 | ||||
							
								
								
									
										102
									
								
								plugin/keys.vim
									
									
									
									
									
								
							
							
						
						
									
										102
									
								
								plugin/keys.vim
									
									
									
									
									
								
							| @ -29,6 +29,7 @@ noremap e j | ||||
| noremap o k | ||||
| noremap n h | ||||
| noremap i l | ||||
| vnoremap i l | ||||
| noremap k n | ||||
| noremap h e | ||||
| noremap l o | ||||
| @ -323,34 +324,56 @@ nnoremap <silent> <F4> :call ToggleLocList()<CR> | ||||
| 
 | ||||
| 
 | ||||
| " NERDTree | ||||
| if !exists('g:vscode') | ||||
| noremap <C-j> :NERDTreeToggle<CR> | ||||
| " noremap <C-B> :TagbarToggle<CR> | ||||
| inoremap <C-B> <C-O>:TagbarToggle<CR> | ||||
| endif | ||||
| 
 | ||||
| " vista | ||||
| nmap <F8> :Vista!!<CR> | ||||
| 
 | ||||
| " NERDComment | ||||
| if !exists('g:vscode') | ||||
| nnoremap <silent> <F10> :call NERDComment("n", "Toggle")<cr> | ||||
| vnoremap <silent> <F10> <ESC>:call NERDComment("v", "Toggle")<cr> | ||||
| endif | ||||
| 
 | ||||
| " YCM | ||||
| if !exists('g:vscode') | ||||
| nmap <C-F4> :YcmCompleter GoTo<CR>:wincmd o<CR> | ||||
| endif | ||||
| 
 | ||||
| " vim-clap | ||||
| nnoremap <leader>ag :Clap grep ++query=<cword><CR> | ||||
| " nnoremap <silent> <leader>tg :Clap proj_tags ++query=<cword><CR> | ||||
| nmap <C-f> :Clap files<CR> | ||||
| nmap <F1> :Clap tags<CR> | ||||
| nmap <F2> :Clap proj_tags<CR> | ||||
| nmap <C-b> :Clap buffers<CR> | ||||
| nnoremap <silent> <leader>tb :Clap generated_tags ++query=<cword><CR> | ||||
| if !exists('g:vscode') | ||||
| 	if has('nvim') | ||||
| 		nnoremap <leader>ag <cmd>lua require('telescope.builtin').live_grep({ default_text = vim.fn.expand("<cword>") })<cr> | ||||
| 		nnoremap <silent> <leader>tg <cmd>lua require('telescope.builtin').tags({ default_text = vim.fn.expand("<cword>") })<cr> | ||||
| 		nmap <C-f> :call ComIfGit('lua require("telescope.builtin").git_files()', 'lua require("telescope.builtin").find_files()')<CR> | ||||
| 		nmap <F1> <cmd>lua require('telescope.builtin').tags()<cr> | ||||
| 		nmap <C-b> <cmd>lua require('telescope.builtin').buffers()<cr> | ||||
| 		nmap <C-d> <cmd>lua require('telescope.builtin').diagnostics()<cr> | ||||
| 		nmap <C-l> <cmd>lua require('telescope.builtin').lsp_document_symbols()<cr> | ||||
| 		nnoremap <leader>ls <cmd>lua require('telescope.builtin').lsp_document_symbols({ default_text = vim.fn.expand("<cword>") })<cr> | ||||
| 	else | ||||
| 		nnoremap <leader>ag :Clap grep ++query=<cword><CR> | ||||
| 		nnoremap <leader>dg :Clap dumb_jump ++query=<cword><CR> | ||||
| 		" nnoremap <silent> <leader>tg :Clap proj_tags ++query=<cword><CR> | ||||
| 		nmap <C-f> :call ComIfGit('Clap gfiles', 'Clap files')<CR> | ||||
| 		nmap <F1> :Clap tags<CR> | ||||
| 		nmap <F2> :Clap proj_tags<CR> | ||||
| 		nmap <C-b> :Clap buffers<CR> | ||||
| 		nnoremap <silent> <leader>tb :Clap proj_tags ++query=<cword><CR> | ||||
| 	endif | ||||
| endif | ||||
| 
 | ||||
| " tags | ||||
| nnoremap <silent> <leader>tg :tag <C-R>=expand("<cword>")<CR><CR> | ||||
| nnoremap <silent> <leader>tp :ptag <C-R>=expand("<cword>")<CR><CR> | ||||
| nnoremap <silent> <leader>ts :ts <C-R>=expand("<cword>")<CR><CR> | ||||
| 
 | ||||
| " gitgutter | ||||
| if !exists('g:vscode') | ||||
| nmap <leader>ggt <Esc>:GitGutterToggle<CR> | ||||
| nmap <leader>nh <Plug>(GitGutterNextHunk) | ||||
| nmap <leader>bh <Plug>(GitGutterPrevHunk) | ||||
| @ -376,29 +399,54 @@ omap <leader>ic <Plug>(GitGutterTextObjectInnerPending) | ||||
| omap <leader>ac <Plug>(GitGutterTextObjectOuterPending) | ||||
| xmap <leader>ic <Plug>(GitGutterTextObjectInnerVisual) | ||||
| xmap <leader>ac <Plug>(GitGutterTextObjectOuterVisual) | ||||
| endif | ||||
| 
 | ||||
| " fastfold | ||||
| nmap zuz <Plug>(FastFoldUpdate) | ||||
| 
 | ||||
| "LanguageClient-neovim | ||||
| " Required for operations modifying multiple buffers like rename. | ||||
| set hidden | ||||
| nnoremap <leader>lc :call LanguageClient_contextMenu()<CR> | ||||
| " Or map each action separately | ||||
| nnoremap <silent> T :call LanguageClient#textDocument_hover()<CR> | ||||
| nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR> | ||||
| " nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR> | ||||
| " nnoremap <leader>ld :call LanguageClient#textDocument_definition()<CR> | ||||
| " nnoremap <leader>lr :call LanguageClient#textDocument_rename()<CR> | ||||
| " nnoremap <leader>lf :call LanguageClient#textDocument_formatting()<CR> | ||||
| " nnoremap <leader>lt :call LanguageClient#textDocument_typeDefinition()<CR> | ||||
| " nnoremap <leader>lx :call LanguageClient#textDocument_references()<CR> | ||||
| " nnoremap <leader>la :call LanguageClient_workspace_applyEdit()<CR> | ||||
| " nnoremap <leader>lc :call LanguageClient#textDocument_completion()<CR> | ||||
| " nnoremap <leader>lh :call LanguageClient#textDocument_hover()<CR> | ||||
| nnoremap <leader>la :call LanguageClient#textDocument_codeAction()<CR> | ||||
| nnoremap <leader>rn :call LanguageClient#textDocument_rename()<CR> | ||||
| if exists('g:vscode') | ||||
| nnoremap <silent> T :call VSCodeNotify('editor.action.showHover')<CR> | ||||
| nnoremap <silent> gd :call VSCodeNotify('editor.action.revealDefinition')<CR> | ||||
| 
 | ||||
| nnoremap ,g <Plug>(lcn-diagnostics-next) | ||||
| nnoremap .g <Plug>(lcn-diagnostics-prev) | ||||
| else | ||||
| 	if has('nvim') | ||||
| 		nnoremap <silent> T :lua vim.lsp.buf.hover()<CR> | ||||
| 		nnoremap <silent> gd :lua vim.lsp.buf.definition()<CR> | ||||
| 		nnoremap <leader>la :lua vim.lsp.buf.code_action()<CR> | ||||
| 		nnoremap <leader>rn :lua vim.lsp.buf.rename()<CR> | ||||
| 
 | ||||
| 		nnoremap <leader>ln <Plug>(lcn-diagnostics-next) | ||||
| 		nnoremap <leader>lp <Plug>(lcn-diagnostics-prev) | ||||
| 
 | ||||
| 		" Vim Script | ||||
| 		nnoremap <leader>xx <cmd>TroubleToggle<cr> | ||||
| 		nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr> | ||||
| 		nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr> | ||||
| 		nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr> | ||||
| 		nnoremap <leader>xl <cmd>TroubleToggle loclist<cr> | ||||
| 		nnoremap gR <cmd>TroubleToggle lsp_references<cr> | ||||
| 
 | ||||
| 	else | ||||
| 		"LanguageClient-neovim | ||||
| 		" Required for operations modifying multiple buffers like rename. | ||||
| 		set hidden | ||||
| 		nnoremap <leader>lc :call LanguageClient_contextMenu()<CR> | ||||
| 		" Or map each action separately | ||||
| 		nnoremap <silent> T :call LanguageClient#textDocument_hover()<CR> | ||||
| 		nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR> | ||||
| 		" nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR> | ||||
| 		" nnoremap <leader>ld :call LanguageClient#textDocument_definition()<CR> | ||||
| 		" nnoremap <leader>lr :call LanguageClient#textDocument_rename()<CR> | ||||
| 		" nnoremap <leader>lf :call LanguageClient#textDocument_formatting()<CR> | ||||
| 		" nnoremap <leader>lt :call LanguageClient#textDocument_typeDefinition()<CR> | ||||
| 		" nnoremap <leader>lx :call LanguageClient#textDocument_references()<CR> | ||||
| 		" nnoremap <leader>la :call LanguageClient_workspace_applyEdit()<CR> | ||||
| 		" nnoremap <leader>lc :call LanguageClient#textDocument_completion()<CR> | ||||
| 		" nnoremap <leader>lh :call LanguageClient#textDocument_hover()<CR> | ||||
| 		nnoremap <leader>la :call LanguageClient#textDocument_codeAction()<CR> | ||||
| 		nnoremap <leader>rn :call LanguageClient#textDocument_rename()<CR> | ||||
| 
 | ||||
| 		nnoremap <leader>ln <Plug>(lcn-diagnostics-next) | ||||
| 		nnoremap <leader>lp <Plug>(lcn-diagnostics-prev) | ||||
| 	endif | ||||
| endif | ||||
|  | ||||
							
								
								
									
										179
									
								
								plugins.toml
									
									
									
									
									
								
							
							
						
						
									
										179
									
								
								plugins.toml
									
									
									
									
									
								
							| @ -1,7 +1,56 @@ | ||||
| [[plugins]] | ||||
| repo = 'purescript-contrib/purescript-vim' | ||||
| [[plugins]] | ||||
| repo = 'PProvost/vim-ps1' | ||||
| [[plugins]] | ||||
| repo = 'nvim-lua/popup.nvim' | ||||
| on_if = 'has("nvim")' | ||||
| [[plugins]] | ||||
| repo = 'nvim-lua/plenary.nvim' | ||||
| on_if = 'has("nvim")' | ||||
| [[plugins]] | ||||
| repo = 'Twinside/vim-haskellFold' | ||||
| hook_post_source = ''' | ||||
| call SetHaskellFolding() | ||||
| ''' | ||||
| on_ft = ['haskell'] | ||||
| [[plugins]] | ||||
| repo = 'kana/vim-submode' | ||||
| hook_add = ''' | ||||
| " A message will appear in the message line when you're in a submode | ||||
| " and stay there until the mode has exited. | ||||
| let g:submode_always_show_submode = 1 | ||||
| 
 | ||||
| let g:submode_keep_leaving_key = 1 | ||||
| 
 | ||||
| let g:submode_timeout = 0 | ||||
| 
 | ||||
| " We're taking over the default <C-w> setting. Don't worry we'll do | ||||
| " our best to put back the default functionality. | ||||
| call submode#enter_with('nav', 'n', '', '<C-ENTER>') | ||||
| 
 | ||||
| call submode#map('nav', 'n', 's', 'e', ':normal! 6j<cr>') | ||||
| call submode#map('nav', 'n', 's', 'o', ':normal! 6k<cr>') | ||||
| call submode#map('nav', 'n', 's', ',', '<Cmd>normal! <C-d><CR>') | ||||
| call submode#map('nav', 'n', 's', '.', '<Cmd>normal! <C-u><CR>') | ||||
| call submode#map('nav', 'n', 's', ']', '<Cmd>normal! <C-b><CR>') | ||||
| call submode#map('nav', 'n', 's', '[', '<Cmd>normal! <C-f><CR>') | ||||
| call submode#map('nav', 'n', '', 'n', 'B') | ||||
| call submode#map('nav', 'n', '', 'i', 'W') | ||||
| call submode#map('nav', 'n', 's', '<ENTER>', ':tabprevious<cr>') | ||||
| call submode#map('nav', 'n', 's', '=', ':tabnext<cr>') | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'jparise/vim-graphql' | ||||
| [[plugins]] | ||||
| repo = 'mileszs/ack.vim' | ||||
| # [[plugins]] | ||||
| # repo = 'vim-scripts/cmdalias.vim' | ||||
| [[plugins]] | ||||
| repo = 'vim-scripts/cmdalias.vim' | ||||
| repo = 'easymotion/vim-easymotion' | ||||
| hook_add = ''' | ||||
| ''' | ||||
| [[plugins]] | ||||
| repo = 'Raimondi/delimitMate' | ||||
| hook_add = ''' | ||||
| @ -12,12 +61,14 @@ hook_add = ''' | ||||
| ''' | ||||
| [[plugins]] | ||||
| repo = 'vim-scripts/genindent.vim' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'scrooloose/nerdcommenter' | ||||
| hook_add = ''' | ||||
| 	let NERDSpaceDelims=1 | ||||
| 	let NERDCreateDefaultMappings=0 | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'scrooloose/nerdtree' | ||||
| on_event = 'NERDTreeToggle' | ||||
| @ -31,11 +82,17 @@ hook_add = ''' | ||||
| 	autocmd StdinReadPre * let s:std_in=1 | ||||
| 	autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'Xuyuanp/nerdtree-git-plugin' | ||||
| on_event = 'NERDTreeToggle' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'xolox/vim-easytags' | ||||
| hook_add = ''' | ||||
| 	let g:easytags_async = 1 | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'xolox/vim-misc' | ||||
| [[plugins]] | ||||
| @ -45,9 +102,14 @@ repo = 'Shougo/vimproc.vim' | ||||
| build = 'make' | ||||
| [[plugins]] | ||||
| repo = 'sjbach/lusty' | ||||
| hook_add = ''' | ||||
| let g:LustyExplorerSuppressRubyWarning = 1 | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'nixprime/cpsm' | ||||
| build = 'sh -c "PY3=ON ./install.sh"' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'liuchengxu/vista.vim' | ||||
| hook_add = ''' | ||||
| @ -57,11 +119,15 @@ hook_add = ''' | ||||
| 		  \ 'yaml': 'hasktags -x -o - -c', | ||||
| 		  \ } | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'sbdchd/neoformat' | ||||
| hook_add = ''' | ||||
| 	let g:neoformat_enabled_haskell = ['brittany'] | ||||
| 	let g:neoformat_enabled_typescript = ['prettier'] | ||||
|     let g:neoformat_try_node_exe = 1 | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'AndrewRadev/bufferize.vim' | ||||
| [[plugins]] | ||||
| @ -75,6 +141,7 @@ hook_add = ''' | ||||
| ''' | ||||
| [[plugins]] | ||||
| repo = 'tpope/vim-scriptease' | ||||
| on_if = '!has("nvim")' | ||||
| [[plugins]] | ||||
| repo = 'Konfekt/FastFold' | ||||
| hook_add = ''' | ||||
| @ -104,6 +171,7 @@ hook_add = ''' | ||||
| ''' | ||||
| [[plugins]] | ||||
| repo = 'hasufell/ghcup.vim' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'junegunn/vim-easy-align' | ||||
| [[plugins]] | ||||
| @ -139,12 +207,13 @@ hook_add = ''' | ||||
| 	let g:clap_layout = {'relative': 'editor', 'width': '95%', 'height': '33%', 'row': '33%', 'col': '5%'} | ||||
| 	let g:clap_use_pure_python = 1 | ||||
| 
 | ||||
| 	function! MultiGrep(...) abort | ||||
| 	function! MultiClap(com, ...) abort | ||||
| 	  let opts = map(copy(a:000), "printf('++query=%s', v:val)") | ||||
| 	  execute 'Clap grep' join(opts, ' ') | ||||
| 	  execute 'Clap ' a:com join(opts, ' ') | ||||
| 	endfunction | ||||
| 
 | ||||
| 	command! -nargs=* Rag call MultiGrep(<f-args>) | ||||
| 	command! -nargs=* Rag call MultiClap('grep', <f-args>) | ||||
| 	command! -nargs=* Dag call MultiClap('dumb_jump', <f-args>) | ||||
| 
 | ||||
| 	let g:clap_provider_generated_tags = { | ||||
| 	\ 'source': {-> Tags__source()}, | ||||
| @ -159,21 +228,30 @@ hook_add = ''' | ||||
| 	  " Let vim handle the tag | ||||
| 	  execute 'tag' split(a:line, '\t')[0] | ||||
| 	endfunc | ||||
| 
 | ||||
| 	cabbrev C Clap | ||||
| 	cabbrev c Clap | ||||
| 	cabbrev cp Clap proj_tags | ||||
| ''' | ||||
| on_if = '!has("nvim") && !exists("g:vscode")' | ||||
| 
 | ||||
| # scm | ||||
| [[plugins]] | ||||
| repo = 'tpope/vim-fugitive' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'tpope/vim-rhubarb' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'tommcdo/vim-fubitive' | ||||
| [[plugins]] | ||||
| on_if = '!exists("g:vscode")' | ||||
| repo = 'airblade/vim-gitgutter' | ||||
| hook_add = ''' | ||||
| 	" https://github.com/airblade/vim-gitgutter/issues/696 | ||||
| 	autocmd ColorScheme * highlight! link SignColumn LineNr | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| 
 | ||||
| # local vimrc | ||||
| [[plugins]] | ||||
| @ -212,7 +290,9 @@ repo = 'LucHermitte/local_vimrc' | ||||
| repo = 'Shougo/deoplete.nvim' | ||||
| hook_add = ''' | ||||
| 	let g:deoplete#enable_at_startup = 0 | ||||
| 	autocmd FileType TelescopePrompt call deoplete#custom#buffer_option('auto_complete', v:false) | ||||
| ''' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'roxma/nvim-yarp' | ||||
| on_if = '!has("nvim")' | ||||
| @ -224,16 +304,16 @@ on_if = '!has("nvim")' | ||||
| [[plugins]] | ||||
| repo = 'dense-analysis/ale' | ||||
| # build = 'bash -c "cp -R ~/.vim/ale_linters ."' | ||||
| on_ft = ['sh', 'vim'] | ||||
| hook_add = ''' | ||||
| 	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_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 | ||||
| ''' | ||||
| on_if = 'index(["sh", "vim"], &ft) >= 0 && !exists("g:vscode")' | ||||
| 
 | ||||
| # LSP | ||||
| [[plugins]] | ||||
| @ -290,10 +370,16 @@ hook_add = ''' | ||||
| 	let g:LanguageClient_loggingFile =  expand('~/LanguageClient.log') | ||||
| 	let g:LanguageClient_serverStderr = expand('~/LanguageServer.log') | ||||
| 
 | ||||
| 	let g:LanguageClient_rootMarkers = {'haskell': ['cabal.project', '*.cabal', 'stack.yaml'] } | ||||
| 	let g:LanguageClient_rootMarkers = { | ||||
| 		\ 'haskell': ['cabal.project', '*.cabal', 'stack.yaml'], | ||||
| 		\ 'elm': ['elm.json'] | ||||
| 		\ } | ||||
| 
 | ||||
| 	let g:LanguageClient_serverCommands = { | ||||
| 		\ 'haskell': ['haskell-language-server-wrapper', '--lsp', '--logfile', $HOME.'/hls-server.log'], | ||||
| 		\ 'purescript': ['~/.npm-modules/bin/purescript-language-server', '--stdio'], | ||||
| 		\ 'elm': ['elm-language-server'], | ||||
| 		\ 'typescript': ['typescript-language-server', '--stdio'] | ||||
| 		\ } | ||||
| ''' | ||||
| #[[plugins]] | ||||
| @ -337,7 +423,6 @@ hook_add = ''' | ||||
| # multi language | ||||
| [[plugins]] | ||||
| repo = 'luochen1990/rainbow' | ||||
| on_ft = ['clojure', 'haskell', 'python'] | ||||
| hook_add = ''' | ||||
| 	let g:rainbow_conf = { | ||||
| 	\	'guifgs': ['#DC322F', 'royalblue3', 'darkorange3', 'seagreen3'], | ||||
| @ -345,11 +430,11 @@ hook_add = ''' | ||||
| 	\} | ||||
| 	let g:rainbow_active = 1 | ||||
| ''' | ||||
| on_if = 'index(["clojure", "haskell", "python"], &ft) >= 0 && !exists("g:vscode")' | ||||
| 
 | ||||
| # haskell | ||||
| [[plugins]] | ||||
| repo = 'neovimhaskell/haskell-vim' | ||||
| on_ft = ['haskell', 'cabal'] | ||||
| hook_add = ''' | ||||
| 	let g:haskell_classic_highlighting = 1 | ||||
| 	let g:haskell_indent_disable = 1 | ||||
| @ -369,19 +454,20 @@ hook_add = ''' | ||||
| 	let g:haskell_indent_guard = 4 | ||||
| 	" let g:haskell_disable_TH = 1 | ||||
| ''' | ||||
| on_if = 'index(["haskell", "cabal"], &ft) >= 0 && !exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'Twinside/vim-hoogle' | ||||
| on_ft = ['haskell'] | ||||
| hook_source = ''' | ||||
| 	nnoremap <leader>ho :Hoogle<CR> | ||||
| 	nnoremap <leader>hc :HoogleClose<CR> | ||||
| ''' | ||||
| on_if = 'index(["haskell"], &ft) >= 0 && !exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'alx741/vim-stylishask' | ||||
| on_ft = ['haskell'] | ||||
| hook_add = ''' | ||||
| 	let g:stylishask_on_save = 0 | ||||
| ''' | ||||
| on_if = 'index(["haskell"], &ft) >= 0 && !exists("g:vscode")' | ||||
| 
 | ||||
| [[plugins]] | ||||
| repo = 'fatih/vim-go' | ||||
| @ -393,11 +479,6 @@ hook_post_source = 'GoInstallBinaries' | ||||
| repo = 'rust-lang/rust.vim' | ||||
| on_ft = ['rust'] | ||||
| 
 | ||||
| # javascript | ||||
| [[plugins]] | ||||
| repo = 'pangloss/vim-javascript' | ||||
| on_ft = ['javascript'] | ||||
| 
 | ||||
| # python | ||||
| [[plugins]] | ||||
| repo = 'python-mode/python-mode' | ||||
| @ -413,23 +494,35 @@ repo = 'manicmaniac/coconut.vim' | ||||
| on_ft = ['python'] | ||||
| [[plugins]] | ||||
| repo = 'alfredodeza/pytest.vim' | ||||
| on_ft = ['python'] | ||||
| on_if = 'index(["python"], &ft) >= 0 && !exists("g:vscode")' | ||||
| [[plugins]] | ||||
| repo = 'idanarye/vim-vebugger' | ||||
| on_ft = ['python'] | ||||
| on_if = 'index(["python"], &ft) >= 0 && !exists("g:vscode")' | ||||
| 
 | ||||
| # scala | ||||
| [[plugins]] | ||||
| repo = 'derekwyatt/vim-scala' | ||||
| on_ft = ['scala'] | ||||
| on_if = 'index(["scala"], &ft) >= 0 && !exists("g:vscode")' | ||||
| 
 | ||||
| # javascript | ||||
| [[plugins]] | ||||
| repo = 'pangloss/vim-javascript' | ||||
| on_ft = ['typescript', 'javascript'] | ||||
| [[plugins]] | ||||
| repo = 'MaxMEllon/vim-jsx-pretty' | ||||
| on_ft = ['typescript', 'javascript'] | ||||
| 
 | ||||
| # typescript | ||||
| [[plugins]] | ||||
| repo = 'leafgarland/typescript-vim' | ||||
| on_ft = ['typescript'] | ||||
| on_ft = ['typescript', 'javascript'] | ||||
| #[[plugins]] | ||||
| #repo = 'Quramy/tsuquyomi' | ||||
| #on_ft = ['typescript', 'javascript'] | ||||
| [[plugins]] | ||||
| repo = 'Quramy/tsuquyomi' | ||||
| on_ft = ['typescript'] | ||||
| repo = 'prettier/vim-prettier' | ||||
| on_ft = ['typescript', 'javascript'] | ||||
| build = 'npm install' | ||||
| 
 | ||||
| 
 | ||||
| # color and beauty | ||||
| @ -486,6 +579,7 @@ rtp = 'ScrollColor' | ||||
| name = 'bufonly' | ||||
| repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| rtp = 'bufonly' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| name = 'colorschemedgrade' | ||||
| repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| @ -503,10 +597,12 @@ on_if = '!has("nvim")' | ||||
| name = 'fuzzyfinder' | ||||
| repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| rtp = 'fuzzyfinder' | ||||
| on_if = '!exists("g:vscode")' | ||||
| [[plugins]] | ||||
| name = 'log' | ||||
| repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| rtp = 'log' | ||||
| on_if = '!exists("g:vscode")' | ||||
| #[[plugins]] | ||||
| #repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| #rtp = 'paredit' | ||||
| @ -517,3 +613,40 @@ rtp = 'log' | ||||
| name = 'txtfmt' | ||||
| repo = 'https://gogs.hasufell.de/hasufell/vim-unmanaged.git' | ||||
| rtp = 'txtfmt' | ||||
| on_if = '!exists("g:vscode")' | ||||
| 
 | ||||
| 
 | ||||
| [[plugins]] | ||||
| repo = 'neovim/nvim-lspconfig' | ||||
| hook_add = ''' | ||||
| lua require('lspconfig').hls.setup{} | ||||
| ''' | ||||
| on_if = 'has("nvim") && !exists("g:vscode")' | ||||
| lazy = false | ||||
| 
 | ||||
| [[plugins]] | ||||
| repo = 'kyazdani42/nvim-web-devicons' | ||||
| on_if = 'has("nvim") && !exists("g:vscode")' | ||||
| lazy = false | ||||
| 
 | ||||
| [[plugins]] | ||||
| repo = 'folke/trouble.nvim' | ||||
| hook_add = ''' | ||||
| lua << EOF | ||||
|   require("trouble").setup { | ||||
|     -- your configuration comes here | ||||
|     -- or leave it empty to use the default settings | ||||
|     -- refer to the configuration section below | ||||
| 	action_keys = { -- key mappings for actions in the trouble list | ||||
| 		jump_close = {"t"}, -- jump to the diagnostic and close the list | ||||
|     } | ||||
|   } | ||||
| EOF | ||||
| ''' | ||||
| lazy = false | ||||
| on_if = 'has("nvim") && !exists("g:vscode")' | ||||
| 
 | ||||
| [[plugins]] | ||||
| repo = 'nvim-telescope/telescope.nvim' | ||||
| lazy = false | ||||
| on_if = 'has("nvim") && !exists("g:vscode")' | ||||
|  | ||||
							
								
								
									
										34
									
								
								vimrc
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								vimrc
									
									
									
									
									
								
							| @ -7,11 +7,15 @@ let g:pymode_python = 'python3' | ||||
| 
 | ||||
| " plugin stuff | ||||
| filetype plugin on | ||||
| filetype indent on | ||||
| 
 | ||||
| set backspace=indent,eol,start " backspace through everything in insert mode | ||||
| set cmdheight=1 | ||||
| 
 | ||||
| " if has("gui_running") | ||||
| 	" autocmd GUIEnter * set vb t_vb= | ||||
| " endif | ||||
| set belloff=all | ||||
| 
 | ||||
| set wildmenu | ||||
| " set wildmode=longest,list,full | ||||
| 
 | ||||
| @ -27,7 +31,7 @@ let s:toml = $HOME . '/.vim/plugins.toml' | ||||
| " Required: | ||||
| if dein#load_state($HOME . '/.cache/dein') | ||||
|   call dein#begin($HOME . '/.cache/dein', [$HOME . '/.vim/vimrc', $HOME . '/.vim/plugins.toml']) | ||||
| 
 | ||||
|   call dein#add('wsdjeg/dein-ui.vim') | ||||
|   call dein#load_toml(s:toml) | ||||
| 
 | ||||
|   " Let dein manage dein | ||||
| @ -38,9 +42,11 @@ if dein#load_state($HOME . '/.cache/dein') | ||||
|   call dein#end() | ||||
|   call dein#save_state() | ||||
| endif | ||||
| filetype plugin indent on | ||||
| 
 | ||||
| " ===== further plugin initialization and default config ===== | ||||
| so ~/.vim/plugged/cmdalias.vim/plugin/cmdalias.vim | ||||
| so ~/.vim/autoload/log-autocmds.vim | ||||
| 
 | ||||
| " lustyexplorer | ||||
| set hidden | ||||
| @ -84,7 +90,7 @@ set mouse=a | ||||
| set autoread | ||||
| set number | ||||
| set encoding=utf8 | ||||
| set guifont=Monospace\ 14 | ||||
| set guifont=Hack\ Nerd\ Font\ Mono\ 16 | ||||
| set clipboard=unnamedplus | ||||
| set textwidth=0 | ||||
| set tabstop=4 | ||||
| @ -195,6 +201,14 @@ fun! StripTrailingWhitespaces() | ||||
|     call cursor(l, c) | ||||
| endfun | ||||
| 
 | ||||
| function! ComIfGit(com1, com2) | ||||
| 	silent! !git rev-parse --is-inside-work-tree | ||||
| 	if v:shell_error == 0 | ||||
| 	  execute a:com1 | ||||
| 	else | ||||
| 	  execute a:com2 | ||||
| 	endif | ||||
| endfunction | ||||
| 
 | ||||
| " =========================== | ||||
| 
 | ||||
| @ -251,4 +265,18 @@ function! ManCurrentWord() | ||||
|         exe '!man 3 ' . word | ||||
| endfunction | ||||
| 
 | ||||
| 
 | ||||
| """""""""""""""""""""""""""""" | ||||
| " Close preview after typing | ||||
| """""""""""""""""""""""""""""" | ||||
| autocmd WinEnter * call ClosePreviewWindow() | ||||
| function ClosePreviewWindow() | ||||
|     if getwinvar(winnr("#"), "&pvw") == 1 | ||||
|         pclose | ||||
|     endif | ||||
| endfunction | ||||
| 
 | ||||
| 
 | ||||
| set title | ||||
| 
 | ||||
| " vim:foldmethod=marker:foldlevel=0 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user