]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Update the help text
authorYegappan Lakshmanan <yegappan@yahoo.com>
Wed, 30 Dec 2020 15:29:18 +0000 (07:29 -0800)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Wed, 30 Dec 2020 15:29:18 +0000 (07:29 -0800)
doc/lsp.txt

index 0a4bef4ea0e59fe6f637a95cbebcb48db5d3dcd1..552fade9c5e775d62097fd5b850452afad18a46e 100644 (file)
@@ -2,7 +2,7 @@
 
 Author: Yegappan Lakshmanan  (yegappan AT yahoo DOT com)
 For Vim version 8.2.2082 and above
-Last change: Dec 19, 2020
+Last change: Dec 30, 2020
 
 ==============================================================================
                                                *lsp-license*
@@ -80,9 +80,58 @@ The following commands are provided:
                        cursor in a new quickfix list.
 :LspHighlight          Highlight all the matches for the keyword under cursor
 :LspHighlightClear     Clear all the matches highlighted by :LspHighlight
+:LspShowSymbols                Show the list of symbols defined in the current file
+                       in a separate window.
+:LspFormat             Format the current file using the LSP server.
+:{range}LspFormat      Format the specified range of files.
+:LspCalledBy           Display the list of symbols called by the current
+                       symbol. (NOT IMPLEMENTED YET).
+:LspCalling            Display the list of symbols calling the current symbol
+                       (NOT IMPLEMENTED YET).
+:LspRename             Rename the current symbol
+:LspCodeAction         Apply the code action supplied by the LSP server to
+                       the diagnostic in the current line.
 
 ==============================================================================
 4. Configuration                               *lsp-configuration*
 
+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']
+               \     },
+               \   ]
+   call lsp#addServer(lspServers)
+<
+The above lines add the LSP servers for C, C++, Javascript, Typescript and
+Shell script file types.
+
+To add a LSP server, the following information is needed:
+
+       filetype        One or more file types supported by the LSP server.
+                       This can be a |String| or a |List|. To specify
+                       multiple multiple file types, use a List.
+       path            complete path to the LSP server executable (without
+                       any arguments).
+       args            a list of command-line arguments passed to the LSP
+                       server. Each argument is a separate List item.
+
+The LSP servers are added using the lsp#addServer() function. This function
+accepts a list of LSP servers with the above information.
+
+==============================================================================
 
 vim:tw=78:ts=8:noet:ft=help: