Skip to content

Commit

Permalink
fix: Restore Neovim 0.9.5 compatibility
Browse files Browse the repository at this point in the history
It looks like some dependencies on Lua features only available on Neovim
`master` have snuck in:

- Having `vim.uv` as an alias for `vim.loop`

- `vim.fs.joinpath`
  • Loading branch information
etaoins committed Feb 26, 2024
1 parent 576adf4 commit 55f8729
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/pckr/fsstate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ local function get_dir_plugins(dir)
for name, ty in vim.fs.dir(dir) do
if ty ~= 'file' then
local path = util.join_paths(dir, name)
if vim.uv.fs_stat(path) then
if uv.fs_stat(path) then
plugins[path] = name
end
end
Expand Down
7 changes: 5 additions & 2 deletions lua/pckr/plugin_types/local.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
local a = require('pckr.async')
local log = require('pckr.log')
local util = require('pckr.util')

local uv = vim.loop

--- @class Pckr.PluginHandler.Local: Pckr.PluginHandler
local M = {}
Expand All @@ -14,8 +17,8 @@ end
--- @param disp Pckr.Display
--- @return string?
M.updater = a.sync(function(plugin, disp)
local gitdir = vim.fs.joinpath(plugin.install_path, '.git')
if vim.uv.fs_stat(gitdir) then
local gitdir = util.join_paths(plugin.install_path, '.git')
if uv.fs_stat(gitdir) then
return require('pckr.plugin_types.git').updater(plugin, disp, true)
end
-- Nothing to do
Expand Down

0 comments on commit 55f8729

Please sign in to comment.