Chris hace 4 años
padre
commit
013bccb990
Se han modificado 5 ficheros con 437 adiciones y 87 borrados
  1. 52 32
      autoload/plug.vim
  2. 2 2
      init.vim
  3. 34 5
      utils/vscode_config/keybindings.json
  4. 341 43
      utils/vscode_config/settings.json
  5. 8 5
      vim-plug/plugins.vim

+ 52 - 32
autoload/plug.vim

@@ -25,7 +25,7 @@
 "   Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
 "   Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
 "   Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
 "   Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
 "
 "
-"   " Using a non-master branch
+"   " Using a non-default branch
 "   Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
 "   Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
 "
 "
 "   " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
 "   " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
@@ -106,7 +106,7 @@ if s:is_win && &shellslash
 else
 else
   let s:me = resolve(expand('<sfile>:p'))
   let s:me = resolve(expand('<sfile>:p'))
 endif
 endif
-let s:base_spec = { 'branch': 'master', 'frozen': 0 }
+let s:base_spec = { 'branch': '', 'frozen': 0 }
 let s:TYPE = {
 let s:TYPE = {
 \   'string':  type(''),
 \   'string':  type(''),
 \   'list':    type([]),
 \   'list':    type([]),
@@ -646,25 +646,25 @@ function! s:parse_options(arg)
     endif
     endif
     let opts.tag = a:arg
     let opts.tag = a:arg
   elseif type == s:TYPE.dict
   elseif type == s:TYPE.dict
-    call extend(opts, a:arg)
     for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as']
     for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as']
-      if has_key(opts, opt)
-      \ && (type(opts[opt]) != s:TYPE.string || empty(opts[opt]))
+      if has_key(a:arg, opt)
+      \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt]))
         throw printf(opt_errfmt, opt, 'string')
         throw printf(opt_errfmt, opt, 'string')
       endif
       endif
     endfor
     endfor
     for opt in ['on', 'for']
     for opt in ['on', 'for']
-      if has_key(opts, opt)
-      \ && type(opts[opt]) != s:TYPE.list
-      \ && (type(opts[opt]) != s:TYPE.string || empty(opts[opt]))
+      if has_key(a:arg, opt)
+      \ && type(a:arg[opt]) != s:TYPE.list
+      \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt]))
         throw printf(opt_errfmt, opt, 'string or list')
         throw printf(opt_errfmt, opt, 'string or list')
       endif
       endif
     endfor
     endfor
-    if has_key(opts, 'do')
-      \ && type(opts.do) != s:TYPE.funcref
-      \ && (type(opts.do) != s:TYPE.string || empty(opts.do))
+    if has_key(a:arg, 'do')
+      \ && type(a:arg.do) != s:TYPE.funcref
+      \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do))
         throw printf(opt_errfmt, 'do', 'string or funcref')
         throw printf(opt_errfmt, 'do', 'string or funcref')
     endif
     endif
+    call extend(opts, a:arg)
     if has_key(opts, 'dir')
     if has_key(opts, 'dir')
       let opts.dir = s:dirpath(s:plug_expand(opts.dir))
       let opts.dir = s:dirpath(s:plug_expand(opts.dir))
     endif
     endif
@@ -1206,7 +1206,7 @@ function! s:update_finish()
         call s:log4(name, 'Checking out '.tag)
         call s:log4(name, 'Checking out '.tag)
         let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir)
         let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir)
       else
       else
-        let branch = get(spec, 'branch', 'master')
+        let branch = s:git_origin_branch(spec)
         call s:log4(name, 'Merging origin/'.s:esc(branch))
         call s:log4(name, 'Merging origin/'.s:esc(branch))
         let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1'
         let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1'
               \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir)
               \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir)
@@ -2208,6 +2208,22 @@ function! s:system_chomp(...)
   return v:shell_error ? '' : substitute(ret, '\n$', '', '')
   return v:shell_error ? '' : substitute(ret, '\n$', '', '')
 endfunction
 endfunction
 
 
