浏览代码

silent keymappings, less themes

Chris 5 年之前
父节点
当前提交
6d157bb63a
共有 3 个文件被更改,包括 32 次插入22 次删除
  1. 19 9
      coc-settings.json
  2. 10 10
      keys/mappings.vim
  3. 3 3
      vim-plug/plugins.vim

+ 19 - 9
coc-settings.json

@@ -1,7 +1,12 @@
 {
-
   // suggestions
   // "suggest.echodocSupport": true,
+  // TODO add more labels and give them cool glyphs
+  "suggest.completionItemKindLabels": {
+    "text": "t",
+    "method": "m",
+    "function": "f"
+  },
 
   // diagnostics
   "diagnostic.errorSign": "✗",
@@ -18,7 +23,16 @@
   "list.selectedSignText": " ",
 
   // autoformat
-  "coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "graphql", "html", "yaml",  "json", "python"],
+  "coc.preferences.formatOnSaveFiletypes": [
+    "css",
+    "markdown",
+    "javascript",
+    "graphql",
+    "html",
+    "yaml",
+    "json",
+    "python"
+  ],
   "coc.preferences.hoverTarget": "float",
 
   // python config
@@ -26,23 +40,19 @@
   "python.linting.pylintEnabled": true,
 
   // snippets
-  "snippets.ultisnips.directories": 
-  [
-    "UltiSnips",
-    "~/.config/nvim/utils/snips"
-  ],
+  "snippets.ultisnips.directories": ["UltiSnips", "~/.config/nvim/utils/snips"],
 
   // explorer
   "explorer.width": 30,
   "explorer.icon.enableNerdfont": true,
   "explorer.previewAction.onHover": false,
-  "explorer.icon.enableVimDevicons": true,
+  "explorer.icon.enableVimDevicons": false,
   "explorer.keyMappings": {
     "<cr>": ["expandable?", "expand", "open"],
     "v": "open:vsplit"
   },
 
-  "languageserver":{
+  "languageserver": {
     "bash": {
       "command": "bash-language-server",
       "args": ["start"],

+ 10 - 10
keys/mappings.vim

@@ -27,18 +27,18 @@ else
   " nnoremap <c-u> viwU<Esc>
 
   " TAB in general mode will move to text buffer
-  nnoremap <TAB> :bnext<CR>
+  nnoremap <silent> <TAB> :bnext<CR>
   " SHIFT-TAB will go back
-  nnoremap <S-TAB> :bprevious<CR>
+  nnoremap <silent> <S-TAB> :bprevious<CR>
 
   " Alternate way to save
-  nnoremap <C-s> :w<CR>
+  nnoremap <silent> <C-s> :w<CR>
   " Alternate way to quit
-  nnoremap <C-Q> :wq!<CR>
+  nnoremap <silent> <C-Q> :wq!<CR>
   " Use control-c instead of escape
-  nnoremap <C-c> <Esc>
+  nnoremap <silent> <C-c> <Esc>
   " <TAB>: completion.
-  inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
+  inoremap <silent> <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
 
 
   " Better window navigation
@@ -48,9 +48,9 @@ else
   nnoremap <C-l> <C-w>l
 
   " Use alt + hjkl to resize windows
-  nnoremap <M-j>    :resize -2<CR>
-  nnoremap <M-k>    :resize +2<CR>
-  nnoremap <M-h>    :vertical resize -2<CR>
-  nnoremap <M-l>    :vertical resize +2<CR>
+  nnoremap <silent> <M-j>    :resize -2<CR>
+  nnoremap <silent> <M-k>    :resize +2<CR>
+  nnoremap <silent> <M-h>    :vertical resize -2<CR>
+  nnoremap <silent> <M-l>    :vertical resize +2<CR>
 endif
 

+ 3 - 3
vim-plug/plugins.vim

@@ -47,13 +47,13 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     Plug 'alvan/vim-closetag'
     " Themes
     Plug 'christianchiarulli/onedark.vim'
-    Plug 'kaicataldo/material.vim'
-    Plug 'NLKNguyen/papercolor-theme'
+    " Plug 'kaicataldo/material.vim'
+    " Plug 'NLKNguyen/papercolor-theme'
     " Intellisense
     Plug 'neoclide/coc.nvim', {'branch': 'release'}
     " Status Line
     Plug 'vim-airline/vim-airline'
-    Plug 'vim-airline/vim-airline-themes'
+    " Plug 'vim-airline/vim-airline-themes'
     " Ranger
     Plug 'francoiscabrol/ranger.vim'
     Plug 'rbgrouleff/bclose.vim'