Closed axieax closed 2 years ago
Tweaking the appearance for a specific filetype would be much easier than disabling it, so before I add that functionality I'd like to see if there's a way we can make it look better. What is currently the issue? Is it the placement? That's fairly easy to adjust. For example, to place it in the lower left of the editor:
require("dressing").setup({
input = {
override = function(opt)
if vim.api.nvim_buf_get_option(0, "filetype") == "NvimTree" then
opt.anchor = "SW"
opt.col = 1
opt.row = vim.o.lines - vim.o.cmdheight - 1
opt.relative = "editor"
end
end,
},
})
I mean the default vim.ui.input
is in the command mode bar (so no popup is what I'm trying to achieve).
I've added the ability to change enabled
on the fly using get_config
require("dressing").setup({
input = {
get_config = function()
if vim.api.nvim_buf_get_option(0, "filetype") == "NvimTree" then
return { enabled = false }
end
end,
},
})
Works like a charm! Thanks for spending the extra time to implement this :))
Following https://github.com/kyazdani42/nvim-tree.lua/pull/1097,
vim.ui.input
with the popup doesn't look very good on top of a NvimTree buffer. Is it possible to be able to specify default filetypes / conditions for disabling this UI tweak (e.g. just for NvimTree)?