+function! s:git_origin_branch(spec)
+  if len(a:spec.branch)
+    return a:spec.branch
+  endif
+
+  " The file may not be present if this is a local repository
+  let origin_head = a:spec.dir.'/.git/refs/remotes/origin/HEAD'
+  if filereadable(origin_head)
+    return split(readfile(origin_head)[0], 'refs/remotes/origin/')[-1]
+  endif
+
+  " The command may not return the name of a branch in detached HEAD state
+  let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir))
+  return v:shell_error ? '' : result[-1]
+endfunction
+
 function! s:git_validate(spec, check_branch)
 function! s:git_validate(spec, check_branch)
   let err = ''
   let err = ''
   if isdirectory(a:spec.dir)
   if isdirectory(a:spec.dir)
@@ -2230,8 +2246,9 @@ function! s:git_validate(spec, check_branch)
                       \ 'PlugUpdate required.'], "\n")
                       \ 'PlugUpdate required.'], "\n")
       endif
       endif
     elseif a:check_branch
     elseif a:check_branch
-      let branch = result[0]
+      let current_branch = result[0]
       " Check tag
       " Check tag
+      let origin_branch = s:git_origin_branch(a:spec)
       if has_key(a:spec, 'tag')
       if has_key(a:spec, 'tag')
         let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
         let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
         if a:spec.tag !=# tag && a:spec.tag !~ '\*'
         if a:spec.tag !=# tag && a:spec.tag !~ '\*'
@@ -2239,14 +2256,14 @@ function! s:git_validate(spec, check_branch)
                 \ (empty(tag) ? 'N/A' : tag), a:spec.tag)
                 \ (empty(tag) ? 'N/A' : tag), a:spec.tag)
         endif
         endif
       " Check branch
       " Check branch
-      elseif a:spec.branch !=# branch
+      elseif origin_branch !=# current_branch
         let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.',
         let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.',
-              \ branch, a:spec.branch)
+              \ current_branch, origin_branch)
       endif
       endif
       if empty(err)
       if empty(err)
         let [ahead, behind] = split(s:lastline(s:system([
         let [ahead, behind] = split(s:lastline(s:system([
         \ 'git', 'rev-list', '--count', '--left-right',
         \ 'git', 'rev-list', '--count', '--left-right',
-        \ printf('HEAD...origin/%s', a:spec.branch)
+        \ printf('HEAD...origin/%s', origin_branch)
         \ ], a:spec.dir)), '\t')
         \ ], a:spec.dir)), '\t')
         if !v:shell_error && ahead
         if !v:shell_error && ahead
           if behind
           if behind
@@ -2254,11 +2271,11 @@ function! s:git_validate(spec, check_branch)
             " pushable (and probably not that messed up).
             " pushable (and probably not that messed up).
             let err = printf(
             let err = printf(
                   \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n"
                   \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n"
-                  \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', a:spec.branch, ahead, behind)
+                  \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind)
           else
           else
             let err = printf("Ahead of origin/%s by %d commit(s).\n"
             let err = printf("Ahead of origin/%s by %d commit(s).\n"
                   \ .'Cannot update until local changes are pushed.',
                   \ .'Cannot update until local changes are pushed.',
-                  \ a:spec.branch, ahead)
+                  \ origin_branch, ahead)
           endif
           endif
         endif
         endif
       endif
       endif
@@ -2588,20 +2605,23 @@ function! s:diff()
     endif
     endif
     call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:')
     call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:')
     for [k, v] in plugs
     for [k, v] in plugs
-      let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..'
-      let cmd = ['git', 'log', '--graph', '--color=never']
-      if s:git_version_requirement(2, 10, 0)
-        call add(cmd, '--no-show-signature')
-      endif
-      call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range])
-      if has_key(v, 'rtp')
-        call extend(cmd, ['--', v.rtp])
-      endif
-      let diff = s:system_chomp(cmd, v.dir)
-      if !empty(diff)
-        let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : ''
-        call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)')))
-        let cnts[origin] += 1
+      let branch = s:git_origin_branch(v)
+      if len(branch)
+        let range = origin ? '..origin/'.branch : 'HEAD@{1}..'
+        let cmd = ['git', 'log', '--graph', '--color=never']
+        if s:git_version_requirement(2, 10, 0)
+          call add(cmd, '--no-show-signature')
+        endif
+        call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range])
+        if has_key(v, 'rtp')
+          call extend(cmd, ['--', v.rtp])
+        endif
+        let diff = s:system_chomp(cmd, v.dir)
+        if !empty(diff)
+          let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : ''
+          call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)')))
+          let cnts[origin] += 1
+        endif
       endif
       endif
       let bar .= '='
       let bar .= '='
       call s:progress_bar(2, bar, len(total))
       call s:progress_bar(2, bar, len(total))

