aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-08-25 09:52:22 -0400
committerGitHub <noreply@github.com>2020-08-25 09:52:22 -0400
commit43202964f39eed4e28fd8ad6ad0ec79a1868c33f (patch)
treeda9abce08cca5b7502f0a5a6320eba52ee42b8e8 /runtime/lua/vim/lsp/protocol.lua
parent8a333afec53a48c90de7b0bde30f9db2d02d1898 (diff)
parent9d9edebceb73657899256430ed3e2f49c92898a8 (diff)
downloadrneovim-43202964f39eed4e28fd8ad6ad0ec79a1868c33f.tar.gz
rneovim-43202964f39eed4e28fd8ad6ad0ec79a1868c33f.tar.bz2
rneovim-43202964f39eed4e28fd8ad6ad0ec79a1868c33f.zip
Merge pull request #12708 from runiq/lsp-doc
Add docs for some methods in vim.lsp
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index ef5e08680e..4e926381e0 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -2,6 +2,11 @@
local protocol = {}
+--@private
+--- Returns {a} if it is not nil, otherwise returns {b}.
+---
+--@param a
+--@param b
local function ifnil(a, b)
if a == nil then return b end
return a
@@ -9,12 +14,14 @@ end
--[=[
--- Useful for interfacing with:
--- https://github.com/microsoft/language-server-protocol/raw/gh-pages/_specifications/specification-3-14.md
+--@private
+--- Useful for interfacing with:
+--- https://github.com/microsoft/language-server-protocol/raw/gh-pages/_specifications/specification-3-14.md
function transform_schema_comments()
nvim.command [[silent! '<,'>g/\/\*\*\|\*\/\|^$/d]]
nvim.command [[silent! '<,'>s/^\(\s*\) \* \=\(.*\)/\1--\2/]]
end
+--@private
function transform_schema_to_table()
transform_schema_comments()
nvim.command [[silent! '<,'>s/: \S\+//]]