mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2025-12-06 06:46:10 +00:00
fixup: adapt to deprecations in Nvim 0.10 (#3112)
This commit is contained in:
@@ -394,7 +394,7 @@ end
|
|||||||
|
|
||||||
local function check_capabilities(method, bufnr)
|
local function check_capabilities(method, bufnr)
|
||||||
--TODO(clason): remove when dropping support for Nvim 0.9
|
--TODO(clason): remove when dropping support for Nvim 0.9
|
||||||
local get_clients = vim.fn.has "nvim-0.10" and vim.lsp.get_clients or vim.lsp.get_active_clients
|
local get_clients = vim.fn.has "nvim-0.10" == 1 and vim.lsp.get_clients or vim.lsp.get_active_clients
|
||||||
local clients = get_clients { bufnr = bufnr }
|
local clients = get_clients { bufnr = bufnr }
|
||||||
|
|
||||||
for _, client in pairs(clients) do
|
for _, client in pairs(clients) do
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ end, {
|
|||||||
if n == 0 then
|
if n == 0 then
|
||||||
local commands = { builtin_list, extensions_list }
|
local commands = { builtin_list, extensions_list }
|
||||||
-- TODO(clason): remove when dropping support for Nvim 0.9
|
-- TODO(clason): remove when dropping support for Nvim 0.9
|
||||||
if vim.fn.has "nvim-0.10" then
|
if vim.fn.has "nvim-0.10" == 1 then
|
||||||
commands = vim.iter(commands):flatten():totable()
|
commands = vim.iter(commands):flatten():totable()
|
||||||
else
|
else
|
||||||
commands = vim.tbl_flatten(commands)
|
commands = vim.tbl_flatten(commands)
|
||||||
|
|||||||
Reference in New Issue
Block a user