+ 2 - 2
init.vim

@@ -26,7 +26,7 @@ else
 
 
   " Plugin Configuration
   " Plugin Configuration
   source $HOME/.config/nvim/keys/which-key.vim
   source $HOME/.config/nvim/keys/which-key.vim
-  source $HOME/.config/nvim/plug-config/rainbow.vim
+  " source $HOME/.config/nvim/plug-config/rainbow.vim
   source $HOME/.config/nvim/plug-config/rnvimr.vim
   source $HOME/.config/nvim/plug-config/rnvimr.vim
   source $HOME/.config/nvim/plug-config/better-whitespace.vim
   source $HOME/.config/nvim/plug-config/better-whitespace.vim
   source $HOME/.config/nvim/plug-config/fzf.vim
   source $HOME/.config/nvim/plug-config/fzf.vim
@@ -46,7 +46,7 @@ else
   source $HOME/.config/nvim/plug-config/polyglot.vim
   source $HOME/.config/nvim/plug-config/polyglot.vim
   source $HOME/.config/nvim/plug-config/far.vim
   source $HOME/.config/nvim/plug-config/far.vim
   source $HOME/.config/nvim/plug-config/tagalong.vim
   source $HOME/.config/nvim/plug-config/tagalong.vim
-  source $HOME/.config/nvim/plug-config/illuminate.vim
+  " source $HOME/.config/nvim/plug-config/illuminate.vim
   source $HOME/.config/nvim/plug-config/bracey.vim
   source $HOME/.config/nvim/plug-config/bracey.vim
   source $HOME/.config/nvim/plug-config/asynctask.vim
   source $HOME/.config/nvim/plug-config/asynctask.vim
   source $HOME/.config/nvim/plug-config/window-swap.vim
   source $HOME/.config/nvim/plug-config/window-swap.vim

+ 34 - 5
utils/vscode_config/keybindings.json

@@ -1,4 +1,3 @@
-// Place your key bindings in this file to override the defaultsauto[]
 [
 [
   {
   {
     "key": "shift+ctrl+e",
     "key": "shift+ctrl+e",
@@ -29,12 +28,12 @@
   {
   {
     "key": "j",
     "key": "j",
     "command": "list.focusDown",
     "command": "list.focusDown",
-    "when": "listFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
+    "when": "listFocus && !inputFocus"
   },
   },
   {
   {
     "key": "k",
     "key": "k",
     "command": "list.focusUp",
     "command": "list.focusUp",
-    "when": "listFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
+    "when": "listFocus && !inputFocus"
   },
   },
   {
   {
     "key": "ctrl+j",
     "key": "ctrl+j",
@@ -89,18 +88,43 @@
   {
   {
     "key": "l",
     "key": "l",
     "command": "list.select",
     "command": "list.select",
-    "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
+    "when": "!inputFocus"
   },
   },
   {
   {
     "key": "o",
     "key": "o",
     "command": "list.toggleExpand",
     "command": "list.toggleExpand",
-    "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
+    "when": "!inputFocus"
   },
   },
   {
   {
     "key": "h",
     "key": "h",
     "command": "list.collapse",
     "command": "list.collapse",
     "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
     "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
   },
   },
+  {
+    "key": "d",
+    "command": "deleteFile",
+    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
+  },
+  {
+    "key": "y",
+    "command": "filesExplorer.copy",
+    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
+  },
+  {
+    "key": "x",
+    "command": "filesExplorer.cut",
+    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
+  },
+  {
+    "key": "p",
+    "command": "filesExplorer.paste",
+    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
+  },
+  {
+    "key": "v",
+    "command": "explorer.openToSide",
+    "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
+  },
   {
   {
     "key": "a",
     "key": "a",
     "command": "explorer.newFile",
     "command": "explorer.newFile",
@@ -168,5 +192,10 @@
     "key": "ctrl+f",
     "key": "ctrl+f",
     "command": "-vscode-neovim.ctrl-f",
     "command": "-vscode-neovim.ctrl-f",
     "when": "editorTextFocus && neovim.ctrlKeysNormal && neovim.init && neovim.mode != 'insert'"
     "when": "editorTextFocus && neovim.ctrlKeysNormal && neovim.init && neovim.mode != 'insert'"
+  },
+  {
+    "key": "shift+delete",
+    "command": "-deleteFile",
+    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
   }
   }
 ]
 ]

+ 341 - 43
utils/vscode_config/settings.json

@@ -18,6 +18,13 @@
       "command": "vscode-neovim.send",
       "command": "vscode-neovim.send",
       "args": "<C-/>"
       "args": "<C-/>"
     },
     },
+    {
+      "key": "?",
+      "name": "View All References",
+      "type": "command",
+      "command": "references-view.find",
+      "when": "editorHasReferenceProvider"
+    },
     {
     {
       "key": "b",
       "key": "b",
       "name": "Buffers/Editors...",
       "name": "Buffers/Editors...",
@@ -235,36 +242,93 @@
       "name": "Git...",
       "name": "Git...",
       "type": "bindings",
       "type": "bindings",
       "bindings": [
       "bindings": [
+        {
+          "key": "/",
+          "name": "Search Commits",
+          "command": "gitlens.showCommitSearch",
+          "type": "command",
+          "when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
+        },
+        {
+          "key": "a",
+          "name": "Stage",
+          "type": "command",
+          "command": "git.stage"
+        },
         {
         {
           "key": "b",
           "key": "b",
           "name": "Checkout",
           "name": "Checkout",
           "type": "command",
           "type": "command",
           "command": "git.checkout"
           "command": "git.checkout"
         },
         },
+        {
+          "key": "B",
+          "name": "Browse",
+          "type": "command",
+          "command": "gitlens.openFileInRemote"
+        },
         {
         {
           "key": "c",
           "key": "c",
           "name": "Commit",
           "name": "Commit",
           "type": "command",
           "type": "command",
           "command": "git.commit"
           "command": "git.commit"
         },
         },
+        {
+          "key": "C",
+          "name": "Cherry Pick",
+          "type": "command",
+          "command": "gitlens.views.cherryPick"
+        },
         {
         {
           "key": "d",
           "key": "d",
           "name": "Delete Branch",
           "name": "Delete Branch",
           "type": "command",
           "type": "command",
           "command": "git.deleteBranch"
           "command": "git.deleteBranch"
         },
         },
+        {
+          "key": "g",
+          "name": "Graph",
+          "type": "command",
+          "command": "git-graph.view"
+        },
+        {
+          "key": "h",
+          "name": "Heatmap",
+          "type": "command",
+          "command": "gitlens.toggleFileHeatmap"
+        },
         {
         {
           "key": "f",
           "key": "f",
           "name": "Fetch",
           "name": "Fetch",
           "type": "command",
           "type": "command",
           "command": "git.fetch"
           "command": "git.fetch"
         },
         },
+        {
+          "key": "F",
+          "name": "Pull From",
+          "type": "command",
+          "command": "git.pullFrom"
+        },
         {
         {
           "key": "i",
           "key": "i",
           "name": "Init",
           "name": "Init",
           "type": "command",
           "type": "command",
           "command": "git.init"
           "command": "git.init"
         },
         },
+        {
+          "key": "l",
+          "name": "Toggle Line Blame",
+          "type": "command",
+          "command": "gitlens.toggleLineBlame",
+          "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'alternate'"
+        },
+        {
+          "key": "L",
+          "name": "Toggle GitLens",
+          "type": "command",
+          "command": "gitlens.toggleCodeLens",
+          "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'alternate'"
+        },
         {
         {
           "key": "m",
           "key": "m",
           "name": "Merge",
           "name": "Merge",
@@ -273,9 +337,15 @@
         },
         },
         {
         {
           "key": "p",
           "key": "p",
-          "name": "Publish",
+          "name": "Push",
           "type": "command",
           "type": "command",
-          "command": "git.publish"
+          "command": "git.push"
+        },
+        {
+          "key": "P",
+          "name": "Push",
+          "type": "command",
+          "command": "git.pull"
         },
         },
         {
         {
           "key": "s",
           "key": "s",
@@ -285,9 +355,22 @@
         },
         },
         {
         {
           "key": "S",
           "key": "S",
-          "name": "Stage",
+          "name": "Status",
           "type": "command",
           "type": "command",
-          "command": "git.stage"
+          "command": "gitlens.showQuickRepoStatus",
+          "when": "gitlens:enabled && config.gitlens.keymap == 'alternate'"
+        },
+        {
+          "key": "t",
+          "name": "Create Tag",
+          "type": "command",
+          "command": "git.createTag"
+        },
+        {
+          "key": "T",
+          "name": "Delete Tag",
+          "type": "command",
+          "command": "git.deleteTag"
         },
         },
         {
         {
           "key": "U",
           "key": "U",
@@ -328,20 +411,199 @@
         }
         }
       ]
       ]
     },
     },
-
+    {
+      "key": "l",
+      "name": "LSP...",
+      "type": "bindings",
+      "bindings": [
+        {
+          "key": ";",
+          "name": "Refactor",
+          "type": "command",
+          "command": "editor.action.refactor",
+          "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
+        },
+        {
+          "key": "a",
+          "name": "Auto Fix",
+          "type": "command",
+          "command": "editor.action.autoFix",
+          "when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)quickfix\\b/"
+        },
+        {
+          "key": "d",
+          "name": "Definition",
+          "type": "command",
+          "command": "editor.action.revealDefinition",
+          "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
+        },
+        {
+          "key": "D",
+          "name": "Declaration",
+          "type": "command",
+          "command": "editor.action.revealDeclaration"
+        },
+        {
+          "key": "e",
+          "name": "Errors",
+          "type": "command",
+          "command": "workbench.actions.view.problems"
+        },
+        {
+          "key": "f",
+          "name": "Format",
+          "type": "command",
+          "command": "editor.action.formatDocument",
+          "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
+        },
+        {
+          "key": "i",
+          "name": "Implementation",
+          "type": "command",
+          "command": "editor.action.goToImplementation",
+          "when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor"
+        },
+        {
+          "key": "l",
+          "name": "Code Lens",
+          "type": "command",
+          "command": "codelens.showLensesInCurrentLine"
+        },
+        {
+          "key": "n",
+          "name": "Next Problem",
+          "type": "command",
+          "command": "editor.action.marker.next",
+          "when": "editorFocus"
+        },
+        {
+          "key": "N",
+          "name": "Next Problem (Proj)",
+          "type": "command",
+          "command": "editor.action.marker.nextInFiles",
+          "when": "editorFocus"
+        },
+        {
+          "key": "o",
+          "name": "Outline",
+          "type": "command",
+          "command": "outline.focus"
+        },
+        {
+          "key": "p",
+          "name": "Prev Problem",
+          "type": "command",
+          "command": "editor.action.marker.prevInFiles",
+          "when": "editorFocus"
+        },
+        {
+          "key": "P",
+          "name": "Prev Problem (Proj)",
+          "type": "command",
+          "command": "editor.action.marker.prev",
+          "when": "editorFocus"
+        },
+        {
+          "key": "q",
+          "name": "Quick Fix",
+          "type": "command",
+          "command": "editor.action.quickFix",
+          "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
+        },
+        {
+          "key": "r",
+          "name": "References",
+          "type": "command",
+          "command": "editor.action.goToReferences",
+          "when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
+        },
+        {
+          "key": "R",
+          "name": "Rename",
+          "type": "command",
+          "command": "editor.action.rename",
+          "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
+        },
+        {
+          "key": "v",
+          "name": "View All References",
+          "type": "command",
+          "command": "references-view.find",
+          "when": "editorHasReferenceProvider"
+        },
+        {
+          "key": "s",
+          "name": "Go to Symbol (Editor)",
+          "type": "command",
+          "command": "workbench.action.gotoSymbol"
+        },
+        {
+          "key": "S",
+          "name": "Go to Symbol (Workspace)",
+          "type": "command",
+          "command": "workbench.action.showAllSymbols"
+        }
+      ]
+    },
     {
     {
       "key": "m",
       "key": "m",
-      "name": "minimap",
+      "name": "Minimap",
       "type": "command",
       "type": "command",
       "command": "editor.action.toggleMinimap"
       "command": "editor.action.toggleMinimap"
     },
     },
     {
     {
       "key": "n",
       "key": "n",
-      "name": "highlight",
+      "name": "No Highlight",
       "type": "command",
       "type": "command",
       "command": "vscode-neovim.send",
       "command": "vscode-neovim.send",
       "args": ":noh<CR>"
       "args": ":noh<CR>"
     },
     },
+    {
+      "key": "p",
+      "name": "Peek...",
+      "type": "bindings",
+      "bindings": [
+        {
+          "key": "d",
+          "name": "Definition",
+          "type": "command",
+          "command": "editor.action.peekDefinition",
+          "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
+        },
+        {
+          "key": "D",
+          "name": "Declaration",
+          "type": "command",
+          "command": "editor.action.peekDeclaration"
+        },
+        {
+          "key": "i",
+          "name": "Implementation",
+          "type": "command",
+          "command": "editor.action.peekImplementation",
+          "when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
+        },
+        {
+          "key": "p",
+          "name": "Toggle Focus",
+          "type": "command",
+          "command": "togglePeekWidgetFocus",
+          "when": "inReferenceSearchEditor || referenceSearchVisible"
+        },
+        {
+          "key": "r",
+          "name": "References",
+          "type": "command",
+          "command": "editor.action.referenceSearch.trigger"
+        },
+        {
+          "key": "t",
+          "name": "Type Definition",
+          "type": "command",
+          "command": "editor.action.peekTypeDefinition"
+        }
+      ]
+    },
     {
     {
       "key": "s",
       "key": "s",
       "name": "Search...",
       "name": "Search...",
@@ -349,13 +611,13 @@
       "bindings": [
       "bindings": [
         {
         {
           "key": "f",
           "key": "f",
-          "name": "files",
+          "name": "Files",
           "type": "command",
           "type": "command",
           "command": "workbench.action.quickOpen"
           "command": "workbench.action.quickOpen"
         },
         },
         {
         {
           "key": "t",
           "key": "t",
-          "name": "text",
+          "name": "Text",
           "type": "command",
           "type": "command",
           "command": "workbench.action.findInFiles"
           "command": "workbench.action.findInFiles"
         }
         }
@@ -432,14 +694,27 @@
           "name": "Toggle Terminal",
           "name": "Toggle Terminal",
           "type": "command",
           "type": "command",
           "command": "workbench.action.togglePanel"
           "command": "workbench.action.togglePanel"
+        },
+        {
+          "key": "T",
+          "name": "Focus Terminal",
+          "type": "command",
+          "command": "workbench.action.terminal.toggleTerminal",
+          "when": "!terminalFocus"
         }
         }
       ]
       ]
     },
     },
     {
     {
-      "key": "T",
+      "key": "U",
       "name": "UI toggles...",
       "name": "UI toggles...",
       "type": "bindings",
       "type": "bindings",
       "bindings": [
       "bindings": [
+        {
+          "key": "a",
+          "name": "Toggle tool/activity bar visibility",
+          "type": "command",
+          "command": "workbench.action.toggleActivityBarVisibility"
+        },
         {
         {
           "key": "b",
           "key": "b",
           "name": "Toggle side bar visibility",
           "name": "Toggle side bar visibility",
@@ -470,12 +745,6 @@
           "type": "command",
           "type": "command",
           "command": "workbench.action.toggleMaximizedPanel"
           "command": "workbench.action.toggleMaximizedPanel"
         },
         },
-        {
-          "key": "t",
-          "name": "Toggle tool/activity bar visibility",
-          "type": "command",
-          "command": "workbench.action.toggleActivityBarVisibility"
-        },
         {
         {
           "key": "T",
           "key": "T",
           "name": "Toggle tab visibility",
           "name": "Toggle tab visibility",
@@ -569,6 +838,31 @@
         }
         }
       ]
       ]
     },
     },
