-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Incompatible with dressing.nvim #66
Comments
I guess the problem here is that a While As a band aid fix, manually mapping the below should circumvent the issue for you for the time being. ["<A-c>"] = function(prompt_bufnr)
vim.cmd(string.format([[noautocmd require "telescope".extensions.file_browser.actions.create(%)]], prompt_bufnr)
end (haven't tried it, if no syntax error I think it should work) |
Thanks @fdschmidt93, so would you say that this is something that should be fixed in Fixing some small typos the above fix works: ["<A-c>"] = function(prompt_bufnr)
vim.cmd(string.format([[noautocmd lua require("telescope").extensions.file_browser.actions.create(%d)]], prompt_bufnr))
end however there are other things such as confirming deleting files etc which doesn't work so well. I think the best for now would be to have an ability to disable dressing for certain buffers. I'll check if this is possible or add this as a feature request. Anyway closing this since it's not really a Thanks for the help! :) |
Confirmation of deletion of files also now uses Maybe with lua autocmds there will also be api for noautocmd, then we could factor that in from within telescope file browser more smoothly I suppose. |
Thanks @fdschmidt93 that seems to also work, in then end I did: local actions = {
["i"] = {
["<A-c>"] = 'create',
["<A-r>"] = 'rename',
["<A-m>"] = 'move',
["<A-y>"] = 'copy',
["<A-d>"] = 'remove',
["<C-o>"] = 'open',
["<C-g>"] = 'goto_parent_dir',
["<C-e>"] = 'goto_home_dir',
["<C-w>"] = 'goto_cwd',
["<C-t>"] = 'change_cwd',
["<C-f>"] = 'toggle_browser',
["<C-h>"] = 'toggle_hidden',
["<C-s>"] = 'toggle_all',
},
["n"] = {
["c"] = 'create',
["r"] = 'rename',
["m"] = 'move',
["y"] = 'copy',
["d"] = 'remove',
["o"] = 'open',
["g"] = 'goto_parent_dir',
["e"] = 'goto_home_dir',
["w"] = 'goto_cwd',
["t"] = 'change_cwd',
["f"] = 'toggle_browser',
["h"] = 'toggle_hidden',
["s"] = 'toggle_all',
},
}
local function get_action(action)
return function(prompt_bufnr)
vim.cmd(string.format([[noautocmd lua require("telescope").extensions.file_browser.actions.%s(%d)]], action, prompt_bufnr))
end
end
local mappings = {}
for _, mode in ipairs({'i', 'n'}) do
local keys = {}
for key, action in pairs(actions[mode]) do
keys[key] = get_action(action)
end
mappings[mode] = keys
end
require("telescope").setup({
extensions = {
file_browser = {
mappings = mappings,
},
},
}) |
Description
Not sure if this issue should be raised here or at https://github.com/stevearc/dressing.nvim but these plugins don't work well together when for example creating new files. See below.
Neovim version
Operating system and version
arch linux 5.15.12-arch1-1
Steps to reproduce
telescope-file-browser.nvim
anddressing.nvim
installed.Expected behavior
The telescope prompt to stay open and no error being raised.
Actual behavior
You get the error:
Minimal config
The text was updated successfully, but these errors were encountered: