Giter Site home page Giter Site logo

Comments (11)

molleweide avatar molleweide commented on August 21, 2024 1

Allright cool I am going to read the nvim api docs and make sure i understand.

from doom-nvim.

molleweide avatar molleweide commented on August 21, 2024 1

very nice! i have to check out the develp branch.

from doom-nvim.

NTBBloodbath avatar NTBBloodbath commented on August 21, 2024

Hey, that's because Doom sets the silent option for the mappings, maybe we should make it optional :)

from doom-nvim.

molleweide avatar molleweide commented on August 21, 2024

Aaha that makes sense then

from doom-nvim.

molleweide avatar molleweide commented on August 21, 2024

Can i pass a fourth arg table with silent=false or does this have to be modified inside of doom core first?

from doom-nvim.

NTBBloodbath avatar NTBBloodbath commented on August 21, 2024

Hi, you will need to do it yourself at the moment, but I'll implement it in a very near future!

You will need to modify this lua/doom/core/functions/init.lua block a bit, basically removing the opts variable and doing a conditional assignment. So it should look like this:

elseif scope == 'mappings' then
	for _, map in ipairs(settings_tbl) do
		-- scope, lhs, rhs, options
		utils.map(map[1], map[2], map[3], map[4] and map[4] or {})
	end

and you will be able to pass your custom options for your mappings (see :h map-arguments and :h nvim_set_keymap() to know the valid options).

Side note: the map() function automatically sets the noremap argument and that's gonna be changed in the future too if needed.

from doom-nvim.

molleweide avatar molleweide commented on August 21, 2024

Hey, that's because Doom sets the silent option for the mappings, maybe we should make it optional :)

yes I think that would be a great idea. another example that doesn't work also is for using the 'map' keyword
instead of 'n' or 'v'.

Hi, you will need to do it yourself at the moment, but I'll implement it in a very near future!

You will need to modify this lua/doom/core/functions/init.lua block a bit, basically removing the opts variable and doing a conditional assignment. So it should look like this:

elseif scope == 'mappings' then
	for _, map in ipairs(settings_tbl) do
		-- scope, lhs, rhs, options
		utils.map(map[1], map[2], map[3], map[4] and map[4] or {})
	end

and you will be able to pass your custom options for your mappings (see :h map-arguments and :h nvim_set_keymap() to know the valid options).

Side note: the map() function automatically sets the noremap argument and that's gonna be changed in the future too if needed.

Thanks man for the direction! I will try to get it to work. brb!!

from doom-nvim.

NTBBloodbath avatar NTBBloodbath commented on August 21, 2024

Hey, that's because Doom sets the silent option for the mappings, maybe we should make it optional :)

yes I think that would be a great idea. another example that doesn't work also is for using the 'map' keyword
instead of 'n' or 'v'.

Do you mean nmap and these stuff? If that's the case then it's not possible, the Lua api for the keybindings only takes the keybind mode and if the noremap option was not passed then the mapping is automatically set to <mode>map. You can take a look at :h nvim_set_keymap().

Hi, you will need to do it yourself at the moment, but I'll implement it in a very near future!
You will need to modify this lua/doom/core/functions/init.lua block a bit, basically removing the opts variable and doing a conditional assignment. So it should look like this:

elseif scope == 'mappings' then
	for _, map in ipairs(settings_tbl) do
		-- scope, lhs, rhs, options
		utils.map(map[1], map[2], map[3], map[4] and map[4] or {})
	end

and you will be able to pass your custom options for your mappings (see :h map-arguments and :h nvim_set_keymap() to know the valid options).
Side note: the map() function automatically sets the noremap argument and that's gonna be changed in the future too if needed.

Thanks man for the direction! I will try to get it to work. brb!!

No problem, glad to help. Hope it works for you! :)

from doom-nvim.

molleweide avatar molleweide commented on August 21, 2024

hey are you thinking about including nvim-mapper into doom for key mappings?

from doom-nvim.

NTBBloodbath avatar NTBBloodbath commented on August 21, 2024

@molleweide Hey, yeah and it's already implemented in the development branch :)

from doom-nvim.

NTBBloodbath avatar NTBBloodbath commented on August 21, 2024

I'll be closing this because the feature was already implemented in the development version so I can have a better track of the next version milestone 🙂

from doom-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.