Giter Club home page Giter Club logo

Comments (10)

AW3i avatar AW3i commented on August 23, 2024 1

Using the keys section makes it work, thanks!

from hardtime.nvim.

m4xshen avatar m4xshen commented on August 23, 2024

You can add "oil" and "TelescopePrompt" to disabled_filetypes to disable hardtime.nvim when using these plugins.

from hardtime.nvim.

Mithrandir2k18 avatar Mithrandir2k18 commented on August 23, 2024

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.

from hardtime.nvim.

m4xshen avatar m4xshen commented on August 23, 2024

Could you provide your keymap setting of <C-P> and -?

from hardtime.nvim.

AW3i avatar AW3i commented on August 23, 2024

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" })

from hardtime.nvim.

m4xshen avatar m4xshen commented on August 23, 2024

Please try out the latest version of hardtime.nvim. It should work fine now.

from hardtime.nvim.

AW3i avatar AW3i commented on August 23, 2024

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>  

from hardtime.nvim.

m4xshen avatar m4xshen commented on August 23, 2024

@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>" },
      },
}

from hardtime.nvim.

Mithrandir2k18 avatar Mithrandir2k18 commented on August 23, 2024

@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?

from hardtime.nvim.

m4xshen avatar m4xshen commented on August 23, 2024

Putting it inside keys makes sure that the keymap is set after the plugin is loaded.

from hardtime.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.