diff options
| author | Chris <[email protected]> | 2020-04-02 14:41:26 -0400 | 
|---|---|---|
| committer | Chris <[email protected]> | 2020-04-02 14:41:26 -0400 | 
| commit | c24b07132d2dbe827d29f395a15370e24c6c5235 (patch) | |
| tree | edc44b81c3b36ff9fe1bd2dbdc25bc43f8262f1c /modules | |
| parent | 2df64a787b1cd437c7045a0ab748976776611238 (diff) | |
auto push
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/deoplete.vim | 37 | ||||
| -rw-r--r-- | modules/general.vim | 13 | ||||
| -rw-r--r-- | modules/goyo-limelight.vim | 31 | ||||
| -rw-r--r-- | modules/gutentags_plus.vim | 6 | ||||
| -rw-r--r-- | modules/language_server.vim | 21 | ||||
| -rw-r--r-- | modules/neosnippets.vim | 22 | ||||
| -rw-r--r-- | modules/nerdtree.vim | 5 | ||||
| -rw-r--r-- | modules/plugins.vim | 8 | ||||
| -rw-r--r-- | modules/startify.vim | 26 | ||||
| -rw-r--r-- | modules/vim-which-key.vim | 40 | ||||
| -rw-r--r-- | modules/vim_wiki.vim | 32 | 
11 files changed, 122 insertions, 119 deletions
| diff --git a/modules/deoplete.vim b/modules/deoplete.vim deleted file mode 100644 index 4023f5fc..00000000 --- a/modules/deoplete.vim +++ /dev/null @@ -1,37 +0,0 @@ -" Enable deoplete -let g:deoplete#enable_at_startup = 1 -let g:deoplete#complete_method = "omnifunc" -let g:deoplete#auto_complete_delay = 0 -""let g:deoplete#max_menu_width = 10 -" let g:deoplete#ignore_sources = ['buffer'] -" Close previews immediately -autocmd CompleteDone * silent! pclose! - -"better nav for omnicomplete -inoremap <expr> <c-j> ("\<C-n>") -inoremap <expr> <c-k> ("\<C-p>") - -"<TAB>: completion. -""inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" -"use TAB as the mapping -inoremap <silent><expr> <TAB> -      \ pumvisible() ?  "\<C-n>" : -      \ <SID>check_back_space() ? "\<TAB>" : -      \ deoplete#mappings#manual_complete() -function! s:check_back_space() abort ""      -  let col = col('.') - 1 -  return !col || getline('.')[col - 1]  =~ '\s' -endfunction ""    -inoremap <silent><expr><S-TAB>  pumvisible() ? "\<C-p>" : "\<TAB>" -inoremap <expr><BS>  deoplete#smart_close_popup()."\<C-h>" - - -" Only get completion candidates from these -"call deoplete#custom#option('sources', { -  "\ 'python': ['file', 'LanguageClient', 'neosnippet'], -  "\ }) - -" Sort matches alphabetically -call deoplete#custom#source('_', 'sorters', ['sorter_word']) -" Disable shorter or equal length matches -call deoplete#custom#source('_', 'matchers', ['matcher_fuzzy', 'matcher_length']) diff --git a/modules/general.vim b/modules/general.vim index c77460fa..83275709 100644 --- a/modules/general.vim +++ b/modules/general.vim @@ -11,7 +11,6 @@ xmap <space> \  syntax enable                           " Enables syntax highlighing  set hidden                              " Required for specific actions that require multiple buffers -set conceallevel=0  set nowrap                              " display long lines as just one line  set encoding=utf-8                      " The encoding displayed   set pumheight=10                        " Makes popup menu smaller @@ -24,7 +23,7 @@ set splitbelow                          " Horizontal splits will automatically b  set splitright                          " Vertical splits will automatically be to the right  set t_Co=256                            " Support 256 colors  set autochdir                           " Your working directory will always be the same as your working directory -:set conceallevel=0                     " So that I can see `` in markdown files +set conceallevel=0                     " So that I can see `` in markdown files  set tabstop=2                           " Insert 2 spaces for a tab  set shiftwidth=2                        " Change the number of space characters inserted for indentation  set smarttab                            " Makes tabbing smarter will realize you have 2 vs 4 @@ -78,11 +77,21 @@ nnoremap <M-j> <C-w>j  nnoremap <M-k> <C-w>k  nnoremap <M-l> <C-w>l +" I think this does something on mac but I might be full of shit  nnoremap <D-h> <C-w>h  nnoremap <D-j> <C-w>j  nnoremap <D-k> <C-w>k  nnoremap <D-l> <C-w>l + +" TAB in general mode will move to text buffer +nnoremap <C-TAB> :VimwikiNextLink<CR> +" SHIFT-TAB will go back +nnoremap <C-S-TAB> :VimwikiPrevLink<CR> + +nmap <Leader>wn <Plug>VimwikiNextLink +nmap <Leader>wp <Plug>VimwikiPrevLink +<  " TAB in general mode will move to text buffer  nnoremap <TAB> :bnext<CR>  " SHIFT-TAB will go back diff --git a/modules/goyo-limelight.vim b/modules/goyo-limelight.vim index 74b6bea3..0749f108 100644 --- a/modules/goyo-limelight.vim +++ b/modules/goyo-limelight.vim @@ -9,7 +9,7 @@ let g:goy_height=95  function! s:goyo_enter() -  call deoplete#custom#option('auto_complete', v:false) +  "call deoplete#custom#option('auto_complete', v:false)    set spell spelllang=en_us    set wrap    set conceallevel=0 @@ -18,23 +18,46 @@ function! s:goyo_enter()    set scrolloff=999  ""  set background=light  ""  colorscheme flattened_light -  Limelight +  "Limelight    " ...  endfunction  function! s:goyo_leave() -  call deoplete#custom#option('auto_complete', v:true) +  "call deoplete#custom#option('auto_complete', v:true)    set nospell    set wrap!    set showcmd    set scrolloff=5  ""  set background=dark  ""  colorscheme Tender -  Limelight! +  "Limelight!    " ...  endfunction  autocmd! User GoyoEnter nested call <SID>goyo_enter()  autocmd! User GoyoLeave nested call <SID>goyo_leave() +" Color name (:help cterm-colors) or ANSI code +let g:limelight_conceal_ctermfg = 'gray' +let g:limelight_conceal_ctermfg = 240 + +" Color name (:help gui-colors) or RGB color +let g:limelight_conceal_guifg = 'DarkGray' +let g:limelight_conceal_guifg = '#777777' + +" Default: 0.5 +let g:limelight_default_coefficient = 0.7 + +" Number of preceding/following paragraphs to include (default: 0) +let g:limelight_paragraph_span = 0 + +" Beginning/end of paragraph +"   When there's no empty line between the paragraphs +"   and each paragraph starts with indentation +let g:limelight_bop = '^\s' +let g:limelight_eop = '\ze\n^\s' + +" Highlighting priority (default: 10) +"   Set it to -1 not to overrule hlsearch +let g:limelight_priority = -1 diff --git a/modules/gutentags_plus.vim b/modules/gutentags_plus.vim index 2e6b185e..370cf7f6 100644 --- a/modules/gutentags_plus.vim +++ b/modules/gutentags_plus.vim @@ -16,3 +16,9 @@ let g:gutentags_file_list_command = 'rg --files'  "Install ripgrep"  "Install ctags"  ".notags will ignore everything" + +" I think this is built in but it's nice to know that if yo +" have ripgrep ctags will ignore everyhting in your .gitignore +if executable('rg') +  let g:gutentags_file_list_command = 'rg --files' +endif diff --git a/modules/language_server.vim b/modules/language_server.vim deleted file mode 100644 index 78b6a046..00000000 --- a/modules/language_server.vim +++ /dev/null @@ -1,21 +0,0 @@ -" Required for operations modifying multiple buffers like rename. -set hidden -" always show signcolumns -set signcolumn=yes -let g:LanguageClient_autoStart = 1 - -let g:LanguageClient_serverCommands = { -    \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], -    \ 'javascript': ['javascript-typescript-stdio'], -    \ 'javascript.jsx': ['javascript-typescript-stdio'], -    \ 'python': ['~/.miniconda/envs/neovim/bin/pyls'],  -    \ 'sh': ['bash-language-server', 'start'], -    \ 'c' : ['cquery'], -    \ 'cpp' : ['cquery'], -    \ } -nnoremap <silent> <leader>gh :call LanguageClient_textDocument_hover()<CR> -nnoremap <silent> <leader>gd :call LanguageClient_textDocument_definition()<CR> -nnoremap <silent> <leader>gr :call LanguageClient_textDocument_rename()<CR> -nnoremap <silent> <leader>gc :call LanguageClient_contextMenu()<CR> -nnoremap <silent> <leader>fr :call LanguageClient_textDocument_references()<CR> -""nnoremap <silent> <leader>fix :call LanguageClient#textDocument_formatting()<CR> diff --git a/modules/neosnippets.vim b/modules/neosnippets.vim deleted file mode 100644 index bbb5fc2a..00000000 --- a/modules/neosnippets.vim +++ /dev/null @@ -1,22 +0,0 @@ -" Plugin key-mappings. -" Note: It must be "imap" and "smap".  It uses <Plug> mappings. -imap <C-l>     <Plug>(neosnippet_expand_or_jump) -smap <C-l>     <Plug>(neosnippet_expand_or_jump) -xmap <C-l>     <Plug>(neosnippet_expand_target) - -imap <F4>     <Plug>(neosnippet_expand_or_jump) -smap <F4>     <Plug>(neosnippet_expand_or_jump) -xmap <F4>     <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 diff --git a/modules/nerdtree.vim b/modules/nerdtree.vim index e445a189..973ac264 100644 --- a/modules/nerdtree.vim +++ b/modules/nerdtree.vim @@ -23,3 +23,8 @@ let g:NERDTreePatternMatchHighlightFullName = 1  let g:NERDTreeHighlightFolders = 1 " enables folder icon highlighting using exact match  let g:NERDTreeHighlightFoldersFullName = 1 " highlights the folder name +" Original coloring +highlight! link NERDTreeFlags NERDTreeDir +" Get rid of help thing at the top +"let NERDTreeMinimalUI=1 + diff --git a/modules/plugins.vim b/modules/plugins.vim index 80388657..d1a52d80 100644 --- a/modules/plugins.vim +++ b/modules/plugins.vim @@ -27,16 +27,18 @@ if dein#load_state('~/.config/nvim/dein')    call dein#add('janko-m/vim-test')    " Better Syntax Support    call dein#add('sheerun/vim-polyglot') -  " powerline +  " Powerline    call dein#add('vim-airline/vim-airline')    call dein#add('vim-airline/vim-airline-themes') -  " File manager +  " File explorer    call dein#add('scrooloose/NERDTree')    " Comments "    call dein#add('scrooloose/nerdcommenter')    " Icons    call dein#add('ryanoasis/vim-devicons')    call dein#add('tiagofumo/vim-nerdtree-syntax-highlight') +  " Git support +  call dein#add('Xuyuanp/nerdtree-git-plugin')    " Start Screen    call dein#add('mhinz/vim-startify')    " For ctags @@ -72,6 +74,8 @@ if dein#load_state('~/.config/nvim/dein')    call dein#add('Shougo/neosnippet.vim')    call dein#add('Shougo/neosnippet-snippets')    call dein#add('mattn/emmet-vim') +  " Vim Wiki +  call dein#add('vimwiki/vimwiki')    "echo doc     call dein#add('Shougo/echodoc.vim')    "Colorizer " diff --git a/modules/startify.vim b/modules/startify.vim index 8cdaf8b8..6f12ecc4 100644 --- a/modules/startify.vim +++ b/modules/startify.vim @@ -1,16 +1,16 @@ -let g:startify_custom_header = [ -\ '  __    _________                            __    ____   ____.__          ', -\ ' / /   /   _____/__________    ____  ____    \ \   \   \ /   /|__| _____   ', -\ '/ /    \_____  \\____ \__  \ _/ ___\/ __ \    \ \   \   Y   / |  |/     \  ', -\ '\ \    /        \  |_> > __ \\  \__\  ___/    / /    \     /  |  |  Y Y  \ ', -\ ' \_\  /_______  /   __(____  /\___  >___  >  /_/      \___/   |__|__|_|  / ', -\ '              \/|__|       \/     \/    \/                             \/  '] +"let g:startify_custom_header = [ +"\ '  __    _________                            __    ____   ____.__          ', +"\ ' / /   /   _____/__________    ____  ____    \ \   \   \ /   /|__| _____   ', +"\ '/ /    \_____  \\____ \__  \ _/ ___\/ __ \    \ \   \   Y   / |  |/     \  ', +"\ '\ \    /        \  |_> > __ \\  \__\  ___/    / /    \     /  |  |  Y Y  \ ', +"\ ' \_\  /_______  /   __(____  /\___  >___  >  /_/      \___/   |__|__|_|  / ', +"\ '              \/|__|       \/     \/    \/                             \/  '] -"let g:startify_custom_header = [                                                                                                                                                                                  -  "\ '     _   __                _         ', -  "\ '    / | / /__  ____ _   __(_)___ ___ ', -  "\ '   /  |/ / _ \/ __ \ | / / / __ `__ \', -  "\ '  / /|  /  __/ /_/ / |/ / / / / / / /', -  "\ ' /_/ |_/\___/\____/|___/_/_/ /_/ /_/ '] +let g:startify_custom_header = [                                                                                                                                                                                  +  \ '     _   __                _         ', +  \ '    / | / /__  ____ _   __(_)___ ___ ', +  \ '   /  |/ / _ \/ __ \ | / / / __ `__ \', +  \ '  / /|  /  __/ /_/ / |/ / / / / / / /', +  \ ' /_/ |_/\___/\____/|___/_/_/ /_/ /_/ '] diff --git a/modules/vim-which-key.vim b/modules/vim-which-key.vim index 7388e02b..3b24273f 100644 --- a/modules/vim-which-key.vim +++ b/modules/vim-which-key.vim @@ -29,14 +29,18 @@ nnoremap <silent> <leader>in :call OpenConfigFile('~/.config/nvim/init.vim')<cr>  nnoremap <silent> <leader>bashrc :call OpenConfigFile('~/.bashrc')<cr>  nnoremap <silent> <leader>code :call OpenConfigFile('~/Library/Application Support/Code/User/settings.json')<cr> -let g:which_key_map['/'] = [ '<Plug>NERDCommenterToggle','commenter' ] +let g:which_key_map['/'] = [ '<Plug>NERDCommenterToggle', 'commenter' ]  let g:which_key_map['e'] = [ 'NERDTreeToggle', 'file-explorer' ]            -let g:which_key_map['p'] = [ 'pclose','close-preview' ] -let g:which_key_map['q'] = [ 'q','quit' ] -let g:which_key_map['d'] = [ 'bd','delete-buffer' ] -let g:which_key_map['s'] = [ 'w','save' ] -let g:which_key_map['r'] = [ 'Ranger','ranger' ] -let g:which_key_map['f'] = [ 'FZF','fzf' ] +let g:which_key_map['p'] = [ 'pclose'    , 'close-preview' ] +let g:which_key_map['q'] = [ 'q'         , 'quit' ] +let g:which_key_map['d'] = [ 'bd'        , 'delete-buffer' ] +let g:which_key_map['s'] = [ 'w'         , 'save' ] +let g:which_key_map['r'] = [ 'Ranger'    , 'ranger' ] +let g:which_key_map['f'] = [ 'FZF'       , 'fzf' ] +let g:which_key_map['z'] = [ 'Goyo'      , 'zen-mode' ] +let g:which_key_map['v'] = ['<C-W>v'     , 'split-window-right'] +let g:which_key_map['h'] = ['<C-W>s'     , 'split-window-below'] +let g:which_key_map['o'] = ['only'       , 'close-all-other-windows']  let g:which_key_map.t = {        \ 'name' : '+toggle' , @@ -79,17 +83,17 @@ let g:which_key_map.l = {          \ },        \ } -let g:which_key_map.w = { -      \ 'name' : '+windows' , -      \ 'v' : ['<C-W>v'     , 'split-window-right']    , -      \ 'h' : ['<C-W>s'     , 'split-window-below']    , -      \ 'w' : ['<C-W>w'     , 'other-window']          , -      \ 'o' : ['only'       , 'close-all-other-windows']    , -      \ 'd' : ['<C-W>c'     , 'delete-window']         , -      \ '2' : ['<C-W>v'     , 'layout-double-columns'] , -      \ '=' : ['<C-W>='     , 'balance-window']        , -      \ '?' : ['Windows'    , 'fzf-window']            , -      \ } +"let g:which_key_map.w = { +      "\ 'name' : '+windows' , +      "\ 'v' : ['<C-W>v'     , 'split-window-right']    , +      "\ 'h' : ['<C-W>s'     , 'split-window-below']    , +      "\ 'w' : ['<C-W>w'     , 'other-window']          , +      "\ 'o' : ['only'       , 'close-all-other-windows']    , +      "\ 'd' : ['<C-W>c'     , 'delete-window']         , +      "\ '2' : ['<C-W>v'     , 'layout-double-columns'] , +      "\ '=' : ['<C-W>='     , 'balance-window']        , +      "\ '?' : ['Windows'    , 'fzf-window']            , +      "\ }  let g:which_key_map.b = {         \ 'name' : '+buffer' , diff --git a/modules/vim_wiki.vim b/modules/vim_wiki.vim new file mode 100644 index 00000000..4bce4f0e --- /dev/null +++ b/modules/vim_wiki.vim @@ -0,0 +1,32 @@ +let g:vimwiki_list = [{'path': '~/wiki/', +                      \ 'syntax': 'markdown', 'ext': '.md'}] + +" TAB in general mode will move to text buffer +nnoremap <TAB> :bnext<CR> +" SHIFT-TAB will go back +nnoremap <S-TAB> :bprevious<CR> + + + +"let g:vimwiki_list = [{'path': '~/wiki/', 'index': 'main'}] +"Key bindings +"Normal mode: + +"<Leader>ww -- Open default wiki index file. +"<Leader>wt -- Open default wiki index file in a new tab. +"<Leader>ws -- Select and open wiki index file. +"<Leader>wd -- Delete wiki file you are in. +"<Leader>wr -- Rename wiki file you are in. +"<Enter> -- Follow/Create wiki link +"<Shift-Enter> -- Split and follow/create wiki link +"<Ctrl-Enter> -- Vertical split and follow/create wiki link +"<Backspace> -- Go back to parent(previous) wiki link +"<Tab> -- Find next wiki link +"<Shift-Tab> -- Find previous wiki link +"For more keys, see :h vimwiki-mappings + +"Commands +":Vimwiki2HTML -- Convert current wiki link to HTML +":VimwikiAll2HTML -- Convert all your wiki links to HTML +":help vimwiki-commands -- list all commands +":help vimwiki -- General vimwiki help docs | 
