Forráskód Böngészése

bash language server config

Chris 5 éve
szülő
commit
a6fa807ca0
3 módosított fájl, 37 hozzáadás és 2 törlés
  1. 24 1
      README.md
  2. 9 0
      coc-settings.json
  3. 4 1
      keys/which-key.vim

+ 24 - 1
README.md

@@ -81,6 +81,29 @@ let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/neovim-node-hos
 
 Explanations and installation instruction can be found on my blog
 
+## Language Servers
+
+Since CoC doesn't support all languages in there extensions
+I recommend installing some language servers from scratch
+and adding them to your `coc-settings.json` file
+
+Example:
+
+- bash
+
+  `npm i -g bash-language-server`
+
+  ```
+  "languageserver": {
+  "bash": {
+    "command": "bash-language-server",
+    "args": ["start"],
+    "filetypes": ["sh"],
+    "ignoredRootPaths": ["~"]
+    }
+  }
+  ```
+
 # TODO
 
 - People asked about vimwiki I kinda hate it but maybe I'll add it
@@ -88,7 +111,7 @@ Explanations and installation instruction can be found on my blog
 - spectre, or async task/run
 - setup custom paths
 - install script envsubst is your friend
-- add better whitespace pluginand a toggle, video about clean code maybe
+- add better whitespace plugin and a toggle, video about clean code maybe
 - echodoc and buitin support with CoC
 - snippets (coc snippets)
 - git messenger

+ 9 - 0
coc-settings.json

@@ -40,6 +40,15 @@
   "explorer.keyMappings": {
     "<cr>": ["expandable?", "expand", "open"],
     "v": "open:vsplit"
+  },
+
+  "languageserver":{
+    "bash": {
+      "command": "bash-language-server",
+      "args": ["start"],
+      "filetypes": ["sh"],
+      "ignoredRootPaths": ["~"]
+    }
   }
 
   // TODO language servers

+ 4 - 1
keys/which-key.vim

@@ -23,7 +23,7 @@ autocmd! FileType which_key
 autocmd  FileType which_key set laststatus=0 noshowmode noruler
   \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
 
-" change to nerd commenter
+" Single mappings
 let g:which_key_map['/'] = [ '<Plug>NERDCommenterToggle'  , 'comment' ]
 let g:which_key_map['.'] = [ ':e $MYVIMRC'                , 'open init' ]
 let g:which_key_map[';'] = [ ':Commands'                  , 'commands' ]
@@ -40,6 +40,9 @@ let g:which_key_map['v'] = [ '<C-W>v'                     , 'split right']
 let g:which_key_map['w'] = [ 'w'                          , 'write' ]
 let g:which_key_map['z'] = [ 'Goyo'                       , 'zen' ]
 
+" Group mappings
+
+" b is for buffer
 let g:which_key_map.b = {
       \ 'name' : '+buffer' ,
       \ '1' : ['b1'        , 'buffer 1']        ,