+    {
+      "key": "x",
+      "name": "Extensions",
+      "type": "command",
+      "command": "workbench.view.extensions"
+    },
+    {
+      "key": "y",
+      "name": "Sync...",
+      "type": "bindings",
+      "bindings": [
+        {
+          "key": "d",
+          "name": "Download Settings",
+          "type": "command",
+          "command": "extension.downloadSettings"
+        },
+        {
+          "key": "u",
+          "name": "Upload Settings",
+          "type": "command",
+          "command": "extension.updateSettings"
+        }
+      ]
+    },
     {
     {
       "key": "z",
       "key": "z",
       "name": "Toggle zen mode",
       "name": "Toggle zen mode",
@@ -578,7 +872,6 @@
   ],
   ],
   "workbench.editor.showTabs": true,
   "workbench.editor.showTabs": true,
   "sync.gist": "939951904a077b97f8001bc35f6b5948",
   "sync.gist": "939951904a077b97f8001bc35f6b5948",
-  "gitlens.currentLine.enabled": false,
   "gitlens.hovers.currentLine.over": "line",
   "gitlens.hovers.currentLine.over": "line",
   "editor.suggestSelection": "first",
   "editor.suggestSelection": "first",
   "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
   "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
@@ -601,7 +894,7 @@
     "**/.factorypath": true
     "**/.factorypath": true
   },
   },
   "terminal.external.osxExec": "iTerm.app",
   "terminal.external.osxExec": "iTerm.app",
