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*
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: