aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-08 00:47:10 -0800
committerJustin M. Keyes <justinkz@gmail.com>2019-12-08 00:47:37 -0800
commit1856032725a23132c5736e4050ba9ab4266535cc (patch)
tree6da83be1b26c9b0b4be70c029db78f22fb2c3ae7 /lua
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar.gz
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar.bz2
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar.lz
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar.xz
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.tar.zst
nvim-lspconfig-1856032725a23132c5736e4050ba9ab4266535cc.zip
:LspInstall : set complete fn to Lua fn
The sid() hack didn't work on my system, and we can reference Lua global functions meanwhile.
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/lua/nvim_lsp.lua b/lua/nvim_lsp.lua
index 87beaee5..9f8c3df5 100644
--- a/lua/nvim_lsp.lua
+++ b/lua/nvim_lsp.lua
@@ -41,11 +41,6 @@ M._root = {}
-- Called from plugin/nvim_lsp.vim because it requires knowing that the last
-- script in scriptnames to be executed is nvim_lsp.
function M._root._setup()
- local snr = tonumber(table.remove(vim.split(vim.fn.execute("scriptnames"), '\n')):match("^%s*(%d+)"))
- local function sid(s)
- return string.format("<SNR>%d_%s", snr, s)
- end
-
M._root.commands = {
LspInstall = {
function(name)
@@ -62,7 +57,7 @@ function M._root._setup()
template.install()
end;
"-nargs=1";
- "-complete=custom,"..sid("complete_installable_server_names");
+ "-complete=custom,v:lua.lsp_complete_installable_servers";
description = '`:LspInstall {name}` installs a server under stdpath("cache")/nvim_lsp/{name}';
};
LspInstallInfo = {
@@ -83,7 +78,7 @@ function M._root._setup()
return print(vim.inspect(template.install_info()))
end;
"-nargs=?";
- "-complete=custom,"..sid("complete_installable_server_names");
+ "-complete=custom,v:lua.lsp_complete_servers";
description = 'Print installation info for {name} if one is specified, or all installable servers.';
};
};