浏览代码

some updates

William Reed 4 年之前
父节点
当前提交
6f82e40ca3
共有 2 个文件被更改,包括 34 次插入4 次删除
  1. 23 3
      coc-settings.json
  2. 11 1
      vimrc

+ 23 - 3
coc-settings.json

@@ -1,21 +1,41 @@
 {
   "python.jediEnabled": false,
- "languageserver": {
+  "languageserver": {
     "golang": {
       "command": "gopls",
       "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
       "filetypes": ["go"]
     },
-	"dockerfile": {
+    "dockerfile": {
       "command": "docker-langserver",
       "filetypes": ["dockerfile"],
       "args": ["--stdio"]
     },
-	 "bash": {
+    "bash": {
       "command": "bash-language-server",
       "args": ["start"],
       "filetypes": ["sh"],
       "ignoredRootPaths": ["~"]
+    },
+    "python": {
+      "command": "python",
+      "args": [
+	"-mpyls",
+	"-vv"
+      ],
+      "filetypes": [
+	"python"
+      ],
+      "settings": {
+	"pyls": {
+	  "enable": true,
+	  "plugins": {
+	    "pyls_mypy": {
+	      "enabled": true
+	    }
+	  }
+	}
+      }
     }
   }
 }

+ 11 - 1
vimrc

@@ -620,7 +620,7 @@ autocmd CursorHold * silent call CocActionAsync('highlight')
 nmap <leader>r <Plug>(coc-rename)
 " }}}
 " {{{ ##### instant-markdown-viewer #####
-let g:instant_markdown_python = 1
+" let g:instant_markdown_python = 1
 " }}}
 
 " }}}
@@ -725,6 +725,12 @@ augroup END
 au BufNewFile,BufRead *.xsh set filetype=python
 au BufNewFile,BufRead Dockerfile* set filetype=dockerfile
 
+" md options
+augroup md_settings
+  autocmd FileType markdown set textwidth=80
+  autocmd FileType markdown set nocindent
+augroup END
+
 set wildmode=longest:full
 
 " switch ' and `
@@ -774,6 +780,10 @@ let g:clipboard = {
       \   'cache_enabled': 1,
       \ }
 
+" comment strings
+augroup comment_strings
+  autocmd FileType python set commentstring=#\ %s
+augroup END
 " }}}