break: bump the minimum required neovim version to 0.6 or higher (#1549)
So we can use `vim.json` and `vim.diagnostics`. If you aren't able to update to 0.6.* yet you should pin the previous commit.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
manager: sudo apt-get
|
||||
packages: -y fd-find
|
||||
- os: ubuntu-20.04
|
||||
url: https://github.com/neovim/neovim/releases/download/v0.5.1/nvim-linux64.tar.gz
|
||||
url: https://github.com/neovim/neovim/releases/download/v0.6.0/nvim-linux64.tar.gz
|
||||
manager: sudo apt-get
|
||||
packages: -y fd-find
|
||||
- os: macos-10.15
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
manager: brew
|
||||
packages: fd
|
||||
- os: macos-10.15
|
||||
url: https://github.com/neovim/neovim/releases/download/v0.5.1/nvim-macos.tar.gz
|
||||
url: https://github.com/neovim/neovim/releases/download/v0.6.0/nvim-macos.tar.gz
|
||||
manager: brew
|
||||
packages: fd
|
||||
steps:
|
||||
|
||||
@@ -41,7 +41,7 @@ Telescope Wiki</sub>
|
||||
|
||||
This section should guide you to run your first builtin pickers.
|
||||
|
||||
[Neovim (v0.5.1)](https://github.com/neovim/neovim/releases/tag/v0.5.1) or the
|
||||
[Neovim (v0.6.0)](https://github.com/neovim/neovim/releases/tag/v0.6.0) or the
|
||||
latest neovim nightly commit is required for `telescope.nvim` to work.
|
||||
|
||||
### Suggested dependencies
|
||||
|
||||
@@ -131,4 +131,15 @@ requires users to be on Neovim 0.5.1 (the most recent stable version) or on
|
||||
the LATEST version of Neovim nightly.
|
||||
|
||||
|
||||
*telescope.changelog-1549*
|
||||
|
||||
Date: December 10, 2021
|
||||
PR: https://github.com/nvim-telescope/telescope.nvim/pull/1549
|
||||
|
||||
Telescope requires now Neovim release 0.6.0 or a more recent nightly.
|
||||
If you are running neovim nightly, you need to make sure that you are on the
|
||||
LATEST version. Every other commit is not supported. So make sure you build
|
||||
the newest nightly before reporting issues.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
--- </code>
|
||||
---@brief ]]
|
||||
|
||||
if 1 ~= vim.fn.has "nvim-0.5.1" then
|
||||
vim.api.nvim_err_writeln "This plugins requires neovim 0.5.1"
|
||||
if 1 ~= vim.fn.has "nvim-0.6.0" then
|
||||
vim.api.nvim_err_writeln "This plugins requires neovim 0.6.0"
|
||||
vim.api.nvim_err_writeln "Please update your neovim."
|
||||
return
|
||||
end
|
||||
|
||||
@@ -245,7 +245,7 @@ internal.symbols = function(opts)
|
||||
|
||||
local results = {}
|
||||
for _, source in ipairs(sources) do
|
||||
local data = vim.fn.json_decode(Path:new(source):read())
|
||||
local data = vim.json.decode(Path:new(source):read())
|
||||
for _, entry in ipairs(data) do
|
||||
table.insert(results, entry)
|
||||
end
|
||||
|
||||
@@ -380,16 +380,10 @@ local function get_workspace_symbols_requester(bufnr, opts)
|
||||
_, cancel = vim.lsp.buf_request(bufnr, "workspace/symbol", { query = prompt }, tx)
|
||||
|
||||
-- Handle 0.5 / 0.5.1 handler situation
|
||||
local err, res_1, res_2 = rx()
|
||||
local results_lsp
|
||||
if type(res_1) == "table" then
|
||||
results_lsp = res_1
|
||||
else
|
||||
results_lsp = res_2
|
||||
end
|
||||
local err, res = rx()
|
||||
assert(not err, err)
|
||||
|
||||
local locations = vim.lsp.util.symbols_to_items(results_lsp or {}, bufnr) or {}
|
||||
local locations = vim.lsp.util.symbols_to_items(res or {}, bufnr) or {}
|
||||
if not vim.tbl_isempty(locations) then
|
||||
locations = utils.filter_symbols(locations, opts) or {}
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ end
|
||||
|
||||
local writer = function(val)
|
||||
if type(val) == "table" then
|
||||
val = vim.fn.json_encode(val) .. "\n"
|
||||
val = vim.json.encode(val) .. "\n"
|
||||
end
|
||||
|
||||
if tester.debug then
|
||||
@@ -157,7 +157,7 @@ local get_results_from_file = function(file)
|
||||
local results = j:stderr_result()
|
||||
local result_table = {}
|
||||
for _, v in ipairs(results) do
|
||||
table.insert(result_table, vim.fn.json_decode(v))
|
||||
table.insert(result_table, vim.json.decode(v))
|
||||
end
|
||||
|
||||
return result_table
|
||||
|
||||
@@ -42,9 +42,9 @@ describe("builtin.find_files", function()
|
||||
width = 0.9,
|
||||
},
|
||||
border = false,
|
||||
}, vim.fn.json_decode([==[%s]==])))
|
||||
}, vim.json.decode([==[%s]==])))
|
||||
]],
|
||||
vim.fn.json_encode(configuration)
|
||||
vim.json.encode(configuration)
|
||||
))
|
||||
end)
|
||||
|
||||
@@ -73,10 +73,10 @@ describe("builtin.find_files", function()
|
||||
width = 0.9,
|
||||
},
|
||||
border = false,
|
||||
}, vim.fn.json_decode([==[%s]==])))
|
||||
}, vim.json.decode([==[%s]==])))
|
||||
]],
|
||||
expected,
|
||||
vim.fn.json_encode(configuration)
|
||||
vim.json.encode(configuration)
|
||||
))
|
||||
end)
|
||||
|
||||
@@ -99,9 +99,9 @@ describe("builtin.find_files", function()
|
||||
}, vim.tbl_extend("force", {
|
||||
disable_devicons = false,
|
||||
sorter = require('telescope.sorters').get_fzy_sorter(),
|
||||
}, vim.fn.json_decode([==[%s]==])))
|
||||
}, vim.json.decode([==[%s]==])))
|
||||
]],
|
||||
vim.fn.json_encode(configuration)
|
||||
vim.json.encode(configuration)
|
||||
))
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
if !has('nvim-0.5.1')
|
||||
echoerr "Telescope.nvim requires at least nvim-0.5.1. See `:h telescope.changelog-1406`"
|
||||
if !has('nvim-0.6.0')
|
||||
echoerr "Telescope.nvim requires at least nvim-0.6.0. See `:h telescope.changelog-1549`"
|
||||
finish
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user