Comments (17)
It's the terminal mappings:
-- Terminal Mappings
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to Lower Window" })
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
fyi, I'm actually creating a fzf-lua extra. Will probably release it later today
from lazyvim.
Add the below to your fzf-lua spec:
{
"ibhagwan/fzf-lua",
event = "VeryLazy",
opts = {},
keys = {
{ "<esc>", "<cmd>close<cr>", ft = "fzf", mode = "t", nowait = true },
{ "<c-j>", "<Down>", ft = "fzf", mode = "t", nowait = true },
{ "<c-k>", "<Up>", ft = "fzf", mode = "t", nowait = true },
}
}
...
from lazyvim.
Thank you very much @folke for the quick answer.
fyi, I'm actually creating a fzf-lua extra. Will probably release it later today
Oh, exciting; I guess you read my mind 😉; looking forward to it
from lazyvim.
@folke I just saw your addition of the fzf-lua
extra. Thank you!
However, I see it disables Telescope. I agree that the two plugins are somehow doing the same thing, but I've been personally using them together (some things in fzf-lua
and some things in telescope
).
I saw a similar comment about luasnip
and nvim-snippets
about being able to somehow override the disabling.
Maybe in the snippets case, it might be less applicable, but since I've been using fzf-lua
and telescope
together, I was wondering if there's any way (or any plan to support) to override what's disabled
from lazyvim.
Then just add telescope with enabled = true to your own config
from lazyvim.
Oh that works, great, didn't know it takes precedence if I do it in my config; thank you!
from lazyvim.
@folke an update on this: I think <C-j>
and <C-k>
are still not working
Minimal repro:
-- 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)
vim.g.mapleader = " "
-- install plugins
local plugins = {
{ 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
{ import = 'lazyvim.plugins.extras.editor.fzf' },
{
'nvim-telescope/telescope.nvim',
enabled = true,
keys = {
{ '<leader>/', false },
},
},
{
'ibhagwan/fzf-lua',
url = 'https://github.com/ibhagwan/fzf-lua',
cmd = { 'FzfLua' },
keys = {
{ '<leader>/', '<cmd>FzfLua blines<cr>', desc = 'buffer lines (fzf)' },
},
opts = {
keymap = {
builtin = {
['<C-f>'] = 'preview-page-down',
['<C-b>'] = 'preview-page-up',
},
},
},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
If I do "buffer lines" (using <leader>/
), I was expecting <C-j>
and <C-k>
to work as expected, but that's not the case.
I tried disabling lazyvim
altogether and having the keys directly in there like this:
local plugins = {
-- { 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
-- { import = 'lazyvim.plugins.extras.editor.fzf' },
{
'nvim-telescope/telescope.nvim',
enabled = true,
keys = {
{ '<leader>/', false },
},
},
{
'ibhagwan/fzf-lua',
url = 'https://github.com/ibhagwan/fzf-lua',
cmd = { 'FzfLua' },
keys = {
{ '<leader>/', '<cmd>FzfLua blines<cr>', desc = 'buffer lines (fzf)' },
{ "<c-j>", "<Down>", ft = "fzf", mode = "t", nowait = true },
{ "<c-k>", "<Up>", ft = "fzf", mode = "t", nowait = true },
},
opts = {
keymap = {
builtin = {
['<C-f>'] = 'preview-page-down',
['<C-b>'] = 'preview-page-up',
},
},
},
},
}
And that's still not working.
It only works if I remove the bindings altogether (and disable lazyvim
and its fzf
extra)
from lazyvim.
IT all works perfectly fine using the fzf-lua extra.
If it doesn't work for you, then you messed something up.
from lazyvim.
I've also switched fully to fzf-lua Extra since yesterday and can confirm that <C-j>/<C-k>
work as they should on my end.
from lazyvim.
If it doesn't work for you, then you messed something up.
I thought that would be the case; that's why I tried with the second minimal repro snippet above; I event shrunk it down to be like this:
-- 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 = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.editor.fzf" },
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
And still doesn't work. I thought the fact that I'm using this minimal config means that there's nothing on my side interfering with anything 🤔
from lazyvim.
Are you sure you don't have any terminal mappings that might interfere? I just tried the minimal file you mention and it also works there as well.
from lazyvim.
Are you sure you don't have any terminal mappings that might interfere? I just tried the minimal file you mention and it also works there as well.
OMG, you guys are starting to make me feel like I'm crazy 😆
from lazyvim.
This spec works:
local plugins = {
{
"ibhagwan/fzf-lua",
},
}
And when I add lazyvim
(not even the extra) seems to break <C-j>
and <C-k>
local plugins = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{
"ibhagwan/fzf-lua",
},
}
This one closes the fzf
popup when I press <C-j>
and <C-k>
.
And this one:
local plugins = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.editor.fzf" },
{
"ibhagwan/fzf-lua",
},
}
Disables them completely and nothing happens when I press them
from lazyvim.
Here is a screencast of the minimal file you mention
Screencast.2024-06-11.23.11.56.webm
from lazyvim.
Can you make sure your lazy.nvim is 100% up to date?
Even in that repro, you need to open lazy and update (or delete .repro)
from lazyvim.
Man, this is SOOO weird. I tried to do a screen recording (and I did but it's about 34MB and I don't know how to do a smaller one with Mac 🙁 ).
But steps:
- Delete
.repro
folder (to make sure we're clean) - Do
nv -u repro.lua
and let it do its thing - While
lazy.nvim
's window is open, pressU
to udpate everything - Quit and re-open
nv -u repro.lua
- Press
f
to open the files dialog <C-j>
,<C-k>
,<Up>
, and<Down>
are all no-ops and don't do anything
So, even if I managed to upload my screen recording, at the end, you would see fzf-lua
window appearing there for a while, and that was me pressing the keys and seeing nothing happens
from lazyvim.
I can't reproduce this as I've already showed in the screencast. You can even see the keys I'm pressing and <C-j>/<C-k>
work just fine. It's something specific to your system (terminal or something else).
from lazyvim.
Related Issues (20)
- bug: when open fzf-lua split below, another tab sh appear HOT 2
- bug: refactoring.nvim selector issue when using Fzf-lua HOT 2
- bug: vtsls error when using code actions HOT 1
- bug: no specs found for module prisma HOT 2
- Extra reported as being included by default and cannot be removed HOT 7
- bug: vim.ui.open might not work in all environments HOT 3
- bug: (kotlin extra) Parser failed. <...> Expected value but found invalid token at character 1 HOT 2
- bug: error message with DAP extra enabled and Mason disabled
- bug: Can't identify the selected text due to document highlights HOT 3
- bug: Can't send telescope git status to trouble HOT 1
- bug: enabling Edgy Extra casues problem with bufferline.nvim offsets HOT 1
- bug: clangd has no reaction to clang-tidy HOT 1
- feature: option to use `vim.g.terminal_color_0` as the background color in floating terminals HOT 3
- bug: undo a change then go to neotree to change file with file picker will always show select window HOT 5
- bug: problem with installation HOT 1
- bug: [Elixir] Credo linter is not working on fresh lazyvim installation HOT 28
- feature: Add keymap for `:Telescope quickfixhistory` HOT 7
- bug: Wrong text for 'Explorer NeoTree (Root Dir/cwd) ... HOT 2
- Remove LSP keeps being attempted to be started HOT 9
- feature: `checkhealth` for plugin config override HOT 1
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.