-  "editor.minimap.enabled": true,
+  "editor.minimap.enabled": false,
   "workbench.activityBar.visible": false,
   "workbench.activityBar.visible": false,
   "leetcode.workspaceFolder": "/Users/chris/Repos/leetcode",
   "leetcode.workspaceFolder": "/Users/chris/Repos/leetcode",
   "leetcode.defaultLanguage": "javascript",
   "leetcode.defaultLanguage": "javascript",
@@ -689,32 +982,37 @@
 
 
   "workbench.colorCustomizations": {
   "workbench.colorCustomizations": {
     "[Default Dark+]": {
     "[Default Dark+]": {
-       "statusBar.background" : "#2E2E2E",
-       "statusBar.foreground" : "#569CD6",
-       "statusBarItem.remoteBackground": "#2E2E2E",
-       "statusBarItem.remoteForeground": "#569CD6",
-       "activityBar.background": "#2E2E2E",
-       "tab.inactiveBackground": "#2E2E2E"
+      "statusBar.background": "#2E2E2E",
+      "statusBar.foreground": "#8C8C8C",
+      "statusBarItem.remoteBackground": "#2E2E2E",
+      "statusBarItem.remoteForeground": "#8C8C8C",
+      "activityBar.background": "#2E2E2E",
+      "tab.inactiveBackground": "#2E2E2E"
     },
     },
     "[One Dark Pro]": {
     "[One Dark Pro]": {
-    "editor.background": "#1e2127",
-    "terminal.foreground": "#abb2bf",
-    "terminal.ansiBlack": "#1e2127",
-    "terminal.ansiBlue": "#61afef",
-    "terminal.ansiCyan": "#56b6c2",
-    "terminal.ansiGreen": "#98C379",
-    "terminal.ansiMagenta": "#c678dd",
-    "terminal.ansiRed": "#e06c75",
-    "terminal.ansiWhite": "#abb2bf",
-    "terminal.ansiYellow": "#d19a66",
-    "terminal.ansiBrightBlack": "#5c6370",
-    "terminal.ansiBrightBlue": "#61afef",
-    "terminal.ansiBrightCyan": "#56b6c2",
-    "terminal.ansiBrightGreen": "#98c379",
-    "terminal.ansiBrightMagenta": "#c678dd",
-    "terminal.ansiBrightRed": "#e06c75",
-    "terminal.ansiBrightWhite": "#ffffff",
-    "terminal.ansiBrightYellow": "#d19a66",
-    },
+      "editor.background": "#1e2127",
+      "terminal.foreground": "#abb2bf",
+      "terminal.ansiBlack": "#1e2127",
+      "terminal.ansiBlue": "#61afef",
+      "terminal.ansiCyan": "#56b6c2",
+      "terminal.ansiGreen": "#98C379",
+      "terminal.ansiMagenta": "#c678dd",
+      "terminal.ansiRed": "#e06c75",
+      "terminal.ansiWhite": "#abb2bf",
+      "terminal.ansiYellow": "#d19a66",
+      "terminal.ansiBrightBlack": "#5c6370",
+      "terminal.ansiBrightBlue": "#61afef",
+      "terminal.ansiBrightCyan": "#56b6c2",
+      "terminal.ansiBrightGreen": "#98c379",
+      "terminal.ansiBrightMagenta": "#c678dd",
+      "terminal.ansiBrightRed": "#e06c75",
+      "terminal.ansiBrightWhite": "#ffffff",
+      "terminal.ansiBrightYellow": "#d19a66"
+    }
   },
   },
