Comments (27)
Still valid until someone tries to add fzf haha.
The comment about extras has been removed in the starter template, to avoid problem and because :lazyextra is preferred instead.
i'll try to do a pr for the docs
edit: opened LazyVim/lazyvim.github.io#97, then i'll close this issue
from lazyvim.
@Drewtopia don't open an issue here. Check the fzf-lua github page first for related issues and open one there if you couldn't fix it yourself
from lazyvim.
So, require("lazy.core.config").spec.modules
only prints out lazyvim.plugins
at the parsing phase of the lazyvim.plugins.editor
. That leads to the import of fzf-lua to be always false
and the telescope one to be true
. When then from lazy.lua
the import = "lazyvim.plugins.extras.editor.fzf"
is evaluated the telescope spec has already been enabled and registered a picker and that's why we see the message that you mention. I still fail to think of a good way to get around this due to my lack of knowledge. I wonder if there's a way for LazyVim.has_extra
to get the imported modules after the parsing phase of all modules has been completed and check based on that.
from lazyvim.
i guess we can close this, but we should update the docs to deprecate the old method, as it's causing problems and is not supported anymore
from lazyvim.
well, if :LazyExtras is the recommanded / supported way, it should be said in the docs.
the config option should be deprecated if it doesn't work, removed from the docs etc.
The import config option is something that comes from lazy.nvim
itself. It just doesn't work correctly in this specific case, because Telescope was also moved to the Extras and the import
is happening in lazyvim.plugins.editor
. It still works for other cases. So, the old method still works, but requires a bit of knowledge about what you're doing (i.e with the imports in your config you should also be vigilant of the order you put the imports, because some Extras need to be loaded first). The docs for the Extras first mention as an option to install the Extra via LazyExtras and then mention the config as alternative. For the specific case of fzf/telescope, maybe it could indeed be mentioned that LazyExtras should be the preferred way.
But it's not like the config option is deprecated or not supported anymore in general. It just doesn't work correctly for this specific change, so any change in the docs should be made in the page of fzf/telescope Extras explicitly.
from lazyvim.
@Drewtopia, that’s the same issue as ibhagwan/fzf-lua#1243, usually indicates an issue with your neovim setup (specially access to runtime folder) which makes vin.fn.serverstart
fail, also look into the upstream issue I linked it will have some pointers for fixing this.
from lazyvim.
Are you sure you don't have some kind of Telescope spec in your personal config?
from lazyvim.
hello @dpetka2001, my bad i guess i missed my commands and the repro.lua actually doesn't work.
i can't even manage to specify a extra ? The repro.lua from the first post doesn't even install fzf, or any other extra i put in there. lot of keybinds doesn't works. i think the given repro.lua is weird.
how can i add a extra to the repro.lua ?
for you question, i removed all telescope config to test, and the message was still there, so i'm sure it's not my config.
from lazyvim.
Strange I've been using it since it got merged and I don't have such a problem. I remember reading that when you import it via import = "lazyvim.plugins.extras.editor.fzf"
in your lazy.lua
then the Telescope spec will still be parsed, but only one of the 2 will be enabled. I enabled fzf-lua via LazyExtras
. Can you try that (if you haven't done so already)?
from lazyvim.
using the repro.lua, like i said it's bugged and the command :LazyExtras doesn't even exist.
using my personal config, removing the import [...] editor.fzf
and adding it via lazyextras works.
the problem is indeed the { import = "lazyvim.plugins.extras.editor.fzf" },
which install the telescope specs.
from lazyvim.
i've updated the main post
from lazyvim.
The following repro.lua
will work correctly
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.editor.fzf" },
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
That doesn't solve the problem with fzf-lua. Something is going on with LazyVim.has_extra
or the way the pickers are registered maybe? Unfortunately, I'm not that well-versed in lazy.nvim
's internals. Maintainer will know better.
from lazyvim.
thanks this repro.lua works, because it use { "LazyVim/LazyVim", import = "lazyvim.plugins" }
while the default just has "folke/LazyVim",
. i'll open a pr for the issue template
from lazyvim.
I had the same problem
from lazyvim.
我有同样的问题
+1
from lazyvim.
As a temporary solution, set the local telescope configuration of lazyvim to enabled= false,. Then recompile lazyvim, the problem is solved temporarily.
from lazyvim.
same here.
My extras config for fzf
{ import = "lazyvim.plugins.extras.editor.fzf" },
{ "junegunn/fzf", build = "./install --bin" },
{
"ibhagwan/fzf-lua",
optional = true,
}
not working
from lazyvim.
So,
require("lazy.core.config").spec.modules
only prints outlazyvim.plugins
at the parsing phase of thelazyvim.plugins.editor
. That leads to the import of fzf-lua to be alwaysfalse
and the telescope one to betrue
. When then fromlazy.lua
theimport = "lazyvim.plugins.extras.editor.fzf"
is evaluated the telescope spec has already been enabled and registered a picker and that's why we see the message that you mention. I still fail to think of a good way to get around this due to my lack of knowledge. I wonder if there's a way forLazyVim.has_extra
to get the imported modules after the parsing phase of all modules has been completed and check based on that.
How about this way
{ import = "lazyvim.plugins.extras.editor.fzf" },
{ import = "lazyvim.plugins.extras.editor.telescope", enabled = false},
from lazyvim.
Just use :LazyExtras
?
I've changed it so that we no longer have to process the full telescope spec when you have fzf-lua enabled.
That only works properly if you added fzf-lua with :LazyExtras
.
from lazyvim.
well, if :LazyExtras is the recommanded / supported way, it should be said in the docs.
the config option should be deprecated if it doesn't work, removed from the docs etc.
personally I like the config option because I can put in my config (which is synced between computer) which extra is enabled, and I have a lot of them.
each time I setup my dotfiles I don't want to have to run lazyextras and remember which one I had, while it could just work like before by setting it in the config
from lazyvim.
{ import = "lazyvim.plugins.extras.editor.telescope", enabled = false},
I also commented out these lines from telescope.lua
-- if not LazyVim.pick.register(picker) then
-- return {}
-- end
I installed it the same way.
{ import = "lazyvim.plugins.extras.editor.fzf" },
from lazyvim.
@mirsella , I understand that the config option has these benefits for you. Personally, I always use the :LazyExtras menu and the generated lazyvim.json file in root to remember/backup my extras. If I reinstall lazyvim, the enabled extras are saved because of this lazyvim.json (I think!), meaning that I don't have to remember the enabled extras. Is this maybe an option?
from lazyvim.
@EraPartner didn't know about lazyvim.json, I'll check it out ! it'll will probably work for me, thanks !
from lazyvim.
Thanks for the explanations.
the only place where the config option is still remaining is the starter template and on https://www.lazyvim.org/configuration/lazy.nvim which just show the starter template.
i'll open a pr on the starter template comments to better reflect the status of the config import, as for a long term user which was used to config option, and for a new user that see the starter template, it's confusing, and will affect everyone that use fzf this way
so in conclusion,
maybe a special warning on the fzf extra page to warn that enabling it via config option doesn't work ?
or a general tips that the setting extras from the import config can cause problem like for fzf ?
from lazyvim.
In my personal opinion I wouldn't mess with LazyVim starter template, as that is still valid. I believe in this specific case, a special warning on LazyVim website in the page of fzf Extra about explicitly enabling it via LazyExtras would be preferred.
from lazyvim.
When I enabled editor.fzf
via :LazyExtras, I am seeing the following errors
from lazyvim.
@Drewtopia that's a different issue, you can open a new one for it to be treated ⬇️
edit: #3650 was created for @ Drewtopia issue
from lazyvim.
Related Issues (20)
- bug: Todo binds still hardcoded to telescope
- bug: rename is invalid in vue file
- bug: vtsls outputing incorrect diagnostics in Neovim 0.10.0
- bug: Failed to run `config` for fzf-lua HOT 7
- bug: codelldb adapter path incorrect after removal of mason-nvim-dap.nvim dependency HOT 4
- bug: Symlink config files not found
- feature: Document how to override autocommands HOT 2
- bug: Hover get exited when scrolling to the end HOT 3
- bug: after latest update, there is error in edgy HOT 19
- feature: Add full-featured setup guides for different languages, such as lint HOT 2
- bug: breaking change in conform.nvim HOT 3
- bug: there are 2 suggested supertab configurations in website HOT 2
- bug: nvim-metals does not load when Scala extras is enabled HOT 21
- bug: nvim-treesitter error on read-only file system HOT 6
- bug: which-key set `il`/`al`/`in`/`an` even if they are disabled or remapped in `mini.ai` HOT 1
- bug: relative number not working HOT 2
- bug: HOT 1
- bug: formatting is not working if lang.go and formatting.prettier are installed on relevant files HOT 3
- bug(haskell): LazyVim.root does not detect lsp root dir HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazyvim.