Comments (10)
thanks for replying again!
i will try your suggestion and get back.
from doom-nvim.
yes then it works! i will add some jumpkeys and make a pr.
from doom-nvim.
wow thanks I will try this and report back
from doom-nvim.
also, how does one reload the config?? I am really starting to like doom
from doom-nvim.
Hmm maybe it's because of which-key plugin? Let's try modifying the lua/doom/modules/config/doom-whichkey.lua
and adding a jump
category, hope it works.
from doom-nvim.
also, how does one reload the config?? I am really starting to like doom
Doom will automatically reload its modules (e.g. keybindings, custom options) and the plugins configurations too (by running :PackerCompile
when a config/doom-X.lua
had changes) :)
from doom-nvim.
Hmm maybe it's because of which-key plugin? Let's try modifying the
lua/doom/modules/config/doom-whichkey.lua
and adding ajump
category, hope it works.
Oh now i think i understand what you mean! Do you mean that maybe which-key is "blocking" leader key maps that fall outside of the specified tree in the config. This means that I have to duplicate all my maps in there also basically.
from doom-nvim.
also, how does one reload the config?? I am really starting to like doom
Doom will automatically reload its modules (e.g. keybindings, custom options) and the plugins configurations too (by running
:PackerCompile
when aconfig/doom-X.lua
had changes) :)
I realize that forgot to mention more specifically how do I relead custom keybindings?
Would I need a special command for this? Because commands like so $MYVIMRC
doesn't work here right?
Currently I am restarting vim every time to refresh mappings.
from doom-nvim.
Hmm live-reloading in Lua is a bit more complex because of the require
functions.
Basically there's a Lua table called package.loaded
that contains all the Lua modules loaded, so by example you can do package.loaded["doom.core"] = nil
to "unload" the Doom core module, and then require it again but this doesn't do the trick for this case.
At the moment you can write something like that in a custom function in your doom_config.lua
:
functions = {
reload_custom_settings = function()
-- Our handler for the user-defined settings
local load_custom_settings = require("doom.core.functions").load_custom_settings
-- Get the user-defined settings, the 'nvim' field in our 'doom_config.lua'
local custom_settings = require("doom.core.config").load_config().nvim
-- Iterate over all the custom settings fields, e.g. global_variables, mappings, etc.
for field, _ in pairs(custom_settings) do
-- Load the custom settings again (reload them).
-- This function takes two parameters, the options list and the options scope, e.g. mappings
load_custom_settings(custom_settings[field], field)
end
end,
},
And lately in your mappings field in the same file, you could set a mapping for this function:
mappings = {
{ "n", "rc", "<cmd>lua require('doom.core.config').load_config().nvim.functions.reload_custom_settings()<CR>" },
},
from doom-nvim.
Sure, also in case that it doesn't work you can try commenting these lines locally because the custom functions are being called on launch and maybe this one can cause some issues.
And what I just said gave me an idea to improve doom's extensibility, I'll be implementing it this week :)
from doom-nvim.
Related Issues (20)
- [BUG] Update minimum neovim version to 0.7 HOT 2
- [FEATURE REQUEST] Install script improvements (warn if already installed, --check flag)
- [FEATURE REQUEST] Refactor `require` to use `pcall` in language configurations
- [BUG] Error when using Telescope shortcut HOT 2
- [FEATURE REQUEST] Refactor `auto_installer` module to use mason.nvim
- [BUG] module 'null-ls' not found: HOT 1
- Colorizer not working anymore HOT 1
- [BUG] MacOS GCC Treesitter grammer install error `<sys/_types/_int8_t.h>`
- improved debugging of modules
- On Doom Install Whichkey Error HOT 6
- [BUG] tree sitter error when typing in telescope prompt
- [QUESTION] Nvim 0.8 support? HOT 8
- [BUG] cc LSP not working on Linux by default HOT 2
- [INFO]: (v4.1.0-alpha4) startup messages after nuking on macbook air M1
- [BUG] Symbols Sidebar requires setup HOT 2
- [BUG] Fugitive Commit doesn'work HOT 1
- [FEATURE REQUEST] add `module` name/path to each module bind tree -> make debugging easier HOT 1
- [BUG] Formatting typescript file does not respect shiftwidth settings, hence tabSize is incorrect
- [FEATURE REQUEST] Update `nvim-mapper` repo
- [BUG] Jump to definition bind from `<leader> c d` is overridden by diagnostics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doom-nvim.