Skip to content

Commit

Permalink
fixup: adapt to deprecations in Nvim 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
clason committed May 17, 2024
1 parent bbdbb75 commit 50af606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/telescope/builtin/__lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugin/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 50af606

Please sign in to comment.