From 39106f0b71539bfed103d5ac25309f8d445c8d5e Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 17 May 2024 14:25:57 +0800 Subject: fix: use new version as check condition (#3157) --- lua/lspconfig/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index 9300ed6e..cf83f1a8 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -3,7 +3,7 @@ local validate = vim.validate local api = vim.api local lsp = vim.lsp local uv = vim.loop -local nvim_nine = vim.fn.has 'nvim-0.9' == 1 +local nvim_ten = vim.fn.has 'nvim-0.10' == 1 local is_windows = uv.os_uname().version:match 'Windows' @@ -263,11 +263,11 @@ function M.search_ancestors(startpath, func) end function M.tbl_flatten(t) - return nvim_nine and vim.tbl_flatten(t) or vim.iter(t):flatten(math.huge):totable() + return nvim_ten and vim.iter(t):flatten(math.huge):totable() or vim.tbl_flatten(t) end local function get_lsp_clients(filter) - return nvim_nine and lsp.get_active_clients(filter) or lsp.get_clients(filter) + return nvim_ten and lsp.get_clients(filter) or lsp.get_active_clients(filter) end function M.root_pattern(...) -- cgit v1.2.3-70-g09d2