+  "gitlens.advanced.telemetry.enabled": false,
+  "gitlens.currentLine.enabled": false,
+  "[javascript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  }
 }
 }

+ 8 - 5
vim-plug/plugins.vim

@@ -21,7 +21,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     " Useful for React Commenting 
     " Useful for React Commenting 
     Plug 'suy/vim-context-commentstring'
     Plug 'suy/vim-context-commentstring'
     " highlight all matches under cursor
     " highlight all matches under cursor
-    Plug 'RRethy/vim-illuminate'
+    " Plug 'RRethy/vim-illuminate'
 
 
   if exists('g:vscode')
   if exists('g:vscode')
     " Easy motion for VSCode
     " Easy motion for VSCode
@@ -39,6 +39,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     " auto set indent settings
     " auto set indent settings
     Plug 'tpope/vim-sleuth'
     Plug 'tpope/vim-sleuth'
     " Better Syntax Support
     " Better Syntax Support
+    " Plug 'nvim-treesitter/nvim-treesitter'
     Plug 'sheerun/vim-polyglot'
     Plug 'sheerun/vim-polyglot'
     " Cool Icons
     " Cool Icons
     Plug 'ryanoasis/vim-devicons'
     Plug 'ryanoasis/vim-devicons'
@@ -48,6 +49,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     Plug 'alvan/vim-closetag'
     Plug 'alvan/vim-closetag'
     " Themes
     " Themes
     Plug 'christianchiarulli/nvcode.vim'
     Plug 'christianchiarulli/nvcode.vim'
