diff options
| author | glepnir <glephunter@gmail.com> | 2024-05-23 20:57:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 05:57:12 -0700 |
| commit | 2c1877081b237a643e52ebdebaf36c84a2695639 (patch) | |
| tree | 2f0025cf034c4d27dd6cf07bf5c8138ee6bc3950 /lua/lspconfig/util.lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar.gz nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar.bz2 nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar.lz nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar.xz nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.tar.zst nvim-lspconfig-2c1877081b237a643e52ebdebaf36c84a2695639.zip | |
fix(util): check neovim nightly 0.11 version (#3173)
Diffstat (limited to 'lua/lspconfig/util.lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index a06bfa09..a678db79 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_ten = vim.fn.has 'nvim-0.10' == 1 +local nvim_eleven = vim.fn.has 'nvim-0.11' == 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_ten and vim.iter(t):flatten(math.huge):totable() or vim.tbl_flatten(t) + return nvim_eleven and vim.iter(t):flatten(math.huge):totable() or vim.tbl_flatten(t) end function M.get_lsp_clients(filter) - return nvim_ten and lsp.get_clients(filter) or lsp.get_active_clients(filter) + return nvim_eleven and lsp.get_clients(filter) or lsp.get_active_clients(filter) end function M.root_pattern(...) |
