Remove vim configs

This commit is contained in:
Daniel Lynn 2022-10-14 15:46:09 -05:00
parent 72a2787a1e
commit 1f3b4fd4fc
Signed by: daniel
GPG Key ID: 655C07B9B3DDC88B
25 changed files with 0 additions and 925 deletions

View File

@ -1,15 +0,0 @@
if executable('rg')
let g:ackprg = 'rg --vimgrep --no-heading' " Use ripgrep for Ack
noremap <Leader>\ :Ack<Space>
noremap <Leader><Tab> :Ack <C-r><C-w><CR>
" Use rg over grep
set grepprg=rg\ --color\ never
" Use rg in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'rg --files %s'
let g:ctrlp_use_caching = 0
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_switch_buffer = 'et'
endif

View File

@ -1,28 +0,0 @@
lua <<EOF
local Rule = require('nvim-autopairs.rule')
local npairs = require('nvim-autopairs')
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
npairs.setup({
check_ts = true,
ts_config = {
lua = {'string'},-- it will not add a pair on that treesitter node
javascript = {'template_string'},
java = false,-- don't check treesitter on java
}
})
local ts_conds = require('nvim-autopairs.ts-conds')
-- press % => %% is only inside comment or string
npairs.add_rules({
Rule("%", "%", "lua")
:with_pair(ts_conds.is_ts_node({'string','comment'})),
Rule("$", "$", "lua")
:with_pair(ts_conds.is_not_ts_node({'function'}))
})
EOF

View File

@ -1,59 +0,0 @@
" True color support
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! s:sonokai_custom() abort
" Link a highlight group to a predefined highlight group.
" See `colors/sonokai.vim` for all predefined highlight groups.
"highlight! link groupA groupB
"highlight! link groupC groupD
" Initialize the color palette.
" The parameter is a valid value for `g:sonokai_style`,
let l:palette = sonokai#get_palette('default')
" Define a highlight group.
" The first parameter is the name of a highlight group,
" the second parameter is the foreground color,
" the third parameter is the background color,
" the fourth parameter is for UI highlighting which is optional,
" and the last parameter is for `guisp` which is also optional.
" See `autoload/sonokai.vim` for the format of `l:palette`.
call sonokai#highlight('GitCommitTemplateTag', l:palette.orange, l:palette.none)
call sonokai#highlight('LineNr', l:palette.grey, l:palette.bg1)
call sonokai#highlight('CursorLineNr', l:palette.fg, l:palette.bg1, 'bold')
call sonokai#highlight('SignColumn', l:palette.fg, l:palette.bg1)
call sonokai#highlight('Terminal', l:palette.fg, l:palette.bg1)
call sonokai#highlight('VertSplit', l:palette.bg1, l:palette.none)
call sonokai#highlight('GitSignsAdd', l:palette.green, l:palette.bg1)
call sonokai#highlight('GitSignsChange', l:palette.blue, l:palette.bg1)
call sonokai#highlight('GitSignsChangeDelete', l:palette.purple, l:palette.bg1)
call sonokai#highlight('GitSignsDelete', l:palette.red, l:palette.bg1)
call sonokai#highlight('GitSignsTopDelete', l:palette.orange, l:palette.bg1)
call sonokai#highlight('BlueSign', l:palette.blue, l:palette.bg1)
call sonokai#highlight('GreenSign', l:palette.green, l:palette.bg1)
call sonokai#highlight('RedSign', l:palette.red, l:palette.bg1)
call sonokai#highlight('YellowSign', l:palette.yellow, l:palette.bg1)
call sonokai#highlight('CocHintSign', l:palette.grey, l:palette.none, 'italic')
call sonokai#highlight('IndentBlanklineContext1', l:palette.purple, l:palette.none)
call sonokai#highlight('IndentBlanklineContext2', l:palette.orange, l:palette.none)
call sonokai#highlight('IndentBlanklineContext3', l:palette.blue, l:palette.none)
call sonokai#highlight('IndentBlanklineContext4', l:palette.yellow, l:palette.none)
call sonokai#highlight('IndentBlanklineContext5', l:palette.green, l:palette.none)
call sonokai#highlight('IndentBlanklineContext6', l:palette.red, l:palette.none)
call sonokai#highlight('Search', l:palette.purple, l:palette.none, 'bold,italic')
endfunction
augroup CustomColors
autocmd!
autocmd ColorScheme sonokai call s:sonokai_custom()
augroup END
" Colorscheme setup
let g:lightline.colorscheme = 'sonokai'
let g:sonokai_show_eob = 0
let g:sonokai_transparent_background = 1
colorscheme sonokai