+    " Plug 'ChristianChiarulli/nv-code'
+    " Plug 'kyazdani42/blue-moon'
     " Intellisense
     " Intellisense
     Plug 'neoclide/coc.nvim', {'branch': 'release'}
     Plug 'neoclide/coc.nvim', {'branch': 'release'}
     " Status Line
     " Status Line
@@ -105,7 +108,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     " Colorizer
     " Colorizer
     Plug 'norcalli/nvim-colorizer.lua'
     Plug 'norcalli/nvim-colorizer.lua'
     " Rainbow brackets
     " Rainbow brackets
-    Plug 'luochen1990/rainbow'
+    " Plug 'luochen1990/rainbow'
     " Async Linting Engine
     " Async Linting Engine
     " TODO make sure to add ale config before plugin
     " TODO make sure to add ale config before plugin
     " Plug 'dense-analysis/ale'
     " Plug 'dense-analysis/ale'
@@ -115,9 +118,9 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     " TODO add this back in change from C-n
     " TODO add this back in change from C-n
     " Plug 'mg979/vim-visual-multi', {'branch': 'master'}
     " Plug 'mg979/vim-visual-multi', {'branch': 'master'}
     Plug 'moll/vim-bbye'
     Plug 'moll/vim-bbye'
-    Plug 'yuezk/vim-js'
-    Plug 'maxmellon/vim-jsx-pretty'
-    Plug 'jelera/vim-javascript-syntax'
+    " Plug 'yuezk/vim-js'
+    " Plug 'maxmellon/vim-jsx-pretty'
+    " Plug 'jelera/vim-javascript-syntax'
     " Plugin Graveyard
     " Plugin Graveyard
 
 
     " jsx syntax support
     " jsx syntax support