-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: The option dev.path no longer works with a function #1707
Comments
I did some more testing. If I use the function directly, it works: ...
---@param plugin LazyPlugin
---@return string
local function get_path1(plugin)
return '~/projects/neovim'
end
---@return string
local function get_path2()
return '~/projects/neovim'
end
---@type LazyConfig
local opts = {
dev = {
path = get_path1, -- Don't work (path get a function)
path = get_path2(), -- Works (path get a string)
path = '~/projects/neovim', -- Works (path get a string)
},
}
require('lazy').setup(spec, opts) |
well the |
Yes, it was a step in my debugging process. :) I think I found it:
---@param plugin LazyPlugin
---@return string
local function get_path(plugin)
return '~/projects/neovim/' .. plugin.name -- <-- I now must add the plugin name here
end
---@type LazyConfig
local opts = {
dev = {
path = get_path, -- Now works (path get a function)
path = '~/projects/neovim', -- Works (path get a string)
},
}
|
are you sure this worked in the past? perhaps you could open a pull request to clarify the docs on this and close this issue |
That's a good question. I should have asked myself that earlier. 🫣 After researching the history of the repositories, I think it has always been like this and the description is simply misleading. A pull request to clarify the docs is a good Idea. |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.1
Operating system/version
macOS 14.6.1
Describe the bug
The option for the path to local plugins no longer works with a function.
A simple example:
I have a function that searches in different directories and returns the first hit, but this no longer works:
The text was updated successfully, but these errors were encountered: