" https://github.com/junegunn/vim-plug if empty(glob('~/.config/nvim/autoload/plug.vim'))" silent !curl -fLo ~/.config/nvim/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('~/.config/nvim/bundle') " colorscheme (temporary) Plug 'https://github.com/marko-cerovac/material.nvim', { 'branch': 'main' } let g:material_style = 'lighter' " colorscheme in develpment paper-tonic Plug '~/projects/nvim-paper-tonic' " #nvim-treesitter {{{ " https://github.com/nvim-treesitter/nvim-treesitter Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " update the parsers on update " config needs to be after call to plug#end " Treesitter uses a different parser for every language, which needs to be generated " If the language is already supported by nvim-treesitter, you can install it with " :TSInstall " - can use tab completion with this " Parsers not on this list can be added manually " " If you update nvim-treesitter and want to make sure the parser is at the latest compatible version (as specified in nvim-treesitter's lockfile.json), use " :TSUpdate {language}. " To update all parsers unconditionally, use " :TSUpdate all or just :TSUpdate. " " Each module provides a distinct tree-sitter-based feature such as highlighting, indentation, or folding; see :h nvim-treesitter-modules or "Available modules" below for a list of modules and their options. " All modules are disabled by default and need to be activated explicitly in your init.vim " " Each module can also be enabled or disabled interactively through the following commands: " :TSBufEnable {module} " enable module on current buffer " :TSBufDisable {module} " disable module on current buffer " :TSEnableAll {module} [{ft}] " enable module on every buffer. If filetype is specified, enable only for this filetype. " :TSDisableAll {module} [{ft}] " disable module on every buffer. If filetype is specified, disable only for this filetype. " :TSModuleInfo [{module}] " list information about modules state for each filetype " " Check :h nvim-treesitter-commands for a list of all available commands. It may be necessary to reload the buffer (e.g., via :e) after enabling a module interactively. "}}} " #playground (temporary) {{{ " https://github.com/nvim-treesitter/playground Plug 'nvim-treesitter/playground' "}}} " #vim-lspconfig {{{ " https://github.com/neovim/nvim-lspconfig " https://github.com/neovim/nvim-lspconfig/wiki Plug 'neovim/nvim-lspconfig' "}}} " #plenary.nvim {{{ " https://github.com/nvim-lua/plenary.nvim " required for null-ls Plug 'nvim-lua/plenary.nvim' "}}} " #null-ls.nvim {{{ " https://github.com/jose-elias-alvarez/null-ls.nvim Plug 'jose-elias-alvarez/null-ls.nvim' "}}} " #nvim-cmp {{{ " https://github.com/hrsh7th/nvim-cmp/ " completion Plug 'hrsh7th/nvim-cmp', { 'branch': 'main' } Plug 'hrsh7th/cmp-nvim-lsp', { 'branch': 'main' } Plug 'hrsh7th/cmp-buffer', { 'branch': 'main' } Plug 'hrsh7th/cmp-path', { 'branch': 'main' } " Plug 'uga-rosa/cmp-dictionary', { 'branch': 'main' } let g:cmp_dictionary_exact = -1 Plug 'quangnguyen30192/cmp-nvim-ultisnips', { 'branch': 'main' } "}}} " #indent-blankline.nvim {{{ " https://github.com/lukas-reineke/indent-blankline.nvim Plug 'lukas-reineke/indent-blankline.nvim' "}}} " #iamcco/markdown-preview.nvim {{{ " https://github.com/iamcco/markdown-preview.nvim Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} let g:mkdp_browser = '/usr/local/bin/chromium-app' let g:mkdp_echo_preview_url = 1 nmap m MarkdownPreviewToggle " commands " MarkdownPreview " MarkdownPreviewStop " MarkdownPreviewToggle "}}} " keeping " #vim-hexokinase {{{ " https://github.com/chrisbra/Colorizer " display colors asynchronously Plug 'chrisbra/Colorizer' " let g:colorizer_use_virtual_text = 1 nnoremap cc :ColorToggle "}}} " #nvim-autopairs {{{ " https://github.com/windwp/nvim-autopairs " automatic quote, paranthesis,etc closing. Plug 'windwp/nvim-autopairs' "}}} " #nvim-autopairs {{{ " https://github.com/windwp/nvim-ts-autotag " automatic html tag closing/renaming. Plug 'windwp/nvim-ts-autotag', { 'branch': 'main' } "}}} " #emmet-vim {{{ " https://github.com/mattn/emmet-vim Plug 'mattn/emmet-vim' let g:user_emmet_leader_key=',,' let g:user_emmet_settings = { \ 'indentation': ' ', \} "}}} " #gitgutter {{{ " https://github.com/airblade/vim-gitgutter/blob/master/README.mkd " show git diff in sign column Plug 'airblade/vim-gitgutter' nmap ]h (GitGutterNextHunk) nmap [h (GitGutterPrevHunk) omap ih (GitGutterTextObjectInnerPending) omap ah (GitGutterTextObjectOuterPending) xmap ih (GitGutterTextObjectInnerVisual) xmap ah (GitGutterTextObjectOuterVisual) "}}} " #MatchTagAlways{{{ " always highlights xml/html tags enclosing cursor " https://github.com/Valloric/MatchTagAlways Plug 'Valloric/MatchTagAlways' let g:mta_filetypes = { \ 'jinja' : 1, \ 'html' : 1, \ 'vue' : 1, \ 'xhtml' : 1, \ 'xml' : 1, \} "}}} " #quickscope{{{ " highlights unique characters when using f, F, etc " https://github.com/unblevable/quick-scope Plug 'unblevable/quick-scope' let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] "}}} " #switch {{{ "https://github.com/AndrewRadev/switch.vim Plug 'AndrewRadev/switch.vim' let g:switch_mapping = '-' let g:switch_custom_definitions = [ \ ['0', '1'], \ ['ease-in', 'ease-out', 'ease-in-out', 'linear'], \ ['auto', 'none'], \ ['left', 'right'], \ ['top', 'bottom'], \ ['row', 'column'], \ ['relative', 'absolute', 'fixed'], \ ['private', 'public', 'protected'] \ ] "}}} " #ultisnips {{{ " https://github.com/sirver/UltiSnips Plug 'SirVer/ultisnips' " and some snippets " https://github.com/honza/vim-snippets " Plug 'honza/vim-snippets' nnoremap ul :call ListUltisnips() inoremap jkul :call ListUltisnips() let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips' " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. let g:UltiSnipsExpandTrigger='' let g:UltiSnipsJumpForwardTrigger='' let g:UltiSnipsJumpBackwardTrigger='' let g:UltiSnipsEditSplit='horizontal' function! ListUltisnips() abort"{{{ let l:snips = UltiSnips#SnippetsInCurrentScope(1) let l:keylist = sort(keys(l:snips)) echo ' --------------------------------------------------' for l:key in l:keylist echo printf(" %-10s\t%s", l:key, l:snips[l:key]) endfor echo '---------------------------------------------------' endfunction "}}} function! CompleteSnippets(findstart, base)"{{{ if a:findstart let l:line = getline('.') let l:start = col('.') - 1 while l:start > 0 && l:line[l:start - 1] =~ '\a' let l:start -= 1 endwhile return l:start else let l:res = [] let l:snips = UltiSnips#SnippetsInCurrentScope(1) let l:keylist = sort(keys(l:snips)) for l:key in l:keylist if l:key =~ '^' . a:base let l:item = {'word': l:key, 'menu': l:snips[l:key]} call add(l:res, l:item) endif endfor return l:res endif endfunction "}}} set completefunc=CompleteSnippets "}}} " #Netrw {{{ let g:netrw_liststyle=3 let g:netrw_list_hide=netrw_gitignore#Hide() let g:netrw_preview = 0 let g:netrw_winsize = 50 let g:netrw_altv = &spr let g:netrw_alto = 1 let g:netrw_altfile = 1 let g:netrw_mousemaps = 0 "}}} " #Obsession{{{ " fork of tpope/vim-obsession Plug 'studio-vx/vim-obsession' "}}} " #tcomment_vim{{{ " https://github.com/tomtom/tcomment_vim Plug 'tomtom/tcomment_vim' "}}} " #vim-rsi{{{ "https://github.com/tpope/vim-rsi Plug 'tpope/vim-rsi' "}}} " #vim-repeat{{{ " https://github.com/tpope/vim-repeat " makes repeat . work for more stuff Plug 'tpope/vim-repeat' "}}} " #vim-surround{{{ Plug 'tpope/vim-surround' "}}} " #vim-wakatime{{{ Plug 'wakatime/vim-wakatime' "}}} " reconfigure and learn to use properly " #vim-fzf {{{ " https://github.com/junegunn/fzf.vim Plug 'junegunn/fzf' Plug 'junegunn/fzf.vim' nnoremap fg :GFiles nnoremap ff :Files nnoremap fh :History nnoremap fb :Buffers nnoremap fH :Helptags let g:fzf_preview_window = 'right:60%' let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], \ 'bg': ['bg', 'Normal'], \ 'hl': ['fg', 'Label'], \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], \ 'hl+': ['fg', 'WildMenu'], \ 'info': ['fg', 'Comment'], \ 'border': ['fg', 'Comment'], \ 'prompt': ['fg', 'Constant'], \ 'pointer': ['fg', 'Special'], \ 'marker': ['fg', 'Keyword'], \ 'spinner': ['fg', 'Label'], \ 'header': ['fg', 'Comment'] } " Rg that doesn't ignore .gitignore or any other files command! -bang -nargs=* Rgall \ call fzf#vim#grep( \ 'rg -uuu --column --line-number --no-heading --color=always --smart-case -- '.shellescape(), 1, \ fzf#vim#with_preview(), 0) "}}} " #vim-shellcheck{{{ " https://github.com/itspriddle/vim-shellcheck Plug 'itspriddle/vim-shellcheck' "}}} " #vim-markdown{{{ " https://github.com/plasticboy/vim-markdown Plug 'plasticboy/vim-markdown' let g:vim_markdown_toc_autofit = 1 let g:vim_markdown_fenced_languages = ['bash=sh'] "}}} " #undotree {{{ Plug 'mbbill/undotree' nnoremap ut :UndotreeToggle "}}} " #vim-floaterm{{{ " https://github.com/voldikss/floaterm " allows to open floating terminal Plug 'voldikss/vim-floaterm' let g:floaterm_opener = 'edit' nnoremap lf :FloatermNew --height=0.9 --width=0.9 lf nnoremap lg :FloatermNew --height=0.9 --width=0.9 lazygit "}}} " #vim-Jinja2-Syntax{{{ " https://github.com/studio-vx/Vim-Jinja2-Syntax " original: https://github.com/Glench/Vim-Jinja2-Syntax Plug 'studio-vx/Vim-Jinja2-Syntax' "}}} " ------------------------------------------------------------------------------ call plug#end() runtime macros/matchit.vim " require lua init modules lua <