Skip to content

Commit 02ec064

Browse files
authored
feat!: drop support for Nvim 0.9 (#3552)
* feat!: drop support for Nvim 0.9 New minimal required version is Nvim 0.10.4 * refactor: remove deprecated shims * refactor(lsp): remove obsolete workaround for item_to_location * refactor: rename vim.loop to vim.uv * refactor: proper grammar in confirmation messages * refactor: prefer vim.fs.find over plenary.scandir * refactor: centralize check for Nvim 0.11 * refactor: remove obsolete health shims
1 parent 84b9ba0 commit 02ec064

File tree

23 files changed

+85
-130
lines changed

23 files changed

+85
-130
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
rev: [nightly, stable, v0.9.5, v0.10.4]
20+
rev: [nightly, stable, v0.10.4]
2121
include:
2222
- os: ubuntu-latest
2323
install-rg: sudo apt-get update && sudo apt-get install -y ripgrep

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Telescope Wiki</sub>
4242

4343
This section should guide you to run your first builtin pickers.
4444

45-
[Neovim (v0.9.0)](https://github.com/neovim/neovim/releases/tag/v0.9.0) or the
45+
[Neovim (>v0.10.4)](https://github.com/neovim/neovim/releases/tag/v0.10.4) or the
4646
latest neovim nightly commit is required for `telescope.nvim` to work.
4747
The neovim version also needs to be compiled with LuaJIT, we currently do not
4848
support Lua5.1 because of some ongoing issues.
@@ -406,7 +406,7 @@ filetype detection you should read `:help vim.filetype`.
406406

407407
We need to do it manually because we can't determine the filetype in the
408408
traditional way: We don't do `bufload` and instead read the file asynchronously
409-
with `vim.loop.fs_` and attach only a highlighter; otherwise the speed of the
409+
with `vim.uv.fs_` and attach only a highlighter; otherwise the speed of the
410410
previewer would slow down considerably.
411411

412412
If you want to configure the `vim_buffer_` previewer (e.g. you want the line to wrap), do this:

autoload/health/telescope.vim

Lines changed: 0 additions & 3 deletions
This file was deleted.

lua/telescope/_.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local uv = vim.loop
1+
local uv = vim.uv
22

33
local Object = require "plenary.class"
44
local log = require "plenary.log"

lua/telescope/actions/history.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local conf = require("telescope.config").values
22
local Path = require "plenary.path"
33
local utils = require "telescope.utils"
44

5-
local uv = vim.loop
5+
local uv = vim.uv
66

77
---@tag telescope.actions.history
88
---@config { ["module"] = "telescope.actions.history" }

lua/telescope/actions/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ end
793793
actions.git_merge_branch = make_git_branch_action {
794794
should_confirm = true,
795795
action_name = "actions.git_merge_branch",
796-
confirmation_question = "Do you really wanna merge branch %s? [Y/n] ",
796+
confirmation_question = "Do you really want to merge branch %s? [Y/n] ",
797797
success_message = "Merged branch: %s",
798798
error_message = "Error when merging branch: %s. Git returned: '%s'",
799799
command = function(branch_name)
@@ -806,7 +806,7 @@ actions.git_merge_branch = make_git_branch_action {
806806
actions.git_rebase_branch = make_git_branch_action {
807807
should_confirm = true,
808808
action_name = "actions.git_rebase_branch",
809-
confirmation_question = "Do you really wanna rebase branch %s? [Y/n] ",
809+
confirmation_question = "Do you really want to rebase branch %s? [Y/n] ",
810810
success_message = "Rebased branch: %s",
811811
error_message = "Error when rebasing branch: %s. Git returned: '%s'",
812812
command = function(branch_name)
@@ -823,7 +823,7 @@ local git_reset_branch = function(prompt_bufnr, mode)
823823
end
824824

825825
local confirmation =
826-
ask_to_confirm("Do you really wanna " .. mode .. " reset to " .. selection.value .. "? [Y/n] ", "y")
826+
ask_to_confirm("Do you really want to " .. mode .. " reset to " .. selection.value .. "? [Y/n] ", "y")
827827
if not confirmation then
828828
utils.notify("actions.git_reset_branch", {
829829
msg = "action canceled",

lua/telescope/actions/set.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ action_set.edit = function(prompt_bufnr, command)
196196
-- check if we didn't pick a different buffer
197197
-- prevents restarting lsp server
198198
if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then
199-
filename = Path:new(filename):normalize(vim.loop.cwd())
199+
filename = Path:new(filename):normalize(vim.uv.cwd())
200200
pcall(vim.cmd, string.format("%s %s", command, vim.fn.fnameescape(filename)))
201201
end
202202
end

lua/telescope/builtin/__diagnostics.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ local diagnostics_to_tbl = function(opts)
9191
end
9292
end
9393

94-
opts.root_dir = opts.root_dir == true and vim.loop.cwd() or opts.root_dir
94+
opts.root_dir = opts.root_dir == true and vim.uv.cwd() or opts.root_dir
9595

9696
local bufnr_name_map = {}
9797
local filter_diag = function(diagnostic)

lua/telescope/builtin/__files.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ files.live_grep = function(opts)
119119
end
120120
local search_dirs = opts.search_dirs
121121
local grep_open_files = opts.grep_open_files
122-
opts.cwd = opts.cwd and utils.path_expand(opts.cwd) or vim.loop.cwd()
122+
opts.cwd = opts.cwd and utils.path_expand(opts.cwd) or vim.uv.cwd()
123123

124124
local filelist = get_open_filelist(grep_open_files, opts.cwd)
125125
if search_dirs then

lua/telescope/builtin/__git.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ end
440440
local try_worktrees = function(opts)
441441
local worktrees = conf.git_worktrees
442442

443-
if utils.islist(worktrees) then
443+
if vim.islist(worktrees) then
444444
for _, wt in ipairs(worktrees) do
445445
if vim.startswith(opts.cwd, wt.toplevel) then
446446
opts.toplevel = wt.toplevel
@@ -476,7 +476,7 @@ local set_opts_cwd = function(opts)
476476
return
477477
end
478478
else
479-
opts.cwd = vim.loop.cwd()
479+
opts.cwd = vim.uv.cwd()
480480
end
481481

482482
local toplevel, ret = utils.get_os_command_output({ "git", "rev-parse", "--show-toplevel" }, opts.cwd)

0 commit comments

Comments
 (0)