View File

@ -1,6 +0,0 @@
augroup GitCommitTemplates
autocmd!
autocmd BufNewFile,BufRead PULL_REQUEST_TEMPLATE,*.pr set filetype=pullrequest
autocmd Filetype pullrequest :match GitCommitTemplateTag /<[^>]*>/
autocmd Filetype pullrequest :let @/ ='<[^>]*>'
augroup END

View File

@ -1,66 +0,0 @@
lua << EOF
require('gitsigns').setup {
signs = {
add = {hl = 'GitSignsAdd' , text = '▌', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▌', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '▌', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsTopDelete', text = '▌', numhl='GitSignsTopDeleteNr', linehl='GitSignsTopDeleteLn'},
changedelete = {hl = 'GitSignsChangeDelete', text = '▌', numhl='GitSignsChangeDeleteNr', linehl='GitSignsChangeDeleteLn'},
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
keymaps = {
-- Default keymap options
noremap = true,
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns.actions\".next_hunk()<CR>'"},
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns.actions\".prev_hunk()<CR>'"},
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
['v <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
['v <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})<CR>',
['n <leader>hR'] = '<cmd>lua require"gitsigns".reset_buffer()<CR>',
['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line(true)<CR>',
['n <leader>hS'] = '<cmd>lua require"gitsigns".stage_buffer()<CR>',
['n <leader>hU'] = '<cmd>lua require"gitsigns".reset_buffer_index()<CR>',
-- Text objects
['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>',
['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>'
},
watch_gitdir = {
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
},
current_line_blame_formatter_opts = {
relative_time = false
},
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}
EOF

View File

@ -1,22 +0,0 @@
" disable all linters as that is taken care of by coc.nvim
let g:go_diagnostics_enabled = 0
let g:go_metalinter_enabled = []
" don't jump to errors after metalinter is invoked
let g:go_jump_to_error = 0
" run go imports on file save
let g:go_fmt_command = "goimports"
" automatically highlight variable your cursor is on
let g:go_auto_sameids = 0
" syntax highlighting
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_highlight_operators = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_generate_tags = 1

View File

@ -1,11 +0,0 @@
noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'n')<CR>
\<Cmd>lua require('hlslens').start()<CR>
noremap <silent> N <Cmd>execute('normal! ' . v:count1 . 'N')<CR>
\<Cmd>lua require('hlslens').start()<CR>
noremap * *<Cmd>lua require('hlslens').start()<CR>
noremap # #<Cmd>lua require('hlslens').start()<CR>
noremap g* g*<Cmd>lua require('hlslens').start()<CR>
noremap g# g#<Cmd>lua require('hlslens').start()<CR>
" use : instead of <Cmd>
nnoremap <silent> <leader>l :noh<CR>

View File

@ -1,3 +0,0 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

View File

@ -1,35 +0,0 @@
" Auto-toggle paste mode
let &t_SI .= "\<Esc>[?2004h"
let &t_EI .= "\<Esc>[?2004l"
function! XTermPasteBegin()
set pastetoggle=<Esc>[201~
set paste
return ""
endfunction
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
" Clear search highlighting
noremap <Leader><Esc> :noh<CR>
" Spellcheck
nnoremap <Leader>S :setlocal spell! spelllang=en_us<CR>
" Easy motion to start/end of a line
noremap H ^
noremap L $
" Toggle cursorline and relativelinenumber quickly
noremap <Leader>c :set cursorline!<CR>
noremap <Leader>n :set relativenumber!<CR>
" Oops, forgot a semi-colon...
noremap <Leader>; $a;<Esc>
" Search highlighted text in buffer
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
" Shift + J/K moves selected lines down/up in visual mode
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv

View File

@ -1,167 +0,0 @@
" User Interface
"{{{lightline.vim
"{{{lightline.vim-usage
" :h 'statusline'
" :h g:lightline.component
"}}}
"{{{functions
function! PomodoroStatus() abort"{{{
if pomo#remaining_time() ==# '0'
return "\ue001"
else
return "\ue003 ".pomo#remaining_time()
endif
endfunction"}}}
function! CocCurrentFunction()"{{{
return get(b:, 'coc_current_function', '')
endfunction"}}}
function! Devicons_Filetype()"{{{
" return winwidth(0) > 70 ? (strlen(&filetype) ? WebDevIconsGetFileTypeSymbol() . ' ' . &filetype : 'no ft') : ''
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
endfunction"}}}
function! Devicons_Fileformat()"{{{
return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
endfunction"}}}
function! Artify_active_tab_num(n) abort"{{{
return Artify(a:n, 'bold')." \ue0bb"
endfunction"}}}
function! Tab_num(n) abort"{{{
return a:n." \ue0bb"
endfunction"}}}
function! Gitbranch() abort"{{{
if gitbranch#name() !=# ''
return gitbranch#name()." \ue725"
else
return "\ue61b"
endif
endfunction"}}}
function! Artify_inactive_tab_num(n) abort"{{{
return Artify(a:n, 'double_struck')." \ue0bb"
endfunction"}}}
function! Artify_lightline_tab_filename(s) abort"{{{
return Artify(lightline#tab#filename(a:s), 'monospace')
endfunction"}}}
function! Artify_lightline_mode() abort"{{{
return Artify(lightline#mode(), 'monospace')
endfunction"}}}
function! Artify_line_percent() abort"{{{
return Artify(string((100*line('.'))/line('$')), 'bold')
endfunction"}}}
function! Artify_line_num() abort"{{{
return Artify(string(line('.')), 'bold')
endfunction"}}}
function! Artify_col_num() abort"{{{
return Artify(string(getcurpos()[2]), 'bold')
endfunction"}}}
function! Artify_gitbranch() abort"{{{
if gitbranch#name() !=# ''
return Artify(gitbranch#name(), 'monospace')." \ue725"
else
return "\ue61b"
endif
endfunction"}}}
"}}}
set laststatus=2 " Basic
set noshowmode " Disable show mode info
augroup CustomLightline
autocmd!
autocmd BufWritePost * call lightline_gitdiff#query_git() | call lightline#update()
augroup END
let g:lightline = {}
let g:lightline.separator = { 'left': "\ue0b8", 'right': "\ue0be" }
let g:lightline.subseparator = { 'left': "\ue0b9", 'right': "\ue0b9" }
let g:lightline.tabline_separator = { 'left': "\ue0bc", 'right': "\ue0ba" }
let g:lightline.tabline_subseparator = { 'left': "\ue0bb", 'right': "\ue0bb" }
let g:lightline#ale#indicator_checking = "\uf110"
let g:lightline#ale#indicator_warnings = "\uf529"
let g:lightline#ale#indicator_errors = "\uf00d"
let g:lightline#ale#indicator_ok = "\uf00c"
let g:lightline_gitdiff#indicator_added = '+'
let g:lightline_gitdiff#indicator_deleted = '-'
let g:lightline_gitdiff#indicator_modified = '*'
let g:lightline_gitdiff#min_winwidth = '70'
let g:lightline#asyncrun#indicator_none = ''
let g:lightline#asyncrun#indicator_run = 'Running...'
let g:lightline.active = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified', 'fileformat', 'devicons_filetype' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok', 'pomodoro' ],
\ [ 'asyncrun_status', 'coc_status' ] ]
\ }
let g:lightline.inactive = {
\ 'left': [ [ 'filename' , 'modified', 'fileformat', 'devicons_filetype' ]],
\ 'right': [ [ 'lineinfo' ] ]
\ }
let g:lightline.tabline = {
\ 'left': [ [ 'vim_logo', 'tabs' ] ],
\ 'right': [ [ 'gitbranch' ],
\ [ 'gitstatus' ] ]
\ }
let g:lightline.tab = {
\ 'active': [ 'tabnum', 'filename', 'modified' ],
\ 'inactive': [ 'tabnum', 'filename', 'modified' ] }
let g:lightline.tab_component = {
\ }
let g:lightline.tab_component_function = {
\ 'artify_activetabnum': 'Artify_active_tab_num',
\ 'artify_inactivetabnum': 'Artify_inactive_tab_num',
\ 'artify_filename': 'Artify_lightline_tab_filename',
\ 'filename': 'lightline#tab#filename',
\ 'modified': 'lightline#tab#modified',
\ 'readonly': 'lightline#tab#readonly',
\ 'tabnum': 'Tab_num'
\ }
let g:lightline.component = {
\ 'artify_gitbranch' : '%{Artify_gitbranch()}',
\ 'artify_mode': '%{Artify_lightline_mode()}',
\ 'artify_lineinfo': "%2{Artify_line_percent()}\uf295 %3{Artify_line_num()}:%-2{Artify_col_num()}",
\ 'gitstatus' : '%{lightline_gitdiff#get_status()}',
\ 'bufinfo': '%{bufname("%")}:%{bufnr("%")}',
\ 'vim_logo': "\ue7c5",
\ 'pomodoro': '%{PomodoroStatus()}',
\ 'mode': '%{lightline#mode()}',
\ 'absolutepath': '%F',
\ 'relativepath': '%f',
\ 'filename': '%t',
\ 'filesize': "%{HumanSize(line2byte('$') + len(getline('$')))}",
\ 'fileencoding': '%{&fenc!=#""?&fenc:&enc}',
\ 'fileformat': '%{&fenc!=#""?&fenc:&enc}[%{&ff}]',
\ 'filetype': '%{&ft!=#""?&ft:"no ft"}',
\ 'modified': '%M',
\ 'bufnum': '%n',
\ 'paste': '%{&paste?"PASTE":""}',
\ 'readonly': '%R',
\ 'charvalue': '%b',
\ 'charvaluehex': '%B',
\ 'percent': '%2p%%',
\ 'percentwin': '%P',
\ 'spell': '%{&spell?&spelllang:""}',
\ 'lineinfo': '%2p%% %3l:%-2v',
\ 'line': '%l',
\ 'column': '%c',
\ 'close': '%999X X ',
\ 'winnr': '%{winnr()}'
\ }
let g:lightline.component_function = {
\ 'gitbranch': 'Gitbranch',
\ 'devicons_filetype': 'Devicons_Filetype',
\ 'devicons_fileformat': 'Devicons_Fileformat',
\ 'coc_status': 'coc#status',
\ 'coc_currentfunction': 'CocCurrentFunction'
\ }
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ 'asyncrun_status': 'lightline#asyncrun#status'
\ }
let g:lightline.component_type = {
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error'
\ }
let g:lightline.component_visible_condition = {
\ 'gitstatus': 'lightline_gitdiff#get_status() !=# ""'
\ }
"}}}

View File

@ -1,47 +0,0 @@
autocmd BufWritePre *.go,*.rs lua vim.lsp.buf.formatting()
lua << EOF
local nvim_lsp = require('lspconfig')
local opts = { noremap=true, silent=true }
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.open_float()<CR>', opts)
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.setloclist()<CR>', opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(_, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- See `:help vim.lsp.*` for documentation on any of the below functions
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { 'solargraph', 'rust_analyzer', 'gopls', 'tsserver', 'stylelint_lsp', 'pylsp'}
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
for _, lsp in pairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
flags = {
debounce_text_changes = 150,
}
}
end
EOF

View File

@ -1,14 +0,0 @@
require("indent_blankline").setup {
space_char_blankline = " ",
context_highlight_list = {
"IndentBlanklineContext1",
"IndentBlanklineContext2",
"IndentBlanklineContext3",
"IndentBlanklineContext4",
"IndentBlanklineContext5",
"IndentBlanklineContext6",
},
show_end_of_line = true,
show_current_context = true,
use_treesitter = true,
}

View File

@ -1,13 +0,0 @@
let g:vim_markdown_conceal = 2
let g:vim_markdown_conceal_code_blocks = 0
let g:vim_markdown_math = 1
let g:vim_markdown_toml_frontmatter = 1
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_strikethrough = 1
let g:vim_markdown_autowrite = 1
let g:vim_markdown_edit_url_in = 'tab'
let g:vim_markdown_follow_anchor = 1
augroup CustomMarkdown
autocmd FileType markdown setlocal linebreak
augroup END

View File

@ -1,92 +0,0 @@
set completeopt=menu,menuone,noselect
" Expand
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
" Expand or jump
imap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
smap <expr> <C-l> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<C-l>'
" Jump forward or backward
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
" Select or cut text to use as $TM_SELECTED_TEXT in the next snippet.
" See https://github.com/hrsh7th/vim-vsnip/pull/50
nmap s <Plug>(vsnip-select-text)
xmap s <Plug>(vsnip-select-text)
nmap S <Plug>(vsnip-cut-text)
xmap S <Plug>(vsnip-cut-text)
lua <<EOF
-- Setup nvim-cmp.
local cmp = require'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
},
mapping = {
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
['<Down>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
['<Up>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
})
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
EOF

View File

@ -1,33 +0,0 @@
let g:nvim_tree_icons = {
\ 'default': '',
\ 'symlink': '',
\ 'git': {
\ 'unstaged': "✗",
\ 'staged': "✓",
\ 'unmerged': "",
\ 'renamed': "➜",
\ 'untracked': "★",
\ 'deleted': "",
\ 'ignored': "◌"
\ },
\ 'folder': {
\ 'arrow_open': "🢓",
\ 'arrow_closed': "🢒",
\ 'default': "",
\ 'open': "",
\ 'empty': "",
\ 'empty_open': "",
\ 'symlink': "",
\ 'symlink_open': "",
\ },
\ 'lsp': {
\ 'hint': "",
\ 'info': "",
\ 'warning': "",
\ 'error': "",
\ }
\ }
noremap <C-n> :NvimTreeToggle<CR>
lua require 'nvim-tree'.setup{}

View File

@ -1,66 +0,0 @@
" Assorted plugins
Plug 'cespare/vim-toml', { 'for': 'toml' }
Plug 'chrisbra/unicode.vim'
Plug 'kevinhwang91/nvim-hlslens'
Plug 'leafgarland/typescript-vim', { 'for': 'typescript' }
Plug 'leafoftree/vim-svelte-plugin', { 'for': 'svelte' }
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'mfussenegger/nvim-dap'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
"Plug 'petertriho/nvim-scrollbar'
Plug 'posva/vim-vue', { 'for': 'vue' }
Plug 'ron-rs/ron.vim', { 'for': 'ron' }
Plug 'simrat39/rust-tools.nvim'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-projectionist'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'
Plug 'vim-test/vim-test'
Plug 'wakatime/vim-wakatime'
Plug 'windwp/nvim-autopairs'
" LSP and autocomplete
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'
Plug 'rafamadriz/friendly-snippets'
" Gitsigns
Plug 'lewis6991/gitsigns.nvim'
" Telescope
Plug 'nvim-telescope/telescope.nvim'
" Lightline
Plug 'itchyny/lightline.vim'
Plug 'albertomontesg/lightline-asyncrun'
Plug 'itchyny/vim-gitbranch'
Plug 'macthecadillac/lightline-gitdiff'
Plug 'ryanoasis/vim-devicons'
Plug 'anstadnik/tmuxline.vim'
" Using the above fork for lightline truecolor support
" \ Plug 'edkolev/tmuxline.vim'
" NvimTree
Plug 'kyazdani42/nvim-tree.lua'
Plug 'kyazdani42/nvim-web-devicons'
" Vim-Markdown
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
" sonokai colorscheme + supporting plugins
Plug 'sainnhe/sonokai'
Plug 'rmolin88/pomodoro.vim'
Plug 'sainnhe/artify.vim'
" bogster colorscheme
Plug 'vv9k/bogster'

View File

@ -1,33 +0,0 @@
let g:rails_projections = {
\ "config/*": { "command": "config" },
\ "config/application.rb": { "command": "config" },
\ "spec/factories/*_factory.rb": { "command": "factory" },
\ "spec/factories/factories.rb": { "command": "factory" },
\ "app/javascript/Main.elm": { "command": "elm" },
\ "app/javascript/packs/*.elm": { "command": "elm" },
\ "app/javascript/packs/*.js": { "command": "pack", "alternate": "app/javascript/packs/{}.spec.js" },
\ "app/javascript/packs/*.spec.js": { "command": "packspec", "alternate": "app/javascript/{}.js" },
\ "app/javascript/src/*.js": { "command": "pack", "alternate": "app/javascript/src/{}.spec.js" },
\ "app/javascript/src/*.spec.js": { "command": "packspec", "alternate": "app/javascript/{}.js" },
\ "app/javascript/packs/*.jsx": { "command": "pack" },
\ "app/javascript/packs/application.js": { "command": "pack" },
\ "app/javascript/*.vue": { "command": "vue", "alternate": "app/javascript/{}.spec.js" },
\ "app/javascript/*.spec.js": { "command": "vuespec", "alternate": "app/javascript/{}.vue" },
\ "app/javascript/*.css": { "command": "packstylesheet" },
\ "app/javascript/*.scss": { "command": "packstylesheet" },
\ "app/javascript/*.sass": { "command": "packstylesheet" },
\ "app/javascript/*.js": { "command": "packjavascript" },
\ "app/javascript/*.coffee": { "command": "packjavascript" },
\ "app/jobs/*_job.rb": { "command": "job" },
\ "app/decorators/*_decorator.rb": { "command": "decorator" },
\ "app/presenters/*.rb": { "command": "presenter" },
\ "app/models/concerns/*.rb": { "command": "concern" },
\ "app/controllers/concerns/*.rb": { "command": "concern" },
\ "features/*.feature": { "command": "feature" },
\ "features/support/env.rb": { "command": "feature" },
\ "features/step_definitions/*_steps.rb": { "command": "step" },
\ "spec/acceptance/*_spec.rb": { "command": "feature" },
\ "spec/mailers/previews/*_preview.rb": { "command": "preview" },
\ "bin/*": { "command": "bin" },
\ "*.md": { "command": "doc" }
\}

View File

@ -1 +0,0 @@
let g:ruby_fold = 1

View File

@ -1,3 +0,0 @@
lua << EOF
require('rust-tools').setup({})
EOF

View File

@ -1 +0,0 @@
let g:rust_fold = 1

View File

@ -1,4 +0,0 @@
lua << EOF
require("scrollbar").setup()
require("scrollbar.handlers.search").setup()
EOF

View File

@ -1,5 +0,0 @@
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
nnoremap <leader>fp <cmd>lua require('telescope.builtin').builtin()<cr>

View File

@ -1,5 +0,0 @@
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>A :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
nmap <silent> <leader>g :TestVisit<CR>

View File

@ -1,23 +0,0 @@
let g:tmuxline_separators = {
\ 'left' : '',
\ 'left_alt': '',
\ 'right' : '',
\ 'right_alt' : '',
\ 'space' : ' '}
let g:tmuxline_preset = {
\'a' : '#S',
\'b' : '%R',
\'c' : '#{sysstat_mem} 祝#{upload_speed}',
\'win' : '#I #W',
\'cwin' : '#I #W',
\'x' : '#{download_speed}  #{sysstat_cpu}',
\'y' : '%a',
\'z' : '#H #{prefix_highlight}',
\'options' : {'status-justify' : 'centre'}}
augroup CustomTmuxline
autocmd!
autocmd InsertEnter * silent! Tmuxline lightline_insert
autocmd InsertLeave * silent! Tmuxline lightline
augroup END

173
vimrc
View File

@ -1,173 +0,0 @@
set autoread
set autowrite
set backspace=2
set breakindent
set clipboard=unnamed
set cmdheight=2
set colorcolumn=+1
set complete+=kspell
set cursorline
set diffopt+=vertical
set encoding=utf-8
set expandtab
set exrc
set fillchars=vert:▐
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
set hidden
set history=50
set incsearch
set laststatus=2
set listchars=tab:▸\ ,eol:↴,nbsp:␣,trail:•,space:⋅,extends:→,precedes:←
set list
set modelines=0
set mouse=a
set nobackup
set nojoinspaces
set nomodeline
set noswapfile
set nowritebackup
set number
set numberwidth=5
set ruler
set scrolloff=12
set shiftround
set shiftwidth=2
set shortmess+=c
set showbreak=··
set showcmd
set signcolumn=yes
set smartcase
set splitbelow
set splitright
set tabstop=2
set termencoding=utf-8
set textwidth=80
set title
set ttyfast
set updatetime=300
set vb t_vb=
syntax enable
syntax sync minlines=128 maxlines=512
" Cursor shapes
let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[0 q"
if executable('rg')
" Use rg over grep
set grepprg=rg\ --color\ never
endif
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Plugins
call plug#begin('~/.vim/plugged')
if filereadable(expand("~/.config/nvim/plugins.vimrc"))
source ~/.config/nvim/plugins.vimrc
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source ~/.config/nvim/plugins.vimrc
\| endif
endif
call plug#end()
" Keybindings
if filereadable(expand("~/.config/nvim/keybindings.vimrc"))
source ~/.config/nvim/keybindings.vimrc
endif
" Git setup
if filereadable(expand("~/.config/nvim/git.vimrc"))
source ~/.config/nvim/git.vimrc
endif
" Autocomplete
if has_key(g:plugs, "nvim-cmp") && filereadable(expand("~/.config/nvim/nvim-cmp.vimrc"))
source ~/.config/nvim/nvim-cmp.vimrc
endif
" Autopairs
if has_key(g:plugs, "nvim-autopairs") && has_key(g:plugs, "treesitter.nvim") && filereadable(expand("~/.config/nvim/autopairs.vimrc"))
source ~/.config/nvim/autopairs.vimrc
endif
" LSP
if has_key(g:plugs, "nvim-lspconfig") && has_key(g:plugs, "cmp-nvim-lsp") && filereadable(expand("~/.config/nvim/lspconfig.vimrc"))
source ~/.config/nvim/lspconfig.vimrc
endif
" Gitsigns setup
if has_key(g:plugs, "gitsigns.nvim") && filereadable(expand("~/.config/nvim/gitsigns.vimrc"))
source ~/.config/nvim/gitsigns.vimrc
endif
" Telescope setup
if has_key(g:plugs, "telescope.nvim") && filereadable(expand("~/.config/nvim/telescope.vimrc"))
source ~/.config/nvim/telescope.vimrc
endif
" Search
if has_key(g:plugs, "nvim-hlslens") && filereadable(expand("~/.config/nvim/hlslens.vimrc"))
source ~/.config/nvim/hlslens.vimrc
endif
" Lightline setup
if has_key(g:plugs, "lightline.vim") && filereadable(expand("~/.config/nvim/lightline.vimrc"))
source ~/.config/nvim/lightline.vimrc
endif
" Tmuxline setup
if has_key(g:plugs, "tmuxline.vim") && filereadable(expand("~/.config/nvim/tmuxline.vimrc"))
source ~/.config/nvim/tmuxline.vimrc
endif
" Indent setup
if has_key(g:plugs, "indent-blankline.nvim") && filereadable(expand("~/.config/nvim/lua/indent.lua"))
lua require('indent')
endif
" Scrollbar
if has_key(g:plugs, "nvim-scrollbar") && filereadable(expand("~/.config/nvim/scrollbar.vimrc"))
source ~/.config/nvim/scrollbar.vimrc
endif
" Tree setup
if has_key(g:plugs, "nvim-tree.lua") && filereadable(expand("~/.config/nvim/nvimtree.vimrc"))
source ~/.config/nvim/nvimtree.vimrc
endif
" Projections
if has_key(g:plugs, "vim-projectionist") && filereadable(expand("~/.config/nvim/projections.vimrc"))
source ~/.config/nvim/projections.vimrc
endif
" Test setup
if has_key(g:plugs, "vim-test") && filereadable(expand("~/.config/nvim/test.vimrc"))
source ~/.config/nvim/test.vimrc
endif
" Markdown setup
if has_key(g:plugs, "vim-markdown") && filereadable(expand("~/.config/nvim/markdown.vimrc"))
source ~/.config/nvim/markdown.vimrc
endif
" Rust tools
if has_key(g:plugs, "rust-tools.nvim") && has_key(g:plugs, "nvim-lspconfig") && filereadable(expand("~/.config/nvim/rust-tools.vimrc"))
source ~/.config/nvim/rust-tools.vimrc
endif
" Color setup
if has_key(g:plugs, "sonokai") && filereadable(expand("~/.config/nvim/colors.vimrc"))
source ~/.config/nvim/colors.vimrc
endif
" Set secure AFTER any other rc importing
set secure