From 33f04c3a8620024f1dffd0357e37fe701edbf737 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 17 May 2024 18:10:21 +0200 Subject: [PATCH] fixup: adapt to deprecations in Nvim 0.10 (#3112) --- lua/telescope/builtin/__lsp.lua | 2 +- plugin/telescope.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/builtin/__lsp.lua b/lua/telescope/builtin/__lsp.lua index d8c5e3e..e781d24 100644 --- a/lua/telescope/builtin/__lsp.lua +++ b/lua/telescope/builtin/__lsp.lua @@ -394,7 +394,7 @@ end local function check_capabilities(method, bufnr) --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 } for _, client in pairs(clients) do diff --git a/plugin/telescope.lua b/plugin/telescope.lua index 353ee6b..d2a42c5 100644 --- a/plugin/telescope.lua +++ b/plugin/telescope.lua @@ -118,7 +118,7 @@ end, { if n == 0 then local commands = { builtin_list, extensions_list } -- 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() else commands = vim.tbl_flatten(commands)