Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: (wip) Redesigned event publishing system #1076

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Groctel
Copy link
Contributor

@Groctel Groctel commented Sep 10, 2023

As part of the #999 project, this is a WIP PR just so you can see how I'm working on the events system and offer your suggestions and criticism. Check neorg.core.events for an in-depth explanation on how the events system is designed.

Comment on lines +86 to +92
cursor_position = vim.api.nvim_win_get_cursor(0),
filename = fn.expand("%:t"),
filehead = fn.expand("%:p:h"),
line_content = api.nvim_get_current_line(),
buffer = api.nvim_get_current_buf(),
window = api.nvim_get_current_win(),
mode = api.nvim_get_mode().mode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am happy to deprecate these! These used to be required when events were sent via vim.schedule, in which case you could get outdated information about the current buffer ID etc.



---@alias neorg.event.neorg_started nil
---Informs that Neorg has finished loaded. Its payload is empty.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny typo - "has finished loaded" -> "has finished loading" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was tense...

Groctel

This comment was marked as resolved.

lua/neorg.lua Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants