Fix ltex_extra
This commit is contained in:
parent
aa179f7e25
commit
9e92e2fef0
|
@ -13,12 +13,21 @@ local types = {
|
||||||
|
|
||||||
local function catch_ltex()
|
local function catch_ltex()
|
||||||
log.trace("catch_ltex")
|
log.trace("catch_ltex")
|
||||||
local buf_clients = vim.lsp.buf_get_clients()
|
local client_getter = vim.lsp.get_clients and vim.lsp.get_clients or vim.lsp.get_active_clients
|
||||||
local client = nil
|
|
||||||
for _, lsp in ipairs(buf_clients) do
|
local buf_clients = client_getter({
|
||||||
if lsp.name == "ltex" then client = lsp end
|
bufnr = vim.api.nvim_get_current_buf(),
|
||||||
|
name = "ltex",
|
||||||
|
})
|
||||||
|
|
||||||
|
if vim.tbl_isempty(buf_clients) then
|
||||||
|
buf_clients = client_getter({
|
||||||
|
bufnr = vim.api.nvim_get_current_buf(),
|
||||||
|
name = "ltex_plus",
|
||||||
|
})
|
||||||
end
|
end
|
||||||
return client
|
|
||||||
|
return buf_clients[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
local function update_language(client, lang)
|
local function update_language(client, lang)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
element-desktop
|
element-desktop
|
||||||
evince
|
evince
|
||||||
loupe
|
loupe
|
||||||
gimp
|
gimp3
|
||||||
obs-studio
|
obs-studio
|
||||||
inkscape
|
inkscape
|
||||||
gnome-calendar
|
gnome-calendar
|
||||||
|
|
Loading…
Reference in New Issue