diff options
author | lvimuser <[email protected]> | 2022-07-31 11:51:12 -0300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-31 16:51:12 +0200 |
commit | b8f681374b25740e0aea1c859bf313197ed63dd5 (patch) | |
tree | 7841347cfed1bf4be0aad28ccf0f6d338b122acb /lua | |
parent | caac70d22e98427cd32810acb21476011c374ba3 (diff) |
fix(lvim/lsp/manager): make client_is_configured more reliable (#2851)
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lvim/lsp/manager.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lvim/lsp/manager.lua b/lua/lvim/lsp/manager.lua index 9e898841..00643815 100644 --- a/lua/lvim/lsp/manager.lua +++ b/lua/lvim/lsp/manager.lua @@ -37,9 +37,9 @@ end -- which seems to occur only when attaching to single-files local function client_is_configured(server_name, ft) ft = ft or vim.bo.filetype - local active_autocmds = vim.split(vim.fn.execute("autocmd FileType " .. ft), "\n") + local active_autocmds = vim.api.nvim_get_autocmds { event = "FileType", pattern = ft } for _, result in ipairs(active_autocmds) do - if result:match(server_name) then + if result.command:match(server_name) then Log:debug(string.format("[%q] is already configured", server_name)) return true end |