-
-
Notifications
You must be signed in to change notification settings - Fork 233
Autocommands
github-actions[bot] edited this page May 30, 2023
·
94 revisions
This internal module exposes functionality for subscribing to autocommands and performing actions based on those autocommands.
NOTE: This module will be soon deprecated, and it's favourable to use the vim.api* functions instead.
In your module.setup(), make sure to require core.autocommands (requires = { "core.autocommands" })
Afterwards in a function of your choice that gets called after core.autocommmands gets intialized (e.g. load()):
module.load = function()
module.required["core.autocommands"].enable_autocommand("VimLeavePre") -- Substitute VimLeavePre for any valid neovim autocommand
endAfterwards, be sure to subscribe to the event:
module.events.subscribed = {
["core.autocommands"] = {
vimleavepre = true
}
}Upon receiving an event, it will come in this format:
{
type = "core.autocommands.events.<name of autocommand, e.g. vimleavepre>",
broadcast = true
}This module provides no configuration options!
-
core.concealer- Enhances the basic Neorg experience by using icons instead of text. -
core.dirman- This module is be responsible for managing directories full of .norg files. -
core.esupports.indent- A set of instructions for Neovim to indent Neorg documents. -
core.esupports.metagen- A Neorg module for generating document metadata automatically. -
core.highlights- Manages your highlight groups with this module. -
core.keybinds- Module for managing keybindings with Neorg mode support. -
core.storage- Deals with storing persistent data across Neorg sessions. -
core.syntax- Handles interaction for syntax files for code blocks.
core.autocommandscore.clipboardcore.clipboard.code-blockscore.completioncore.concealercore.defaultscore.dirmancore.dirman.utilscore.esupports.hopcore.esupports.indentcore.esupports.metagencore.exportcore.export.htmlcore.export.markdowncore.fscore.highlightscore.integrations.coq_nvimcore.integrations.nvim-cmpcore.integrations.nvim-compecore.integrations.treesittercore.iterocore.journalcore.keybindscore.latex.renderercore.looking-glasscore.neorgcmdcore.neorgcmd.commands.returncore.pivotcore.presentercore.promocore.qol.toccore.qol.todo_itemscore.queries.nativecore.scannercore.storagecore.summarycore.syntaxcore.tanglecore.tempuscore.text-objectscore.todo-introspectorcore.uicore.ui.calendar