Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
913e4e88d4 | |||
69446e5a1e | |||
a77f8c0e28 | |||
cfd2f9f786 | |||
7db485bfaa | |||
a4ac2e3d6d | |||
1a312c5d4c | |||
3fb065daab | |||
b220a50fb7 | |||
67b87ba774 | |||
a490cd6df0 | |||
977652c7ad | |||
486e4676a4 | |||
56a65256cd | |||
c9b54a08f2 | |||
36f4b9ee14 | |||
d3ab3269c0 | |||
5129092c6f | |||
a7b2eb2d40 | |||
76b7c9e988 | |||
6e713c1dec | |||
fb3eb54de8 | |||
a34ebb1abf | |||
e022a99f6d | |||
53f8aa0777 | |||
e25f1cd821 | |||
92c3763cad | |||
4003559a71 | |||
d885c98032 | |||
0040059b60 | |||
777215e213 | |||
f2a0e722a6 | |||
5da8df7b7e | |||
90a23b7842 | |||
452b296a5b | |||
bb04dd5300 | |||
02051bb50d | |||
03b9070a25 | |||
d64e9940da | |||
d104fbc8ef | |||
480c29d0ef | |||
68ce86d1ed | |||
43b557c76b | |||
579823514f | |||
5215d0f1af | |||
84c1fc4e6e | |||
09a7e959fd | |||
eb683ef97e | |||
8111516a70 | |||
64edc2c7c1 |
109
.gitmodules
vendored
Normal file
109
.gitmodules
vendored
Normal file
|
@ -0,0 +1,109 @@
|
|||
[submodule "pack/vendor/start/fzf"]
|
||||
path = pack/vendor/start/fzf
|
||||
url = https://github.com/junegunn/fzf
|
||||
[submodule "pack/vendor/start/fzf.vim"]
|
||||
path = pack/vendor/start/fzf.vim
|
||||
url = https://github.com/junegunn/fzf.vim
|
||||
[submodule "pack/vendor/start/vim-poweryank"]
|
||||
path = pack/vendor/start/vim-poweryank
|
||||
url = https://github.com/haya14busa/vim-poweryank
|
||||
[submodule "pack/vendor/start/undotree"]
|
||||
path = pack/vendor/start/undotree
|
||||
url = https://github.com/mbbill/undotree
|
||||
[submodule "pack/vendor/start/powerline"]
|
||||
path = pack/vendor/start/powerline
|
||||
url = https://github.com/powerline/powerline
|
||||
[submodule "pack/vendor/start/vim-fetch"]
|
||||
path = pack/vendor/start/vim-fetch
|
||||
url = https://github.com/wsdjeg/vim-fetch
|
||||
[submodule "pack/vendor/start/vim-eunuch"]
|
||||
path = pack/vendor/start/vim-eunuch
|
||||
url = https://github.com/tpope/vim-eunuch
|
||||
[submodule "pack/vendor/start/vim-commentary"]
|
||||
path = pack/vendor/start/vim-commentary
|
||||
url = https://github.com/tpope/vim-commentary
|
||||
[submodule "pack/vendor/start/vim-rooter"]
|
||||
path = pack/vendor/start/vim-rooter
|
||||
url = https://github.com/airblade/vim-rooter
|
||||
[submodule "pack/vendor/start/nerdtree"]
|
||||
path = pack/vendor/start/nerdtree
|
||||
url = https://github.com/scrooloose/nerdtree
|
||||
[submodule "pack/vendor/start/vim-mucomplete"]
|
||||
path = pack/vendor/start/vim-mucomplete
|
||||
url = https://github.com/lifepillar/vim-mucomplete
|
||||
[submodule "pack/vendor/start/nerdtree-git-plugin"]
|
||||
path = pack/vendor/start/nerdtree-git-plugin
|
||||
url = https://github.com/Xuyuanp/nerdtree-git-plugin
|
||||
[submodule "pack/vendor/start/vim-fugitive"]
|
||||
path = pack/vendor/start/vim-fugitive
|
||||
url = https://github.com/tpope/vim-fugitive
|
||||
[submodule "LanguageClient-neovim"]
|
||||
path = pack/vendor/start/LanguageClient-neovim
|
||||
url = https://github.com/autozimu/LanguageClient-neovim
|
||||
branch = next
|
||||
[submodule "pack/vendor/start/miramare"]
|
||||
path = pack/vendor/start/miramare
|
||||
url = https://github.com/franbach/miramare
|
||||
[submodule "pack/vendor/start/vim-gitgo"]
|
||||
path = pack/vendor/start/vim-gitgo
|
||||
url = https://github.com/bitfield/vim-gitgo
|
||||
[submodule "pack/vendor/start/melange"]
|
||||
path = pack/vendor/start/melange
|
||||
url = https://github.com/savq/melange
|
||||
[submodule "pack/vendor/start/vim-indent-guides"]
|
||||
path = pack/vendor/start/vim-indent-guides
|
||||
url = https://github.com/nathanaelkane/vim-indent-guides
|
||||
[submodule "pack/vendor/start/auto-pairs"]
|
||||
path = pack/vendor/start/auto-pairs
|
||||
url = https://github.com/jiangmiao/auto-pairs
|
||||
[submodule "pack/vendor/start/black"]
|
||||
path = pack/vendor/start/black
|
||||
url = https://github.com/ambv/black
|
||||
[submodule "pack/vendor/start/yaml-vim"]
|
||||
path = pack/vendor/start/yaml-vim
|
||||
url = https://github.com/mrk21/yaml-vim
|
||||
[submodule "pack/vendor/start/vim-go"]
|
||||
path = pack/vendor/start/vim-go
|
||||
url = https://github.com/fatih/vim-go
|
||||
[submodule "pack/vendor/start/vim-toml"]
|
||||
path = pack/vendor/start/vim-toml
|
||||
url = https://github.com/cespare/vim-toml
|
||||
[submodule "pack/vendor/start/Dockerfile.vim"]
|
||||
path = pack/vendor/start/Dockerfile.vim
|
||||
url = https://github.com/ekalinin/Dockerfile.vim
|
||||
[submodule "pack/vendor/start/rust.vim"]
|
||||
path = pack/vendor/start/rust.vim
|
||||
url = https://github.com/rust-lang/rust.vim
|
||||
[submodule "pack/vendor/start/ale"]
|
||||
path = pack/vendor/start/ale
|
||||
url = https://github.com/dense-analysis/ale
|
||||
[submodule "pack/vendor/start/deoplete.nvim"]
|
||||
path = pack/vendor/start/deoplete.nvim
|
||||
url = https://github.com/Shougo/deoplete.nvim
|
||||
[submodule "pack/vendor/start/nvim-yarp"]
|
||||
path = pack/vendor/start/nvim-yarp
|
||||
url = https://github.com/roxma/nvim-yarp
|
||||
[submodule "pack/vendor/start/vim-hug-neovim-rpc"]
|
||||
path = pack/vendor/start/vim-hug-neovim-rpc
|
||||
url = https://github.com/roxma/vim-hug-neovim-rpc
|
||||
[submodule "pack/vendor/start/deoplete-go"]
|
||||
path = pack/vendor/start/deoplete-go
|
||||
url = https://github.com/deoplete-plugins/deoplete-go
|
||||
[submodule "pack/vendor/start/deoplete-jedi"]
|
||||
path = pack/vendor/start/deoplete-jedi
|
||||
url = https://github.com/deoplete-plugins/deoplete-jedi
|
||||
[submodule "pack/vendor/start/indentLine"]
|
||||
path = pack/vendor/start/indentLine
|
||||
url = https://github.com/Yggdroot/indentLine
|
||||
[submodule "pack/vendor/start/docker-compose.vim"]
|
||||
path = pack/vendor/start/docker-compose.vim
|
||||
url = https://github.com/skanehira/docker-compose.vim
|
||||
[submodule "pack/vendor/start/vim-powershell.git"]
|
||||
path = pack/vendor/start/vim-powershell.git
|
||||
url = https://github.com/corbob/vim-powershell.git
|
||||
[submodule "pack/vendor/start/goyo.vim.git"]
|
||||
path = pack/vendor/start/goyo.vim.git
|
||||
url = https://github.com/junegunn/goyo.vim.git
|
||||
[submodule "pack/vendor/start/limelight.vim.git"]
|
||||
path = pack/vendor/start/limelight.vim.git
|
||||
url = https://github.com/junegunn/limelight.vim.git
|
|
@ -8,6 +8,16 @@ sudo pacman -Sy \
|
|||
autopep8 \
|
||||
python-black \
|
||||
mypy \
|
||||
python-greenlet
|
||||
python-greenlet \
|
||||
python-pynvim
|
||||
|
||||
pip3 install --user pynvim
|
||||
echo "Install from AUR: typescript-language-server"
|
||||
|
||||
mkdir .{swp,backup,undo}
|
||||
|
||||
git submodule update --init
|
||||
|
||||
THISDIR=$PWD
|
||||
cd pack/vendor/start/LanguageClient-neovim
|
||||
bash install.sh
|
||||
cd $THISDIR
|
||||
|
|
40
config/after/ale.vim
Normal file
40
config/after/ale.vim
Normal file
|
@ -0,0 +1,40 @@
|
|||
function! s:getValaProjectRoot(buffer) abort
|
||||
let l:cur_path_abs = fnamemodify(a:buffer, ':p:h')
|
||||
let l:maybe_doap_file = expand(l:cur_path_abs . s:sep . '*.doap')
|
||||
if !empty(l:maybe_doap_file)
|
||||
return l:cur_path_abs
|
||||
endif
|
||||
|
||||
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
|
||||
if filereadable(expand(l:path . '*.doap'))
|
||||
return l:path
|
||||
endif
|
||||
endfor
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:curPath(buffer) abort
|
||||
let l:cur_path = fnamemodify(a:buffer, ':p:h')
|
||||
return l:cur_path
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('vala', {
|
||||
\ 'name': 'vala-language-server',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': '/usr/bin/vala-language-server',
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('s:getValaProjectRoot'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
||||
|
||||
call ale#linter#Define('promql', {
|
||||
\ 'name': 'promql-langserver',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': '/usr/local/bin/promql-langserver',
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('s:curPath'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
7
config/after/language-client.vim
Normal file
7
config/after/language-client.vim
Normal file
|
@ -0,0 +1,7 @@
|
|||
let g:lcn_fzf_options = "--delimiter ':' --preview-window '+{2}-20' --expect 'ctrl-t,ctrl-x,ctrl-v'"
|
||||
|
||||
function! LcnFzfSelectionUI(source, sink) abort
|
||||
return fzf#run(fzf#wrap(fzf#vim#with_preview({'source': a:source, 'options': g:lcn_fzf_options})))
|
||||
endfunction
|
||||
|
||||
let g:LanguageClient_selectionUI = function('LcnFzfSelectionUI')
|
7
config/after/reader.vim
Normal file
7
config/after/reader.vim
Normal file
|
@ -0,0 +1,7 @@
|
|||
function s:vertopen_url()
|
||||
normal! "uyiW
|
||||
let mycommand = "reader " . @u
|
||||
execute "vertical terminal " . mycommand
|
||||
endfunction
|
||||
noremap <Plug>vertopen_url : call <SID>vertopen_url()<CR>
|
||||
nmap gx <Plug>vertopen_url
|
22
config/before/airline.vim
Normal file
22
config/before/airline.vim
Normal file
|
@ -0,0 +1,22 @@
|
|||
" air-line
|
||||
"let g:airline_powerline_fonts = 1
|
||||
|
||||
if !exists('g:airline_symbols') && !g:is_tty
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
|
||||
" unicode symbols
|
||||
let g:airline_left_sep = ''
|
||||
let g:airline_left_alt_sep = ''
|
||||
let g:airline_right_sep = ''
|
||||
let g:airline_right_alt_sep = ''
|
||||
let g:airline_symbols.branch = ''
|
||||
let g:airline_symbols.readonly = ''
|
||||
let g:airline_symbols.linenr = ''"
|
||||
" let g:airline_symbols.branch = '⎇'
|
||||
let g:airline_symbols.paste = 'ρ'
|
||||
" let g:airline_symbols.paste = 'Þ'
|
||||
" let g:airline_symbols.paste = '∥'
|
||||
let g:airline_symbols.whitespace = 'Ξ'
|
||||
|
||||
|
78
config/before/ale.vim
Normal file
78
config/before/ale.vim
Normal file
|
@ -0,0 +1,78 @@
|
|||
""" ALE configuration
|
||||
|
||||
let g:ale_completion_enabled = 0
|
||||
let g:ale_sign_error = '->'
|
||||
let g:ale_sign_warning = '~>'
|
||||
" let g:ale_sign_error = '✘'
|
||||
" let g:ale_sign_warning = '⚠'
|
||||
|
||||
let g:ale_elixir_elixir_ls_release = '/usr/lib/elixir-ls/'
|
||||
let g:ale_java_javalsp_executable = '/usr/bin/java-language-server'
|
||||
|
||||
"\ 'rust': ['rust-analyzer'],
|
||||
let g:ale_linters = {
|
||||
\ 'javascript': ['eslint'],
|
||||
\ 'javascriptreact': ['eslint'],
|
||||
\ 'typescript': ['tsserver', 'tslint'],
|
||||
\ 'typescriptreact': ['tsserver', 'tslint'],
|
||||
\ 'python': ['pyright'],
|
||||
\ 'elixir': ['elixir-ls'],
|
||||
\ 'go': ['gopls'],
|
||||
\ 'json': ['jsonlint'],
|
||||
\ 'dockerfile': ['hadolint'],
|
||||
\ 'vala': ['vala-language-server'],
|
||||
\ 'scss': ['eslint'],
|
||||
\ 'elm': ['elm_ls'],
|
||||
\ 'sql': ['sql-lint'],
|
||||
\ 'promql': ['promql-langserver'],
|
||||
\ 'java': ['javalsp'],
|
||||
\ 'ps1': ['powershell'],
|
||||
\ 'markdown': ['vale'],
|
||||
\}
|
||||
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'typescript': ['prettier'],
|
||||
\ 'javascriptreact': ['prettier'],
|
||||
\ 'typescriptreact': ['prettier'],
|
||||
\ 'python': ['black'],
|
||||
\ 'elixir': ['mix_format'],
|
||||
\ 'graphql': ['prettier'],
|
||||
\ 'perl': ['perltidy'],
|
||||
\ 'go': ['gofmt'],
|
||||
\ 'rust': ['rustfmt'],
|
||||
\ 'json': ['prettier'],
|
||||
\ 'vala': ['uncrustify'],
|
||||
\ 'dart': ['dartfmt'],
|
||||
\ 'scss': ['prettier'],
|
||||
\ 'jsonnet': ['jsonnetfmt'],
|
||||
\}
|
||||
|
||||
let g:ale_rust_rls_config = {
|
||||
\ 'rust': {
|
||||
\ 'clippy_preference': 'on',
|
||||
\ 'ale_rust_cargo_default_feature_behavior': 'all'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
let g:ale_echo_msg_error_str = 'Err'
|
||||
let g:ale_echo_msg_warning_str = 'Warn'
|
||||
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||
|
||||
let g:ale_go_langserver_executable = 'gopls'
|
||||
" let g:ale_go_revive_executable = '/usr/bin/revive'
|
||||
" let g:ale_go_revive_options = '-config ~/.vim/revive.toml'
|
||||
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
|
||||
" let g:ale_completion_enabled = 1
|
||||
let g:ale_lint_on_enter = 0
|
||||
let g:ale_lint_on_text_changed = 'never'
|
||||
highlight ALEErrorSign ctermbg=NONE ctermfg=red
|
||||
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow
|
||||
let g:ale_linters_explicit = 1
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
let g:ale_floating_preview = 1
|
||||
let g:ale_floating_window_border = ['│', '─', '╭', '╮', '╯', '╰']
|
6
config/before/copilot.vim
Normal file
6
config/before/copilot.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
imap <silent><script><expr> <c-a> copilot#Accept("\<CR>")
|
||||
let g:copilot_no_tab_map = v:true
|
||||
let g:copilot_filetypes = {
|
||||
\ '*': v:false,
|
||||
\ 'go': v:true,
|
||||
\ }
|
5
config/before/deoplete.vim
Normal file
5
config/before/deoplete.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
""" deoplete
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
" let g:deoplete#sources = {'go': ['deoplete-go'], 'python': ['deoplete-jedi']}
|
||||
" call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
|
15
config/before/fzf.vim
Normal file
15
config/before/fzf.vim
Normal file
|
@ -0,0 +1,15 @@
|
|||
""" FZF
|
||||
|
||||
let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
|
||||
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tabedit',
|
||||
\ 'ctrl-v': 'vsplit',
|
||||
\ 'ctrl-x': 'split' }
|
||||
let g:fzf_buffers_jump = 1
|
||||
|
||||
let g:fzf_commands_expect = 'alt-enter,ctrl-x'
|
||||
|
||||
" disable popup window
|
||||
" let g:fzf_layout = { 'down': '40%' }
|
||||
|
49
config/before/indent.vim
Normal file
49
config/before/indent.vim
Normal file
|
@ -0,0 +1,49 @@
|
|||
""" indentation seek functions
|
||||
|
||||
" Jump to the next or previous line that has the same level or a lower
|
||||
" level of indentation than the current line.
|
||||
"
|
||||
" exclusive (bool): true: Motion is exclusive
|
||||
" false: Motion is inclusive
|
||||
" fwd (bool): true: Go to next line
|
||||
" false: Go to previous line
|
||||
" lowerlevel (bool): true: Go to line with lower indentation level
|
||||
" false: Go to line with the same indentation level
|
||||
" skipblanks (bool): true: Skip blank lines
|
||||
" false: Don't skip blank lines
|
||||
function! NextIndent(exclusive, fwd, lowerlevel, skipblanks)
|
||||
let line = line('.')
|
||||
let column = col('.')
|
||||
let lastline = line('$')
|
||||
let indent = indent(line)
|
||||
let stepvalue = a:fwd ? 1 : -1
|
||||
while (line > 0 && line <= lastline)
|
||||
let line = line + stepvalue
|
||||
if ( ! a:lowerlevel && indent(line) == indent ||
|
||||
\ a:lowerlevel && indent(line) < indent)
|
||||
if (! a:skipblanks || strlen(getline(line)) > 0)
|
||||
if (a:exclusive)
|
||||
let line = line - stepvalue
|
||||
endif
|
||||
exe line
|
||||
exe "normal " column . "|"
|
||||
return
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Moving back and forth between lines of same or lower indentation.
|
||||
nnoremap <silent> [l :call NextIndent(0, 0, 0, 1)<CR>
|
||||
nnoremap <silent> ]l :call NextIndent(0, 1, 0, 1)<CR>
|
||||
nnoremap <silent> [L :call NextIndent(0, 0, 1, 1)<CR>
|
||||
nnoremap <silent> ]L :call NextIndent(0, 1, 1, 1)<CR>
|
||||
vnoremap <silent> [l <Esc>:call NextIndent(0, 0, 0, 1)<CR>m'gv''
|
||||
vnoremap <silent> ]l <Esc>:call NextIndent(0, 1, 0, 1)<CR>m'gv''
|
||||
vnoremap <silent> [L <Esc>:call NextIndent(0, 0, 1, 1)<CR>m'gv''
|
||||
vnoremap <silent> ]L <Esc>:call NextIndent(0, 1, 1, 1)<CR>m'gv''
|
||||
onoremap <silent> [l :call NextIndent(0, 0, 0, 1)<CR>
|
||||
onoremap <silent> ]l :call NextIndent(0, 1, 0, 1)<CR>
|
||||
onoremap <silent> [L :call NextIndent(1, 0, 1, 1)<CR>
|
||||
onoremap <silent> ]L :call NextIndent(1, 1, 1, 1)<CR>
|
||||
|
76
config/before/language-client.vim
Normal file
76
config/before/language-client.vim
Normal file
|
@ -0,0 +1,76 @@
|
|||
""" LanguageClient
|
||||
" Required for operations modifying multiple buffers like rename.
|
||||
set hidden
|
||||
|
||||
" let g:LanguageClient_serverCommands = {
|
||||
" \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
|
||||
" \ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
|
||||
" \ 'python': ['/usr/local/bin/pyls'],
|
||||
" \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
|
||||
" \ }
|
||||
|
||||
if !empty($RUST_VERSION)
|
||||
let g:LanguageClient_rustVersion = $RUST_VERSION
|
||||
else
|
||||
let g:LanguageClient_rustVersion = 'stable'
|
||||
endif
|
||||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
"\ 'rust': ['/usr/bin/rustup', 'run', g:LanguageClient_rustVersion, 'rust-analyzer'],
|
||||
\ 'rust': {
|
||||
\ 'name': 'rust-analyzer',
|
||||
\ 'command': ['/usr/bin/rustup', 'run', g:LanguageClient_rustVersion, 'rust-analyzer'],
|
||||
\ 'initializationOptions': {
|
||||
\ 'cargo': {
|
||||
\ 'features': 'true',
|
||||
\ }
|
||||
\ },
|
||||
\ },
|
||||
\ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'],
|
||||
\ 'elm': ['/usr/bin/elm-language-server'],
|
||||
\ 'python': ['/usr/bin/pylsp'],
|
||||
\ 'go': ['/usr/bin/gopls'],
|
||||
\ 'promql': ['/usr/local/bin/promql-langserver'],
|
||||
\ 'java': ['/usr/bin/java-language-server'],
|
||||
\ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'],
|
||||
\ 'typescriptreact': ['/usr/bin/typescript-language-server', '--stdio'],
|
||||
"\ 'Dockerfile': ['/usr/bin/docker-langserver', '--stdio'],
|
||||
\ 'hcl': ['/usr/bin/terraform-ls'],
|
||||
\ 'jsonnet': ['/usr/bin/jsonnet-language-server'],
|
||||
\ }
|
||||
|
||||
let g:LanguageClient_rootMarkers = {
|
||||
\ 'elm': ['elm.json'],
|
||||
\ 'typescript': ['package.json'],
|
||||
\ 'typescriptreact': ['package.json'],
|
||||
\ 'rust': ['Cargo.toml'],
|
||||
\ 'python': ['pyproject.toml', 'setup.cfg'],
|
||||
\ 'jsonnet': ['jsonnetfile.json', 'jsonnetfile.lock.json'],
|
||||
\ }
|
||||
|
||||
let g:LanguageClient_hoverPreview = 'always'
|
||||
|
||||
function LC_maps()
|
||||
if has_key(g:LanguageClient_serverCommands, &filetype)
|
||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
|
||||
nnoremap <silent> gdd :call LanguageClient#textDocument_definition()<CR>
|
||||
nnoremap <silent> gdi :call LanguageClient#textDocument_implementation()<CR>
|
||||
nnoremap <silent> gdt :call LanguageClient#textDocument_typeDefinition()<CR>
|
||||
nnoremap <silent> gds :call LanguageClient#textDocument_documentSymbol()<CR>
|
||||
nnoremap <silent> gdr :call LanguageClient#textDocument_references()<CR>
|
||||
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
|
||||
" noremap <F5> <Plug>(lcn-menu)
|
||||
" noremap <buffer> <silent> K <Plug>(lcn-hover)
|
||||
" noremap <buffer> <silent> gd <Plug>(lcn-definition)
|
||||
" noremap <buffer> <silent> <F2> <Plug>(lcn-rename)
|
||||
|
||||
let g:LanguageClient_loggingLevel = 'DEBUG'
|
||||
let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log')
|
||||
|
||||
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd FileType * call LC_maps()
|
6
config/before/mucomplete.vim
Normal file
6
config/before/mucomplete.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
set completeopt+=menuone
|
||||
set completeopt+=noselect
|
||||
" set completeopt+=noinsert
|
||||
set shortmess+=c " Shut off completion messages
|
||||
set belloff+=ctrlg " If Vim beeps during completion
|
||||
let g:mucomplete#enable_auto_at_startup = 1
|
22
config/before/neosnippets.vim
Normal file
22
config/before/neosnippets.vim
Normal file
|
@ -0,0 +1,22 @@
|
|||
""" neosnippets
|
||||
|
||||
" Plugin key-mappings.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||
smap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||
xmap <C-k> <Plug>(neosnippet_expand_target)
|
||||
|
||||
" SuperTab like snippets behavior.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
"imap <expr><TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ neosnippet#expandable_or_jumpable() ?
|
||||
" \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
|
||||
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
|
||||
" For conceal markers.
|
||||
if has('conceal')
|
||||
set conceallevel=2 concealcursor=niv
|
||||
endif
|
||||
|
13
config/before/nerdtree.vim
Normal file
13
config/before/nerdtree.vim
Normal file
|
@ -0,0 +1,13 @@
|
|||
""" NERDTree
|
||||
|
||||
" Close NERDTree automatically after opening a file with it.
|
||||
let g:NERDTreeQuitOnOpen = 1
|
||||
" Use a single click for opening things in NERDTree
|
||||
let g:NERDTreeMouseMode = 3
|
||||
let g:NERDTreeMapActivateNode = '<Space>'
|
||||
let g:NERDTreeIgnore = [
|
||||
\ '\.pyc$',
|
||||
\ '^__pycache__$',
|
||||
\ '^\.mypy_cache$',
|
||||
\]
|
||||
|
168
config/before/plug.vim
Normal file
168
config/before/plug.vim
Normal file
|
@ -0,0 +1,168 @@
|
|||
" vim-plug init
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
system('curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim')
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin('~/.vim/bundle')
|
||||
|
||||
""" Install Plugs
|
||||
" clipboard
|
||||
Plug 'haya14busa/vim-poweryank'
|
||||
|
||||
" undotree
|
||||
Plug 'mbbill/undotree'
|
||||
|
||||
" vim-fetch
|
||||
Plug 'wsdjeg/vim-fetch'
|
||||
|
||||
" powerline-vim
|
||||
Plug 'powerline/powerline'
|
||||
|
||||
" vim-eunuch
|
||||
Plug 'tpope/vim-eunuch'
|
||||
|
||||
" vim-commentary
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
" vim-markbar
|
||||
Plug 'Yilin-Yang/vim-markbar'
|
||||
|
||||
" vim-rooter
|
||||
Plug 'airblade/vim-rooter'
|
||||
|
||||
" win-resizer
|
||||
Plug 'simeji/winresizer'
|
||||
|
||||
" Deoplete.vim
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'deoplete-plugins/deoplete-go', { 'do': 'make' }
|
||||
Plug 'deoplete-plugins/deoplete-jedi'
|
||||
|
||||
" neosnippets
|
||||
"Plug 'Shougo/neosnippet.vim'
|
||||
"Plug 'Shougo/neosnippet-snippets'
|
||||
|
||||
" fzf
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" Peekaboo
|
||||
Plug 'junegunn/vim-peekaboo'
|
||||
|
||||
" NERDTree
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
" NERTCommenter
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
|
||||
" tagbar
|
||||
" Plug 'majutsushi/tagbar'
|
||||
|
||||
" vim-fugitive
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" dadbod (sql)
|
||||
Plug 'tpope/vim-dadbod'
|
||||
|
||||
" yara
|
||||
Plug 'yaunj/vim-yara'
|
||||
|
||||
" Dart
|
||||
" Plug 'bartekd/vim-dart'
|
||||
Plug 'dart-lang/dart-vim-plugin'
|
||||
|
||||
" Kotlin
|
||||
Plug 'udalov/kotlin-vim'
|
||||
|
||||
" Elixir
|
||||
Plug 'elixir-editors/vim-elixir'
|
||||
" Plug 'GrzegorzKozub/vim-elixirls', { 'do': ':ElixirLsCompileSync' }
|
||||
|
||||
" Elm
|
||||
"Plug 'elmcast/elm-vim'
|
||||
"Plug 'andys8/vim-elm-syntax'
|
||||
"let g:elm_format_autosave = 1
|
||||
"Plug 'Zaptic/elm-vim'
|
||||
|
||||
" GraphQL
|
||||
Plug 'jparise/vim-graphql'
|
||||
|
||||
" Scss
|
||||
Plug 'cakebaker/scss-syntax.vim'
|
||||
|
||||
" Vala
|
||||
Plug 'arrufat/vala.vim'
|
||||
|
||||
" ALE
|
||||
"Plug 'w0rp/ale'
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
" LanguageClient
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
|
||||
" vim-airline
|
||||
"Plug 'vim-airline/vim-airline'
|
||||
"Plug 'vim-airline/vim-airline-themes'
|
||||
|
||||
" Colorschemes
|
||||
Plug 'junegunn/seoul256.vim'
|
||||
Plug 'scwood/vim-hybrid'
|
||||
Plug 'kristijanhusak/vim-hybrid-material'
|
||||
Plug 'srcery-colors/srcery-vim'
|
||||
Plug 'nightsense/cosmic_latte'
|
||||
Plug 'rafi/awesome-vim-colorschemes'
|
||||
Plug 'altercation/vim-colors-solarized'
|
||||
Plug 'franbach/miramare'
|
||||
Plug 'sainnhe/edge'
|
||||
Plug 'ayu-theme/ayu-vim'
|
||||
Plug 'bitfield/vim-gitgo'
|
||||
Plug 'savq/melange'
|
||||
Plug 'sonph/onehalf', { 'rtp': 'vim' }
|
||||
|
||||
" indent-guides
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
|
||||
" Dockerfile.vim
|
||||
Plug 'ekalinin/Dockerfile.vim'
|
||||
|
||||
" YAML
|
||||
Plug 'mrk21/yaml-vim'
|
||||
|
||||
" Python
|
||||
Plug 'ambv/black'
|
||||
|
||||
" TOML
|
||||
Plug 'cespare/vim-toml'
|
||||
|
||||
" Autoclose
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
|
||||
" vim-go
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
|
||||
" vim-multiple-cursor
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
|
||||
" rust.vim
|
||||
" Plug 'rust-lang/rust.vim'
|
||||
|
||||
" nginx.vim
|
||||
Plug 'chr4/nginx.vim'
|
||||
|
||||
" typescript
|
||||
|
||||
Plug 'HerringtonDarkholme/yats.vim'
|
||||
"Plug 'leafgarland/typescript-vim'
|
||||
Plug 'ianks/vim-tsx'
|
||||
Plug 'maxmellon/vim-jsx-pretty'
|
||||
"Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
|
||||
|
||||
|
||||
call plug#end()
|
2
config/before/powerline.vim
Normal file
2
config/before/powerline.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
""" powerline
|
||||
let g:powerline_pycmd = "py3"
|
44
config/before/rg.vim
Normal file
44
config/before/rg.vim
Normal file
|
@ -0,0 +1,44 @@
|
|||
" ripgrep
|
||||
" if executable('ug')
|
||||
" let $FZF_DEFAULT_COMMAND = 'ug'
|
||||
" set grepprg=ugrep\ -RInk\ -j\ -u\ --tabs=1\ --ignore-files
|
||||
" set grepformat=%f:%l:%c:%m,%f+%l+%c+%m,%-G%f\\\|%l\\\|%c\\\|%m
|
||||
" endif
|
||||
if executable('rg')
|
||||
let $RG_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
|
||||
set grepprg=rg\ --vimgrep
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
|
||||
endif
|
||||
|
||||
" Search in files with ripgrep + preview with bat
|
||||
function! Fzf_dev()
|
||||
let l:fzf_files_options = '--preview "bat --style=numbers,changes --color always {2..-1} | head -'.&lines.'"'
|
||||
|
||||
function! s:files()
|
||||
let l:files = split(system($RG_DEFAULT_COMMAND), '\n')
|
||||
return s:format_list(l:files)
|
||||
endfunction
|
||||
|
||||
function! s:format_list(candidates)
|
||||
let l:result = []
|
||||
for l:candidate in a:candidates
|
||||
let l:filename = fnamemodify(l:candidate, ':p:t')
|
||||
let l:icon = ">-"
|
||||
call add(l:result, printf('%s %s', l:icon, l:candidate))
|
||||
endfor
|
||||
|
||||
return l:result
|
||||
endfunction
|
||||
|
||||
function! s:edit_file(item)
|
||||
let l:pos = stridx(a:item, ' ')
|
||||
let l:file_path = a:item[pos+1:-1]
|
||||
execute 'silent e' l:file_path
|
||||
endfunction
|
||||
|
||||
call fzf#run({
|
||||
\ 'source': <sid>files(),
|
||||
\ 'sink': function('s:edit_file'),
|
||||
\ 'options': '-m ' . l:fzf_files_options,
|
||||
\ 'down': '40%' })
|
||||
endfunction
|
37
config/before/theme.vim
Normal file
37
config/before/theme.vim
Normal file
|
@ -0,0 +1,37 @@
|
|||
""" Themes and colors
|
||||
if exists('+termguicolors')
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
" source $VIMHOME/config/themes/melange.vim
|
||||
source $VIMHOME/config/themes/miramare.vim
|
||||
|
||||
function! s:colorscheme_gitgo()
|
||||
hi Search guibg=Green
|
||||
endfunction
|
||||
|
||||
function! s:colorscheme_miramare()
|
||||
hi Search guibg=Purple
|
||||
endfunction
|
||||
|
||||
autocmd! ColorScheme gitgo call s:colorscheme_gitgo()
|
||||
autocmd! ColorScheme miramare call s:colorscheme_miramare()
|
||||
|
||||
function! LightOrDarkness()
|
||||
if &background==?"dark"
|
||||
set background=light
|
||||
colorscheme gitgo
|
||||
elseif &background==?"light"
|
||||
set background=dark
|
||||
execute 'colorscheme ' . g:colorscheme
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Needed for kitty not to f*ck up the background color
|
||||
let &t_ut=''
|
||||
|
||||
|
||||
" virtualedit
|
||||
"set virtualedit=all
|
8
config/before/vim-go.vim
Normal file
8
config/before/vim-go.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
""" vim-go
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
|
||||
let g:go_imports_autosave = 0
|
||||
let g:go_doc_popup_window = 1
|
4
config/before/vim-rooter.vim
Normal file
4
config/before/vim-rooter.vim
Normal file
|
@ -0,0 +1,4 @@
|
|||
""" vim-rooter
|
||||
|
||||
"let g:rooter_change_directory_for_non_project_files = 'current':
|
||||
|
4
config/themes/melange.vim
Normal file
4
config/themes/melange.vim
Normal file
|
@ -0,0 +1,4 @@
|
|||
" Melange configuration
|
||||
|
||||
colorscheme melange
|
||||
let g:colorscheme = 'melange'
|
13
config/themes/miramare.vim
Normal file
13
config/themes/miramare.vim
Normal file
|
@ -0,0 +1,13 @@
|
|||
" Miramare config
|
||||
|
||||
set background=dark
|
||||
let g:miramare_enable_italic = 0
|
||||
let g:miramare_disable_italic_comment = 1
|
||||
let g:miramare_transparent_background = 0
|
||||
colorscheme miramare
|
||||
"let g:airline_theme='hybrid'
|
||||
set number
|
||||
let g:enable_bold_font = 1
|
||||
let g:enable_italic_font = 1
|
||||
set laststatus=2
|
||||
let g:colorscheme = 'miramare'
|
4
ftdetect/promql.vim
Normal file
4
ftdetect/promql.vim
Normal file
|
@ -0,0 +1,4 @@
|
|||
augroup promql
|
||||
au!
|
||||
autocmd BufReadCmd,BufRead *.promql,*.pql set ft=promql syntax=yaml et ts=2 sts=0 sw=0
|
||||
augroup END
|
1
pack/github/start/Dockerfile.vim
Submodule
1
pack/github/start/Dockerfile.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 2a31e6bcea5977209c05c728c4253d82fd873c82
|
1
pack/github/start/copilot.vim
Submodule
1
pack/github/start/copilot.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0668308e68b0ac28b332b204b469fbe04601536a
|
1
pack/github/start/prometheus.vim
Submodule
1
pack/github/start/prometheus.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4f48ae3a8bb820c174ef73293942a6b109f446ce
|
1
pack/github/start/rust.vim
Submodule
1
pack/github/start/rust.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 889b9a7515db477f4cb6808bef1769e53493c578
|
1
pack/vendor/start/Dockerfile.vim
vendored
Submodule
1
pack/vendor/start/Dockerfile.vim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 2a31e6bcea5977209c05c728c4253d82fd873c82
|
1
pack/vendor/start/LanguageClient-neovim
vendored
Submodule
1
pack/vendor/start/LanguageClient-neovim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit cf6dd11baf62fb6ce18308e96c0ab43428b7c686
|
1
pack/vendor/start/ale
vendored
Submodule
1
pack/vendor/start/ale
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 7021ed0c6859ec8b1bf5012d1276d54a786449c3
|
1
pack/vendor/start/auto-pairs
vendored
Submodule
1
pack/vendor/start/auto-pairs
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76
|
1
pack/vendor/start/black
vendored
Submodule
1
pack/vendor/start/black
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 3aad6e385bfbd4348b2e13695cb6741806951160
|
1
pack/vendor/start/deoplete-go
vendored
Submodule
1
pack/vendor/start/deoplete-go
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4eac2e6f127f2e2601dee415db2f826e2c9ef16c
|
1
pack/vendor/start/deoplete-jedi
vendored
Submodule
1
pack/vendor/start/deoplete-jedi
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4a13930764f3fbda1c06d7312d8ce2ff595d3274
|
1
pack/vendor/start/deoplete.nvim
vendored
Submodule
1
pack/vendor/start/deoplete.nvim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 82db30626e411e99b0274b8d6c99bce561cb0394
|
1
pack/vendor/start/docker-compose.vim
vendored
Submodule
1
pack/vendor/start/docker-compose.vim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 43df0bc663402b12b95ad50ba4c081895798d0ea
|
1
pack/vendor/start/fzf
vendored
Submodule
1
pack/vendor/start/fzf
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d0b7780239dd9f9e2bf6c252e03b463990a966bd
|
1
pack/vendor/start/fzf.vim
vendored
Submodule
1
pack/vendor/start/fzf.vim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1dcdb21db618055134cd611f4f5918f6d00a5df0
|
1
pack/vendor/start/goyo.vim.git
vendored
Submodule
1
pack/vendor/start/goyo.vim.git
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit fa0263d456dd43f5926484d1c4c7022dfcb21ba9
|
1
pack/vendor/start/indentLine
vendored
Submodule
1
pack/vendor/start/indentLine
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d15d63bf9c4a74a02470d4bc8ecce53df13e3a75
|
1
pack/vendor/start/limelight.vim.git
vendored
Submodule
1
pack/vendor/start/limelight.vim.git
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 86aaec1700b27618d33d6182f44691d84d2cb6e5
|
1
pack/vendor/start/melange
vendored
Submodule
1
pack/vendor/start/melange
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit f15922543dd70b360335effb61411c05c710b99c
|
1
pack/vendor/start/miramare
vendored
Submodule
1
pack/vendor/start/miramare
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 04330816640c3162275d69e7094126727948cd0d
|
1
pack/vendor/start/nerdtree
vendored
Submodule
1
pack/vendor/start/nerdtree
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit fc85a6f07c2cd694be93496ffad75be126240068
|
1
pack/vendor/start/nerdtree-git-plugin
vendored
Submodule
1
pack/vendor/start/nerdtree-git-plugin
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e1fe727127a813095854a5b063c15e955a77eafb
|
1
pack/vendor/start/nvim-yarp
vendored
Submodule
1
pack/vendor/start/nvim-yarp
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit bb5f5e038bfe119d3b777845a76b0b919b35ebc8
|
1
pack/vendor/start/powerline
vendored
Submodule
1
pack/vendor/start/powerline
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 833f30e88efa51246dadc6daf21638ec61b6b912
|
1
pack/vendor/start/rust.vim
vendored
Submodule
1
pack/vendor/start/rust.vim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 889b9a7515db477f4cb6808bef1769e53493c578
|
1
pack/vendor/start/undotree
vendored
Submodule
1
pack/vendor/start/undotree
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 485f01efde4e22cb1ce547b9e8c9238f36566f21
|
1
pack/vendor/start/vim-commentary
vendored
Submodule
1
pack/vendor/start/vim-commentary
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e87cd90dc09c2a203e13af9704bd0ef79303d755
|
1
pack/vendor/start/vim-eunuch
vendored
Submodule
1
pack/vendor/start/vim-eunuch
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 291ef1f8c8996ca7715df1032a35a27b12d7b5cf
|
1
pack/vendor/start/vim-fetch
vendored
Submodule
1
pack/vendor/start/vim-fetch
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit bbb75c3172f766d1a62832df0ec7674c69a560ad
|
1
pack/vendor/start/vim-fugitive
vendored
Submodule
1
pack/vendor/start/vim-fugitive
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 5f0d280b517cacb16f59316659966c7ca5e2bea2
|
1
pack/vendor/start/vim-gitgo
vendored
Submodule
1
pack/vendor/start/vim-gitgo
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c30d1c3f6da0a43c4ef6eb18b47e42be828e6eae
|
1
pack/vendor/start/vim-go
vendored
Submodule
1
pack/vendor/start/vim-go
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 3289077b08b210aa88a890cb65e9538bd52364b6
|
1
pack/vendor/start/vim-hcl
vendored
Submodule
1
pack/vendor/start/vim-hcl
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1e1116c17a5774851360ea8077f349e36fc733c1
|
1
pack/vendor/start/vim-hug-neovim-rpc
vendored
Submodule
1
pack/vendor/start/vim-hug-neovim-rpc
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 93ae38792bc197c3bdffa2716ae493c67a5e7957
|
1
pack/vendor/start/vim-indent-guides
vendored
Submodule
1
pack/vendor/start/vim-indent-guides
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a1e1390c0136e63e813d051de2003bf0ee18ae30
|
1
pack/vendor/start/vim-mucomplete
vendored
Submodule
1
pack/vendor/start/vim-mucomplete
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 03bcd4a7dfe0a2f6d432e8ce936d35273a15209d
|
1
pack/vendor/start/vim-powershell.git
vendored
Submodule
1
pack/vendor/start/vim-powershell.git
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 37fb044c8398018f5b900a05a39824dba7477575
|
1
pack/vendor/start/vim-poweryank
vendored
Submodule
1
pack/vendor/start/vim-poweryank
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 48dff95dbd64423c96fdae5c18eaddb5b5fa3064
|
1
pack/vendor/start/vim-rooter
vendored
Submodule
1
pack/vendor/start/vim-rooter
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4f52ca556a0b9e257bf920658714470ea0320b7a
|
1
pack/vendor/start/vim-toml
vendored
Submodule
1
pack/vendor/start/vim-toml
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d36caa6b1cf508a4df1c691f915572fc02143258
|
1
pack/vendor/start/yaml-vim
vendored
Submodule
1
pack/vendor/start/yaml-vim
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 509eef523082d69a75652739d4e7e6068eeb6506
|
570
vimrc
570
vimrc
|
@ -3,536 +3,54 @@ let s:sep = has('win32') ? '\' : '/'
|
|||
" check if in tty
|
||||
let g:is_tty = system('case $(tty) in (/dev/tty[0-9]) echo 1;; (*) echo 0;; esac')
|
||||
|
||||
" vim-plug init
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
system('curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim')
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
""" Set python3 path
|
||||
let g:python3_host_prog = "/usr/bin/python"
|
||||
let g:python_host_prog='/usr/bin/python'
|
||||
|
||||
call plug#begin('~/.vim/bundle')
|
||||
|
||||
""" Install Plugs
|
||||
" clipboard
|
||||
Plug 'haya14busa/vim-poweryank'
|
||||
|
||||
" undotree
|
||||
Plug 'mbbill/undotree'
|
||||
|
||||
" vim-fetch
|
||||
Plug 'wsdjeg/vim-fetch'
|
||||
|
||||
" powerline-vim
|
||||
Plug 'powerline/powerline'
|
||||
|
||||
" vim-eunuch
|
||||
Plug 'tpope/vim-eunuch'
|
||||
|
||||
" vim-commentary
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
" vim-markbar
|
||||
Plug 'Yilin-Yang/vim-markbar'
|
||||
|
||||
" vim-rooter
|
||||
Plug 'airblade/vim-rooter'
|
||||
|
||||
" win-resizer
|
||||
Plug 'simeji/winresizer'
|
||||
|
||||
" Deoplete.vim
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'deoplete-plugins/deoplete-go', { 'do': 'make' }
|
||||
Plug 'deoplete-plugins/deoplete-jedi'
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
||||
" neosnippets
|
||||
"Plug 'Shougo/neosnippet.vim'
|
||||
"Plug 'Shougo/neosnippet-snippets'
|
||||
|
||||
" fzf
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" Peekaboo
|
||||
Plug 'junegunn/vim-peekaboo'
|
||||
|
||||
" NERDTree
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
" NERTCommenter
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
|
||||
" tagbar
|
||||
" Plug 'majutsushi/tagbar'
|
||||
|
||||
" vim-fugitive
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" dadbod (sql)
|
||||
Plug 'tpope/vim-dadbod'
|
||||
|
||||
" yara
|
||||
Plug 'yaunj/vim-yara'
|
||||
|
||||
" Dart
|
||||
" Plug 'bartekd/vim-dart'
|
||||
Plug 'dart-lang/dart-vim-plugin'
|
||||
|
||||
" Kotlin
|
||||
Plug 'udalov/kotlin-vim'
|
||||
|
||||
" Elixir
|
||||
Plug 'elixir-editors/vim-elixir'
|
||||
" Plug 'GrzegorzKozub/vim-elixirls', { 'do': ':ElixirLsCompileSync' }
|
||||
|
||||
" Elm
|
||||
"Plug 'elmcast/elm-vim'
|
||||
"Plug 'andys8/vim-elm-syntax'
|
||||
"let g:elm_format_autosave = 1
|
||||
"Plug 'Zaptic/elm-vim'
|
||||
|
||||
" GraphQL
|
||||
Plug 'jparise/vim-graphql'
|
||||
|
||||
" Scss
|
||||
Plug 'cakebaker/scss-syntax.vim'
|
||||
|
||||
" Vala
|
||||
Plug 'arrufat/vala.vim'
|
||||
|
||||
" ALE
|
||||
"Plug 'w0rp/ale'
|
||||
Plug 'dense-analysis/ale'
|
||||
let g:ale_completion_enabled = 0
|
||||
|
||||
" LanguageClient
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
|
||||
" vim-airline
|
||||
"Plug 'vim-airline/vim-airline'
|
||||
"Plug 'vim-airline/vim-airline-themes'
|
||||
|
||||
" Colorschemes
|
||||
Plug 'junegunn/seoul256.vim'
|
||||
Plug 'scwood/vim-hybrid'
|
||||
Plug 'kristijanhusak/vim-hybrid-material'
|
||||
Plug 'srcery-colors/srcery-vim'
|
||||
Plug 'nightsense/cosmic_latte'
|
||||
Plug 'rafi/awesome-vim-colorschemes'
|
||||
Plug 'altercation/vim-colors-solarized'
|
||||
Plug 'franbach/miramare'
|
||||
Plug 'sainnhe/edge'
|
||||
Plug 'ayu-theme/ayu-vim'
|
||||
Plug 'bitfield/vim-gitgo'
|
||||
Plug 'savq/melange'
|
||||
Plug 'sonph/onehalf', { 'rtp': 'vim' }
|
||||
|
||||
" indent-guides
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
|
||||
" Dockerfile.vim
|
||||
Plug 'ekalinin/Dockerfile.vim'
|
||||
|
||||
" YAML
|
||||
Plug 'mrk21/yaml-vim'
|
||||
|
||||
" Python
|
||||
Plug 'ambv/black'
|
||||
|
||||
" TOML
|
||||
Plug 'cespare/vim-toml'
|
||||
|
||||
" Autoclose
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
|
||||
" vim-go
|
||||
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
|
||||
" vim-multiple-cursor
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
|
||||
" rust.vim
|
||||
" Plug 'rust-lang/rust.vim'
|
||||
|
||||
" nginx.vim
|
||||
Plug 'chr4/nginx.vim'
|
||||
|
||||
" typescript
|
||||
|
||||
Plug 'HerringtonDarkholme/yats.vim'
|
||||
"Plug 'leafgarland/typescript-vim'
|
||||
Plug 'ianks/vim-tsx'
|
||||
Plug 'maxmellon/vim-jsx-pretty'
|
||||
"Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
|
||||
|
||||
|
||||
call plug#end()
|
||||
|
||||
"""
|
||||
|
||||
""" vim-rooter
|
||||
|
||||
"let g:rooter_change_directory_for_non_project_files = 'current':
|
||||
|
||||
""" neosnippets
|
||||
|
||||
" Plugin key-mappings.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
imap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||
smap <C-k> <Plug>(neosnippet_expand_or_jump)
|
||||
xmap <C-k> <Plug>(neosnippet_expand_target)
|
||||
|
||||
" SuperTab like snippets behavior.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
"imap <expr><TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ neosnippet#expandable_or_jumpable() ?
|
||||
" \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
|
||||
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
|
||||
" For conceal markers.
|
||||
if has('conceal')
|
||||
set conceallevel=2 concealcursor=niv
|
||||
endif
|
||||
|
||||
""" LanguageClient
|
||||
" Required for operations modifying multiple buffers like rename.
|
||||
set hidden
|
||||
|
||||
" let g:LanguageClient_serverCommands = {
|
||||
" \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
|
||||
" \ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
|
||||
" \ 'python': ['/usr/local/bin/pyls'],
|
||||
" \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
|
||||
" \ }
|
||||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'],
|
||||
\ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'],
|
||||
\ 'elm': ['/usr/bin/elm-language-server'],
|
||||
\ 'python': ['/usr/bin/pyls'],
|
||||
\ 'go': ['/usr/bin/gopls'],
|
||||
\ }
|
||||
|
||||
let g:LanguageClient_rootMarkers = {
|
||||
\ 'elm': ['elm.json'],
|
||||
\ }
|
||||
|
||||
" note that if you are using Plug mapping you should not use `noremap` mappings.
|
||||
nmap <F5> <Plug>(lcn-menu)
|
||||
" Or map each action separately
|
||||
nmap <silent>K <Plug>(lcn-hover)
|
||||
nmap <silent> gd <Plug>(lcn-definition)
|
||||
nmap <silent> <F2> <Plug>(lcn-rename)
|
||||
|
||||
""" ALE configuration
|
||||
|
||||
let g:ale_sign_error = '->'
|
||||
let g:ale_sign_warning = '~>'
|
||||
" let g:ale_sign_error = '✘'
|
||||
" let g:ale_sign_warning = '⚠'
|
||||
|
||||
" set user_dir
|
||||
if has('nvim')
|
||||
let s:user_dir = stdpath('config')
|
||||
else
|
||||
let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim')
|
||||
endif
|
||||
|
||||
let g:ale_elixir_elixir_ls_release = '/usr/lib/elixir-ls/'
|
||||
""" Set python3 path
|
||||
let g:python3_host_prog = "/usr/bin/python"
|
||||
let g:python_host_prog='/usr/bin/python'
|
||||
|
||||
let g:ale_linters = {
|
||||
\ 'javascript': ['eslint'],
|
||||
\ 'typescript': ['tsserver', 'tslint'],
|
||||
\ 'python': ['pyls', 'pylint'],
|
||||
\ 'rust': ['rls'],
|
||||
\ 'elixir': ['elixir-ls'],
|
||||
\ 'go': ['gopls'],
|
||||
\ 'json': ['jsonlint'],
|
||||
\ 'dockerfile': ['hadolint'],
|
||||
\ 'vala': ['vala-language-server'],
|
||||
\ 'scss': ['eslint'],
|
||||
\ 'elm': ['elm_ls'],
|
||||
\}
|
||||
""" leader mapping
|
||||
let mapleader = ','
|
||||
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'typescript': ['prettier'],
|
||||
\ 'python': ['black', 'pyls'],
|
||||
\ 'rust': ['rustfmt'],
|
||||
\ 'elixir': ['mix_format'],
|
||||
\ 'graphql': ['prettier'],
|
||||
\ 'perl': ['perltidy'],
|
||||
\ 'go': ['gofmt'],
|
||||
\ 'json': ['prettier'],
|
||||
\ 'vala': ['uncrustify'],
|
||||
\ 'dart': ['dartfmt'],
|
||||
\ 'scss': ['prettier'],
|
||||
\}
|
||||
""" source
|
||||
|
||||
function! s:getValaProjectRoot(buffer) abort
|
||||
let l:cur_path_abs = fnamemodify(a:buffer, ':p:h')
|
||||
let l:maybe_doap_file = expand(l:cur_path_abs . s:sep . '*.doap')
|
||||
if !empty(l:maybe_doap_file)
|
||||
return l:cur_path_abs
|
||||
endif
|
||||
" all other includes are in alphabetical order
|
||||
source $VIMHOME/config/before/ale.vim
|
||||
source $VIMHOME/config/before/copilot.vim
|
||||
source $VIMHOME/config/before/fzf.vim
|
||||
source $VIMHOME/config/before/indent.vim
|
||||
source $VIMHOME/config/before/language-client.vim
|
||||
source $VIMHOME/config/before/mucomplete.vim
|
||||
source $VIMHOME/config/before/nerdtree.vim
|
||||
source $VIMHOME/config/before/powerline.vim
|
||||
source $VIMHOME/config/before/rg.vim
|
||||
source $VIMHOME/config/before/theme.vim " this sets the colorscheme
|
||||
source $VIMHOME/config/before/vim-go.vim
|
||||
source $VIMHOME/config/before/vim-rooter.vim
|
||||
|
||||
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
|
||||
if filereadable(expand(l:path . '*.doap'))
|
||||
return l:path
|
||||
endif
|
||||
endfor
|
||||
packloadall
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('vala', {
|
||||
\ 'name': 'vala-language-server',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': '/usr/bin/vala-language-server',
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('s:getValaProjectRoot'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||
\})
|
||||
|
||||
let g:ale_rust_rls_config = {
|
||||
\ 'rust': {
|
||||
\ 'clippy_preference': 'on'
|
||||
\ }
|
||||
\ }
|
||||
|
||||
let g:ale_echo_msg_error_str = 'Err'
|
||||
let g:ale_echo_msg_warning_str = 'Warn'
|
||||
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||
|
||||
let g:ale_go_langserver_executable = 'gopls'
|
||||
" let g:ale_go_revive_executable = '/usr/bin/revive'
|
||||
" let g:ale_go_revive_options = '-config ~/.vim/revive.toml'
|
||||
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
|
||||
let g:ale_completion_enabled = 1
|
||||
let g:ale_lint_on_enter = 0
|
||||
let g:ale_lint_on_text_changed = 'never'
|
||||
highlight ALEErrorSign ctermbg=NONE ctermfg=red
|
||||
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow
|
||||
let g:ale_linters_explicit = 1
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
""" vim-go
|
||||
let g:go_highlight_types = 1
|
||||
let g:go_highlight_fields = 1
|
||||
let g:go_highlight_functions = 1
|
||||
let g:go_highlight_function_calls = 1
|
||||
|
||||
""" deoplete
|
||||
|
||||
" let g:deoplete#sources = {'go': ['deoplete-go'], 'python': ['deoplete-jedi']}
|
||||
" call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
|
||||
|
||||
""" Themes and colors
|
||||
if exists('+termguicolors')
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
function! LightOrDarkness()
|
||||
if &background==?"dark"
|
||||
set background=light
|
||||
colorscheme edge
|
||||
hi Search guibg=Green
|
||||
elseif &background==?"light"
|
||||
set background=dark
|
||||
colorscheme miramare
|
||||
hi Search guibg=Purple
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Needed for kitty not to f*ck up the background color
|
||||
let &t_ut=''
|
||||
|
||||
set background=dark
|
||||
let g:miramare_enable_italic = 0
|
||||
let g:miramare_disable_italic_comment = 1
|
||||
let g:miramare_transparent_background = 0
|
||||
colorscheme miramare
|
||||
"let g:airline_theme='hybrid'
|
||||
set number
|
||||
let g:enable_bold_font = 1
|
||||
let g:enable_italic_font = 1
|
||||
set laststatus=2
|
||||
|
||||
" virtualedit
|
||||
"set virtualedit=all
|
||||
|
||||
" air-line
|
||||
"let g:airline_powerline_fonts = 1
|
||||
|
||||
if !exists('g:airline_symbols') && !g:is_tty
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
|
||||
" unicode symbols
|
||||
let g:airline_left_sep = ''
|
||||
let g:airline_left_alt_sep = ''
|
||||
let g:airline_right_sep = ''
|
||||
let g:airline_right_alt_sep = ''
|
||||
let g:airline_symbols.branch = ''
|
||||
let g:airline_symbols.readonly = ''
|
||||
let g:airline_symbols.linenr = ''"
|
||||
" let g:airline_symbols.branch = '⎇'
|
||||
let g:airline_symbols.paste = 'ρ'
|
||||
" let g:airline_symbols.paste = 'Þ'
|
||||
" let g:airline_symbols.paste = '∥'
|
||||
let g:airline_symbols.whitespace = 'Ξ'
|
||||
|
||||
|
||||
""" FZF
|
||||
|
||||
let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
|
||||
|
||||
let g:fzf_action = {
|
||||
\ 'ctrl-t': 'tabedit',
|
||||
\ 'ctrl-v': 'vsplit',
|
||||
\ 'ctrl-x': 'split' }
|
||||
let g:fzf_buffers_jump = 1
|
||||
|
||||
let g:fzf_commands_expect = 'alt-enter,ctrl-x'
|
||||
|
||||
" disable popup window
|
||||
" let g:fzf_layout = { 'down': '40%' }
|
||||
|
||||
""" NERDTree
|
||||
|
||||
" Close NERDTree automatically after opening a file with it.
|
||||
let g:NERDTreeQuitOnOpen = 1
|
||||
" Use a single click for opening things in NERDTree
|
||||
let g:NERDTreeMouseMode = 3
|
||||
let g:NERDTreeMapActivateNode = '<Space>'
|
||||
let g:NERDTreeIgnore = [
|
||||
\ '\.pyc$',
|
||||
\ '^__pycache__$',
|
||||
\ '^\.mypy_cache$',
|
||||
\]
|
||||
|
||||
" ripgrep
|
||||
" if executable('ug')
|
||||
" let $FZF_DEFAULT_COMMAND = 'ug'
|
||||
" set grepprg=ugrep\ -RInk\ -j\ -u\ --tabs=1\ --ignore-files
|
||||
" set grepformat=%f:%l:%c:%m,%f+%l+%c+%m,%-G%f\\\|%l\\\|%c\\\|%m
|
||||
" endif
|
||||
if executable('rg')
|
||||
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
|
||||
set grepprg=rg\ --vimgrep
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
|
||||
endif
|
||||
|
||||
" Search in files with ripgrep + preview with bat
|
||||
function! Fzf_dev()
|
||||
let l:fzf_files_options = '--preview "bat --style=numbers,changes --color always {2..-1} | head -'.&lines.'"'
|
||||
|
||||
function! s:files()
|
||||
let l:files = split(system($FZF_DEFAULT_COMMAND), '\n')
|
||||
return s:format_list(l:files)
|
||||
endfunction
|
||||
|
||||
function! s:format_list(candidates)
|
||||
let l:result = []
|
||||
for l:candidate in a:candidates
|
||||
let l:filename = fnamemodify(l:candidate, ':p:t')
|
||||
let l:icon = ">-"
|
||||
call add(l:result, printf('%s %s', l:icon, l:candidate))
|
||||
endfor
|
||||
|
||||
return l:result
|
||||
endfunction
|
||||
|
||||
function! s:edit_file(item)
|
||||
let l:pos = stridx(a:item, ' ')
|
||||
let l:file_path = a:item[pos+1:-1]
|
||||
execute 'silent e' l:file_path
|
||||
endfunction
|
||||
|
||||
call fzf#run({
|
||||
\ 'source': <sid>files(),
|
||||
\ 'sink': function('s:edit_file'),
|
||||
\ 'options': '-m ' . l:fzf_files_options,
|
||||
\ 'down': '40%' })
|
||||
endfunction
|
||||
""" indentation seek functions
|
||||
|
||||
" Jump to the next or previous line that has the same level or a lower
|
||||
" level of indentation than the current line.
|
||||
"
|
||||
" exclusive (bool): true: Motion is exclusive
|
||||
" false: Motion is inclusive
|
||||
" fwd (bool): true: Go to next line
|
||||
" false: Go to previous line
|
||||
" lowerlevel (bool): true: Go to line with lower indentation level
|
||||
" false: Go to line with the same indentation level
|
||||
" skipblanks (bool): true: Skip blank lines
|
||||
" false: Don't skip blank lines
|
||||
function! NextIndent(exclusive, fwd, lowerlevel, skipblanks)
|
||||
let line = line('.')
|
||||
let column = col('.')
|
||||
let lastline = line('$')
|
||||
let indent = indent(line)
|
||||
let stepvalue = a:fwd ? 1 : -1
|
||||
while (line > 0 && line <= lastline)
|
||||
let line = line + stepvalue
|
||||
if ( ! a:lowerlevel && indent(line) == indent ||
|
||||
\ a:lowerlevel && indent(line) < indent)
|
||||
if (! a:skipblanks || strlen(getline(line)) > 0)
|
||||
if (a:exclusive)
|
||||
let line = line - stepvalue
|
||||
endif
|
||||
exe line
|
||||
exe "normal " column . "|"
|
||||
return
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Moving back and forth between lines of same or lower indentation.
|
||||
nnoremap <silent> [l :call NextIndent(0, 0, 0, 1)<CR>
|
||||
nnoremap <silent> ]l :call NextIndent(0, 1, 0, 1)<CR>
|
||||
nnoremap <silent> [L :call NextIndent(0, 0, 1, 1)<CR>
|
||||
nnoremap <silent> ]L :call NextIndent(0, 1, 1, 1)<CR>
|
||||
vnoremap <silent> [l <Esc>:call NextIndent(0, 0, 0, 1)<CR>m'gv''
|
||||
vnoremap <silent> ]l <Esc>:call NextIndent(0, 1, 0, 1)<CR>m'gv''
|
||||
vnoremap <silent> [L <Esc>:call NextIndent(0, 0, 1, 1)<CR>m'gv''
|
||||
vnoremap <silent> ]L <Esc>:call NextIndent(0, 1, 1, 1)<CR>m'gv''
|
||||
onoremap <silent> [l :call NextIndent(0, 0, 0, 1)<CR>
|
||||
onoremap <silent> ]l :call NextIndent(0, 1, 0, 1)<CR>
|
||||
onoremap <silent> [L :call NextIndent(1, 0, 1, 1)<CR>
|
||||
onoremap <silent> ]L :call NextIndent(1, 1, 1, 1)<CR>
|
||||
source $VIMHOME/config/after/ale.vim
|
||||
source $VIMHOME/config/after/language-client.vim
|
||||
source $VIMHOME/config/after/reader.vim
|
||||
|
||||
""" general
|
||||
|
||||
filetype plugin indent on
|
||||
set nospell
|
||||
" restore screen after quitting
|
||||
" au VimLeave * :!clear
|
||||
|
||||
packloadall
|
||||
syntax on
|
||||
|
||||
silent! helptags ALL
|
||||
|
||||
" Enable persistent undo
|
||||
set undodir=$VIMHOME/.undo//
|
||||
set undodir=$VIMHOME/.undo/
|
||||
set undofile
|
||||
set undolevels=1000 "maximum number of changes that can be undone
|
||||
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
|
||||
|
@ -545,8 +63,8 @@ set autoindent
|
|||
set showmatch
|
||||
|
||||
" Put all special files in the right place
|
||||
set backupdir=$VIMHOME/.backup//
|
||||
set directory=$VIMHOME/.swp//
|
||||
set backupdir=$VIMHOME/.backup/
|
||||
set directory=$VIMHOME/.swp/
|
||||
|
||||
" Draw tabs and trailing spaces.
|
||||
" set listchars=tab:<->
|
||||
|
@ -587,8 +105,11 @@ highlight LineHighlight ctermbg=darkgray guibg=Purple
|
|||
" Make :Q and :W work like :q and :w
|
||||
command! W w
|
||||
command! Q q
|
||||
command! QA qa
|
||||
command! WQ wq
|
||||
command! Wq wq
|
||||
command! Wqa wqa
|
||||
command! WQA wqa
|
||||
command! WW w ! sudo tee %:t
|
||||
|
||||
" Make completion smarter.
|
||||
|
@ -618,12 +139,15 @@ if !empty(glob(s:info_filename)) && !filewritable(s:info_filename)
|
|||
echoerr 'The .viminfo file cannot be written to!'
|
||||
endif
|
||||
|
||||
""" powerline
|
||||
let g:powerline_pycmd = "py3"
|
||||
""" Set dockerfile syntax
|
||||
autocmd BufNewFile,BufRead Dockerfile* set ft=Dockerfile
|
||||
|
||||
""" Disable SQLAutocomplete
|
||||
let g:loaded_sql_completion = 0
|
||||
|
||||
|
||||
""" keybindings
|
||||
|
||||
let mapleader = ','
|
||||
noremap <leader>ad :ALEGoToDefinition<CR>
|
||||
nnoremap <leader>af :ALEFix<cr>
|
||||
nnoremap <leader>ah :ALEHover<cr>
|
||||
|
@ -639,12 +163,14 @@ nnoremap <C-k> <C-w><Up>
|
|||
nnoremap <C-l> <C-w><Right>
|
||||
nnoremap <leader>b :Gblame<CR>
|
||||
nnoremap <C-p> :FZF<CR>
|
||||
nnoremap <C-o> :Buffers<CR>
|
||||
nnoremap <leader>f :Buffers<CR>
|
||||
nnoremap <C-F> :Files<CR>
|
||||
nnoremap <C-\> :Rg<CR>
|
||||
nnoremap <C-g> :Rg<CR>
|
||||
nnoremap <leader>k :exe "Rg " . expand("<cword>")<cr>
|
||||
nnoremap <leader>s :call Fzf_dev()<CR>
|
||||
nnoremap <leader>c :Commits<CR>
|
||||
nnoremap <leader>b :Gblame<CR>
|
||||
nnoremap <leader>b :Git blame<CR>
|
||||
nnoremap <leader>gh :exe "Git log -L:" . expand("<cword>") . ":" . expand("%")<cr>
|
||||
nnoremap <leader><esc> :silent! nohls<CR>:call clearmatches()<CR>
|
||||
nnoremap <leader><Tab> :bnext<CR>
|
||||
nnoremap <leader>\ :bprev<CR>
|
||||
|
@ -659,7 +185,15 @@ nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '
|
|||
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
nnoremap <Leader>u :UndotreeShow<CR>:UndotreeFocus<CR>
|
||||
" highlight the current line
|
||||
nnoremap l :call matchadd('LineHighlight', '\%'.line('.').'l')<CR>
|
||||
"nnoremap l :call matchadd('LineHighlight', '\%'.line('.').'l')<CR>
|
||||
" Limelight and Goyo
|
||||
|
||||
nnoremap <Leader>l :Limelight!!<CR>
|
||||
xnoremap <Leader>l :Limelight!!<CR>
|
||||
nnoremap <Leader>G :Goyo<CR>
|
||||
xnoremap <Leader>G :Goyo<CR>
|
||||
|
||||
" Move lines
|
||||
nnoremap <silent> <C-Down> :m .+1<CR>==
|
||||
nnoremap <silent> <C-Up> :m .-2<CR>==
|
||||
inoremap <silent> <C-Down> <Esc>:m .+1<CR>==gi
|
||||
|
|
Loading…
Reference in New Issue
Block a user