Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Use callbacks for Neorg displays #2

Open
danymat opened this issue Jan 6, 2022 · 2 comments
Open

Use callbacks for Neorg displays #2

danymat opened this issue Jan 6, 2022 · 2 comments

Comments

@danymat
Copy link

danymat commented Jan 6, 2022

Hello @esquires, recent GTD changes introduced a new way for extensions to hook themselves into the GTD environment.

The first thing I did was to remove any internal requirement (buffer, node, task position) in the views. That means you can now use standard tasks and projects that conform to the format, and having them displayed.

The format of a task/project changed to being:

{
    type = "task",
    uuid = "...",
    project_uuid = "...",
    contexts = {...},
    internal = {...} -- see https://github.com/nvim-neorg/neorg/commit/109756aace97950888077d82167c22104afd23d2
}

Futhermore, I added the ability to hook yourself to the gtd views and actions:

This is by no means final of course, as there are still some bugs. But it works, and you can help yourself by seeing how I replaced them here: https://github.com/danymat/neorg-gtd-things

Cheers !

@esquires
Copy link
Owner

esquires commented Jan 8, 2022

great idea and thanks for the headsup! I updated this project in ab4b32a for the new tasks api (the changes in neorg 109756aace only broke the go to task). The implementation of projects may be a bit more involved. I'll leave this issue open so I remember to update the latter as well.

@esquires
Copy link
Owner

esquires commented Sep 3, 2022

I started to fix this in (f01b1c6) for tasks but projects don't map quite as cleanly so I'll need to address that in a separate commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants