]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Update LSP server configuration help
authorYegappan Lakshmanan <yegappan@yahoo.com>
Tue, 27 Sep 2022 14:16:06 +0000 (07:16 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Tue, 27 Sep 2022 14:16:06 +0000 (07:16 -0700)
README.md
doc/lsp.txt

index 5e18a544ec434c36f914a6de51072ab9e6c8b02b..242adf7ad790dd84bf95338bb47f849ea1225aa0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -28,41 +28,48 @@ You will also need to install one or more language servers corresponding to the
 To register a LSP server, add the following lines to your .vimrc file:
 ```
    let lspServers = [
-               \     {
-               \       'filetype': ['c', 'cpp'],
-               \       'path': '/usr/local/bin/clangd',
-               \       'args': ['--background-index']
-               \     },
-               \     {
-               \       'filetype': ['javascript', 'typescript'],
-               \       'path': '/usr/local/bin/typescript-language-server',
-               \       'args': ['--stdio']
-               \     },
-               \     {
-               \       'filetype': 'sh',
-               \       'path': '/usr/local/bin/bash-language-server',
-               \       'args': ['start']
-               \     },
-               \     {
-               \       'filetype': 'vim',
-               \       'path': '/usr/local/bin/vim-language-server',
-               \       'args': ['--stdio']
-               \     },
-               \     {
-               \       'filetype': ['go', 'gomod'],
-               \       'path': '/usr/local/bin/gopls',
-               \       'args': []
-               \     },
-               \     {
-               \       'filetype': ['python'],
-               \       'path': '/usr/local/bin/pyls',
-               \       'args': []
-               \     },
-               \     {
-               \       'filetype': ['fortran'],
-               \       'path': '/usr/local/bin/fortls',
-               \       'args': ['--nthreads=1', '--use_signature_help', '--hover_signature']
-               \     }
+               \     #{
+               \        filetype: ['c', 'cpp'],
+               \        path: '/usr/local/bin/clangd',
+               \        args: ['--background-index']
+               \      },
+               \     #{
+               \        filetype: ['javascript', 'typescript'],
+               \        path: '/usr/local/bin/typescript-language-server',
+               \        args: ['--stdio']
+               \      },
+               \     #{
+               \        filetype: 'sh',
+               \        path: '/usr/local/bin/bash-language-server',
+               \        args: ['start']
+               \      },
+               \     #{
+               \        filetype: 'vim',
+               \        path: '/usr/local/bin/vim-language-server',
+               \        args: ['--stdio']
+               \      },
+               \     #{
+               \        filetype: ['go', 'gomod'],
+               \        path: '/usr/local/bin/gopls',
+               \        args: ['serve']
+                \        syncInit: v:true,
+               \      },
+               \     #{
+               \        filetype: ['rust'],
+               \        path: '/usr/local/bin/rust-analyzer',
+               \        args: []
+                \        syncInit: v:true,
+               \      },
+               \     #{
+               \        filetype: ['python'],
+               \        path: '/usr/local/bin/pyls',
+               \        args: []
+               \      },
+               \     #{
+               \        filetype: ['fortran'],
+               \        path: '/usr/local/bin/fortls',
+               \        args: ['--nthreads=1', '--use_signature_help', '--hover_signature']
+               \      }
                \   ]
    call LspAddServer(lspServers)
 ```
index 1511f0e3e7046a699b53c00e5689cc17ddabc356..ccf282adbb5dad2942d5eb9cc129a15650ed8a2c 100644 (file)
@@ -2,7 +2,7 @@
 
 Author: Yegappan Lakshmanan  (yegappan AT yahoo DOT com)
 For Vim version 8.2.2342 and above
-Last change: Sep 9, 2022
+Last change: Sep 27, 2022
 
 ==============================================================================
                                                *lsp-license*
@@ -139,16 +139,16 @@ For example, to add the LSP servers for the Javascript, Typescript and Python
 file types, add the following commands to the .vimrc file: >
 
    let lspServers = [
-               \     {
-               \       'filetype': ['javascript', 'typescript'],
-               \       'path': '/usr/local/bin/typescript-language-server',
-               \       'args': ['--stdio']
-               \     },
-               \     {
-               \       'filetype': 'python',
-               \       'path': '/usr/local/bin/pyls',
-               \       'args': ['--check-parent-process', '-v']
-               \     }
+               \     #{
+               \        filetype: ['javascript', 'typescript'],
+               \        path: '/usr/local/bin/typescript-language-server',
+               \        args: ['--stdio']
+               \      },
+               \     #{
+               \        filetype: 'python',
+               \        path: '/usr/local/bin/pyls',
+               \        args: ['--check-parent-process', '-v']
+               \      }
                \   ]
    call LspAddServer(lspServers)
 <
@@ -167,17 +167,15 @@ Shell script and Vim file types: >
                \     },
                 \     #{ 
                 \        filetype: ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl'],
-                \        path: '/home/dza/.go/bin/gopls',
+                \        path: '/path/to/.go/bin/gopls',
                 \        args: [],
                 \        syncInit: v:true,
-                \        omnicompl: v:true,
                 \      },
                 \     #{
                 \        filetype: ['rust'],
-                \        path: '/home/dza/.cargo/bin/rust-analyzer',
+                \        path: '/path/to/.cargo/bin/rust-analyzer',
                 \        args: [],
                 \        syncInit: v:true,
-                \        omnicompl: v:true,
                 \      },
                \     #{
                \        filetype: 'sh',