Skip to content

Commit

Permalink
fix: removed deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
desdic committed May 18, 2024
1 parent b7a9dfa commit b5a796b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y make lua-check
- os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/v0.9.5/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y make lua-check
- os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/v0.9.4/nvim-linux64.tar.gz
- os: ubuntu-24.04
url: https://github.com/neovim/neovim/releases/download/v0.10.0/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y make lua-check
steps:
Expand Down
4 changes: 2 additions & 2 deletions doc/agrolens.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Default telescope options:
-- entry_maker = agrolens.entry_maker
--
-- Default way of finding current directory
-- cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.loop.cwd() or vim.uv.cwd()
-- cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.uv.cwd()
--
-- Default previewer
-- previewer = conf.grep_previewer(opts)
Expand All @@ -131,4 +131,4 @@ Default telescope options:
<


vim:tw=78:ts=8:noet:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:
4 changes: 2 additions & 2 deletions lua/agrolens/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ local M = {}

local utils = require("telescope._extensions.utils")
local ppath = require("plenary.path")
local empty = vim.empty or vim.tbl_isempty
local len = vim.len or vim.tbl_count
local empty = vim.tbl_isempty
local len = vim.tbl_count

M.create_entry = function(
filename,
Expand Down
4 changes: 2 additions & 2 deletions lua/agrolens/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ agrolens.opts = {

local ts_utils = require("nvim-treesitter.ts_utils")
local agroutils = require("telescope._extensions.utils")
local empty = vim.empty or vim.tbl_isempty
local len = vim.len or vim.tbl_count
local empty = vim.tbl_isempty
local len = vim.tbl_count

local get_field_name = function(node)
local parent = node:parent()
Expand Down
6 changes: 2 additions & 4 deletions lua/telescope/_extensions/agrolenslib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ agrolens.telescope_opts = {
-- entry_maker = agrolens.entry_maker
--
-- Default way of finding current directory
-- cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.loop.cwd() or vim.uv.cwd()
-- cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.uv.cwd()
--
-- Default previewer
-- previewer = conf.grep_previewer(opts)
Expand Down Expand Up @@ -170,9 +170,7 @@ agrolens.run = function(opts)

if opts.query then
opts.entry_maker = opts.entry_maker or agrolens.entry_maker
opts.cwd = opts.cwd and vim.fn.expand(opts.cwd)
or vim.loop.cwd()
or vim.uv.cwd()
opts.cwd = opts.cwd and vim.fn.expand(opts.cwd) or vim.uv.cwd()
opts.previewer = opts.previewer or conf.grep_previewer(opts)
opts.sorter = opts.sorter or conf.generic_sorter(opts)
opts = utils.get_buffers(opts)
Expand Down
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/utils.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local M = {}

local len = vim.len or vim.tbl_count
local len = vim.tbl_count

M.ltrim = function(s)
return s:gsub("^%s*", "")
Expand Down

0 comments on commit b5a796b

Please sign in to comment.