-
-
Notifications
You must be signed in to change notification settings - Fork 215
Autocommands
github-actions[bot] edited this page Jul 13, 2024
·
90 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
end
Afterwards, 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.latex.renderer
- An experimental module for rendering latex images inline. -
core.storage
- Deals with storing persistent data across Neorg sessions. -
core.syntax
- Handles interaction for syntax files for code blocks.
core.autocommands
core.clipboard
core.clipboard.code-blocks
core.completion
core.concealer
core.defaults
core.dirman
core.dirman.utils
core.esupports.hop
core.esupports.indent
core.esupports.metagen
core.export
core.export.markdown
core.fs
core.highlights
core.integrations.coq_nvim
core.integrations.nvim-cmp
core.integrations.nvim-compe
core.integrations.treesitter
core.itero
core.journal
core.keybinds
core.latex.renderer
core.looking-glass
core.neorgcmd
core.neorgcmd.commands.return
core.pivot
core.presenter
core.promo
core.qol.toc
core.qol.todo_items
core.queries.native
core.scanner
core.storage
core.summary
core.syntax
core.tangle
core.tempus
core.text-objects
core.todo-introspector
core.ui
core.ui.calendar