diff --git a/nvim/ack.vimrc b/nvim/ack.vimrc deleted file mode 100644 index 4b3ebc3..0000000 --- a/nvim/ack.vimrc +++ /dev/null @@ -1,15 +0,0 @@ -if executable('rg') - let g:ackprg = 'rg --vimgrep --no-heading' " Use ripgrep for Ack - - noremap \ :Ack - noremap :Ack - - " 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 diff --git a/nvim/autopairs.vimrc b/nvim/autopairs.vimrc deleted file mode 100644 index db9af10..0000000 --- a/nvim/autopairs.vimrc +++ /dev/null @@ -1,28 +0,0 @@ -lua < %% 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 diff --git a/nvim/colors.vimrc b/nvim/colors.vimrc deleted file mode 100644 index f6cfc23..0000000 --- a/nvim/colors.vimrc +++ /dev/null @@ -1,59 +0,0 @@ -" True color support -if exists('+termguicolors') - let &t_8f = "\[38:2:%lu:%lu:%lum" - let &t_8b = "\[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 diff --git a/nvim/git.vimrc b/nvim/git.vimrc deleted file mode 100644 index 58ae266..0000000 --- a/nvim/git.vimrc +++ /dev/null @@ -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 diff --git a/nvim/gitsigns.vimrc b/nvim/gitsigns.vimrc deleted file mode 100644 index ed574de..0000000 --- a/nvim/gitsigns.vimrc +++ /dev/null @@ -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' : 'lua require\"gitsigns.actions\".next_hunk()'"}, - ['n [c'] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns.actions\".prev_hunk()'"}, - - ['n hs'] = 'lua require"gitsigns".stage_hunk()', - ['v hs'] = 'lua require"gitsigns".stage_hunk({vim.fn.line("."), vim.fn.line("v")})', - ['n hu'] = 'lua require"gitsigns".undo_stage_hunk()', - ['n hr'] = 'lua require"gitsigns".reset_hunk()', - ['v hr'] = 'lua require"gitsigns".reset_hunk({vim.fn.line("."), vim.fn.line("v")})', - ['n hR'] = 'lua require"gitsigns".reset_buffer()', - ['n hp'] = 'lua require"gitsigns".preview_hunk()', - ['n hb'] = 'lua require"gitsigns".blame_line(true)', - ['n hS'] = 'lua require"gitsigns".stage_buffer()', - ['n hU'] = 'lua require"gitsigns".reset_buffer_index()', - - -- Text objects - ['o ih'] = ':lua require"gitsigns.actions".select_hunk()', - ['x ih'] = ':lua require"gitsigns.actions".select_hunk()' - }, - 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 diff --git a/nvim/golang.vimrc b/nvim/golang.vimrc deleted file mode 100644 index 3f7c737..0000000 --- a/nvim/golang.vimrc +++ /dev/null @@ -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 diff --git a/nvim/hlslens.vimrc b/nvim/hlslens.vimrc deleted file mode 100644 index 07ec8d9..0000000 --- a/nvim/hlslens.vimrc +++ /dev/null @@ -1,11 +0,0 @@ -noremap n execute('normal! ' . v:count1 . 'n') - \lua require('hlslens').start() -noremap N execute('normal! ' . v:count1 . 'N') - \lua require('hlslens').start() -noremap * *lua require('hlslens').start() -noremap # #lua require('hlslens').start() -noremap g* g*lua require('hlslens').start() -noremap g# g#lua require('hlslens').start() - -" use : instead of -nnoremap l :noh diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index f182e5b..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,3 +0,0 @@ -set runtimepath^=~/.vim runtimepath+=~/.vim/after -let &packpath = &runtimepath -source ~/.vimrc diff --git a/nvim/keybindings.vimrc b/nvim/keybindings.vimrc deleted file mode 100644 index a2090ca..0000000 --- a/nvim/keybindings.vimrc +++ /dev/null @@ -1,35 +0,0 @@ -" Auto-toggle paste mode -let &t_SI .= "\[?2004h" -let &t_EI .= "\[?2004l" - -function! XTermPasteBegin() - set pastetoggle=[201~ - set paste - return "" -endfunction - -inoremap [200~ XTermPasteBegin() - -" Clear search highlighting -noremap :noh - -" Spellcheck -nnoremap S :setlocal spell! spelllang=en_us - -" Easy motion to start/end of a line -noremap H ^ -noremap L $ - -" Toggle cursorline and relativelinenumber quickly -noremap c :set cursorline! -noremap n :set relativenumber! - -" Oops, forgot a semi-colon... -noremap ; $a; - -" Search highlighted text in buffer -vnoremap // y/\V=escape(@",'/\') - -" Shift + J/K moves selected lines down/up in visual mode -vnoremap J :m '>+1gv=gv -vnoremap K :m '<-2gv=gv diff --git a/nvim/lightline.vimrc b/nvim/lightline.vimrc deleted file mode 100644 index 896fd45..0000000 --- a/nvim/lightline.vimrc +++ /dev/null @@ -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() !=# ""' - \ } -"}}} diff --git a/nvim/lspconfig.vimrc b/nvim/lspconfig.vimrc deleted file mode 100644 index 6e6792b..0000000 --- a/nvim/lspconfig.vimrc +++ /dev/null @@ -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', 'e', 'lua vim.lsp.diagnostic.open_float()', opts) -vim.api.nvim_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) -vim.api.nvim_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) -vim.api.nvim_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.setloclist()', 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 - 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', 'lua vim.lsp.buf.declaration()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', 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 diff --git a/nvim/lua/indent.lua b/nvim/lua/indent.lua deleted file mode 100644 index c5fc538..0000000 --- a/nvim/lua/indent.lua +++ /dev/null @@ -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, -} diff --git a/nvim/markdown.vimrc b/nvim/markdown.vimrc deleted file mode 100644 index facf5bb..0000000 --- a/nvim/markdown.vimrc +++ /dev/null @@ -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 diff --git a/nvim/nvim-cmp.vimrc b/nvim/nvim-cmp.vimrc deleted file mode 100644 index 42851b0..0000000 --- a/nvim/nvim-cmp.vimrc +++ /dev/null @@ -1,92 +0,0 @@ -set completeopt=menu,menuone,noselect - -" Expand -imap vsnip#expandable() ? '(vsnip-expand)' : '' -smap vsnip#expandable() ? '(vsnip-expand)' : '' - -" Expand or jump -imap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' -smap vsnip#available(1) ? '(vsnip-expand-or-jump)' : '' - -" Jump forward or backward -imap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' -smap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' -imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' -smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' - -" 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 (vsnip-select-text) -xmap s (vsnip-select-text) -nmap S (vsnip-cut-text) -xmap S (vsnip-cut-text) - -lua <'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), - [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }), - [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [''] = 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 diff --git a/nvim/nvimtree.vimrc b/nvim/nvimtree.vimrc deleted file mode 100644 index ffb62e3..0000000 --- a/nvim/nvimtree.vimrc +++ /dev/null @@ -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 :NvimTreeToggle - -lua require 'nvim-tree'.setup{} diff --git a/nvim/plugins.vimrc b/nvim/plugins.vimrc deleted file mode 100644 index 1cb67f0..0000000 --- a/nvim/plugins.vimrc +++ /dev/null @@ -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' diff --git a/nvim/projections.vimrc b/nvim/projections.vimrc deleted file mode 100644 index b1989cd..0000000 --- a/nvim/projections.vimrc +++ /dev/null @@ -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" } - \} diff --git a/nvim/ruby.vimrc b/nvim/ruby.vimrc deleted file mode 100644 index 2f5c33a..0000000 --- a/nvim/ruby.vimrc +++ /dev/null @@ -1 +0,0 @@ -let g:ruby_fold = 1 diff --git a/nvim/rust-tools.vimrc b/nvim/rust-tools.vimrc deleted file mode 100644 index 30123d0..0000000 --- a/nvim/rust-tools.vimrc +++ /dev/null @@ -1,3 +0,0 @@ -lua << EOF -require('rust-tools').setup({}) -EOF diff --git a/nvim/rust.vimrc b/nvim/rust.vimrc deleted file mode 100644 index 0bc83fa..0000000 --- a/nvim/rust.vimrc +++ /dev/null @@ -1 +0,0 @@ -let g:rust_fold = 1 diff --git a/nvim/scrollbar.vimrc b/nvim/scrollbar.vimrc deleted file mode 100644 index 7be28a7..0000000 --- a/nvim/scrollbar.vimrc +++ /dev/null @@ -1,4 +0,0 @@ -lua << EOF -require("scrollbar").setup() -require("scrollbar.handlers.search").setup() -EOF diff --git a/nvim/telescope.vimrc b/nvim/telescope.vimrc deleted file mode 100644 index a263333..0000000 --- a/nvim/telescope.vimrc +++ /dev/null @@ -1,5 +0,0 @@ -nnoremap ff lua require('telescope.builtin').find_files() -nnoremap fg lua require('telescope.builtin').live_grep() -nnoremap fb lua require('telescope.builtin').buffers() -nnoremap fh lua require('telescope.builtin').help_tags() -nnoremap fp lua require('telescope.builtin').builtin() diff --git a/nvim/test.vimrc b/nvim/test.vimrc deleted file mode 100644 index 2783fa1..0000000 --- a/nvim/test.vimrc +++ /dev/null @@ -1,5 +0,0 @@ -nmap t :TestNearest -nmap T :TestFile -nmap A :TestSuite -nmap l :TestLast -nmap g :TestVisit diff --git a/nvim/tmuxline.vimrc b/nvim/tmuxline.vimrc deleted file mode 100644 index 2c7fea8..0000000 --- a/nvim/tmuxline.vimrc +++ /dev/null @@ -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 diff --git a/vimrc b/vimrc deleted file mode 100644 index fe0eb02..0000000 --- a/vimrc +++ /dev/null @@ -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 = "\[6 q" -let &t_SR = "\[4 q" -let &t_EI = "\[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