Closed Mithrandir2k18 closed 1 year ago
You can add "oil" and "TelescopePrompt" to disabled_filetypes
to disable hardtime.nvim when using these plugins.
Tried that, the problem is enabling hardtime seems to unbind/rebind some of my binds, like <C-P>
for searching the repo or -
for oil. Even after disabling it the binds still don't work. It doesn't hurt anything if I set enabled=false
in the opts but as soon as I enable it, I need to disable it and restart nvim to reload the binds it overrides.
Could you provide your keymap setting of <C-P>
and -
?
I have the same issue with the keybindings in oil. This is how I have the keybinding defined in my config
vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })
Please try out the latest version of hardtime.nvim. It should work fine now.
I pulled the latest version and I'm getting the following error now
E5108: Error executing lua: .../aw3i/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:379: Vim:E565: Not allowed to change text or change window
stack traceback:
[C]: in function 'edit'
.../aw3i/.local/share/nvim/lazy/oil.nvim/lua/oil/init.lua:379: in function 'callback'
...ocal/share/nvim/lazy/hardtime.nvim/lua/hardtime/init.lua:15: in function <...ocal/share/nvim/lazy/hardtime.nvim/lua/hardtime/init.lua:11>
@AW3i are you using lazy.nvim to install plugins? If yes, please set the keymap in the keys section when installing oil.nvim:
{
"stevearc/oil.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {},
keys = {
{ "-", ":lua require('oil').open()<CR>" },
},
}
Using the keys section makes it work, thanks!
@AW3i are you using lazy.nvim to install plugins? If yes, please set the keymap in the keys section when installing oil.nvim:
{ "stevearc/oil.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = {}, keys = { { "-", ":lua require('oil').open()<CR>" }, }, }
What's the difference between setting it in the plugins map vs. setting the keymap separately?
Putting it inside keys
makes sure that the keymap is set after the plugin is loaded.
Describe the bug installing the plugin disables shortcuts for e.g. CTRL+P which opens
builtin.git_files
in telescope or-
is is a bind for oil.nvim. This is how I mainly navigate between files. Hardtime also doesn't give me an error message telling me that that's suboptimal, so I think it may be a bug.Config options Nothing, I really just added hardtime to lazy as per the readme.
Expected behavior hardtime gives me a hard time but still lets me navigate between files.
Additional context See my dotfiles repo for my neovim config.