From 57ea20d81ffb8afd8b8fa4c674dcab6ad877874a Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:21:24 +0100 Subject: fix: disambiguate autostart option from function name (#1356) * make `config.autostart` separate from `config.launch()` * simplify handling of `config.autostart` * check for `true` instead of `not false` * replace `trigger` with the conventional `event` and `pattern` --- lua/lspconfig.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/lspconfig.lua') diff --git a/lua/lspconfig.lua b/lua/lspconfig.lua index fd15f6a0..2e7f848c 100644 --- a/lua/lspconfig.lua +++ b/lua/lspconfig.lua @@ -27,14 +27,14 @@ function M._root._setup() function(server_name) if server_name then if configs[server_name] then - configs[server_name].autostart() + configs[server_name].launch() end else local buffer_filetype = vim.bo.filetype for _, config in pairs(configs) do for _, filetype_match in ipairs(config.filetypes or {}) do if buffer_filetype == filetype_match then - config.autostart() + config.launch() end end end @@ -57,7 +57,7 @@ function M._root._setup() for _, client in ipairs(M.util.get_clients_from_cmd_args(cmd_args)) do client.stop() vim.defer_fn(function() - configs[client.name].autostart() + configs[client.name].launch() end, 500) end end, -- cgit v1.2.3-70-g09d2