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: allow arguments for :Neorg generate-workspace-summary #1156

Merged
merged 18 commits into from
Nov 15, 2023

Conversation

Dynge
Copy link
Contributor

@Dynge Dynge commented Nov 9, 2023

Closes: #1086

Changes

This pull request changes the generate-workspace-summary in two ways:

  1. The Neorg generate-workspace-summary command now takes optional arguments.
  2. Added a public function generate_workspace_summary such that it can be called through lua directly if needed.

Needs feedback

The way it is implemented in this pull request accomplishes the goal by separating the arguments by space for separate categories, meaning you cannot target a category containing spaces with the neorgcmd.

I am not sure what is the better implementation - this or one where the Neorgcmd merges all inputs into a single category.

This method can be used to add custom metadata into file instead of
defaults. If table is empty of nil then simply uses default like
inject_metadata
No longer uses tabnew and relies on buffer 0 to insert metadata into the
newly created file.
Added class annotations to better describe the input options for
create_file and create_metadata.
Updated naming of @Class annotations to better align with the naming
used in the rest of the project.
Dirman now broadcasts an event on file creation that metagen listen to.
Metagen then injects desired metadata if present.
Neorg generate-workspace-summary now takes possible arguments.
Each argument is space separated as a distinct category.

Also made a method public to call it from lua instead of a vim command.
@vhyrro
Copy link
Member

vhyrro commented Nov 14, 2023

This looks good to me! Could you also add a small explanation to the comment at the top of the file explaining what the arguments to the :Neorg generate-workspace-summary command do? Would be appreciated :)

Added documentation explaining how arguments work with the command
`Neorg generate-workspace-summary`.
@Dynge
Copy link
Contributor Author

Dynge commented Nov 14, 2023

Sounds great.

I've added a line or two explaining how to use arguments for the command.
Let me know if it is satisfactory :)

@Dynge
Copy link
Contributor Author

Dynge commented Nov 14, 2023

Not sure I understand why the build failed.

I don't see any logs related to the summary module. :/

Do I need to revert my merge commit from neorg/main?

@pysan3
Copy link
Contributor

pysan3 commented Nov 14, 2023

Nope you are alright.

It's this #1161.

I and @vhyrro will look into fixing the type errors but it will take time. Until then, you can ignore the lua_ls type check action. (If others are failing, then that's a problem tho)

@vhyrro
Copy link
Member

vhyrro commented Nov 15, 2023

Sounds great.

I've added a line or two explaining how to use arguments for the command. Let me know if it is satisfactory :)

Perfect, thank you for the PR! :)

@vhyrro vhyrro changed the title feat: arguments for generate workspace feat: allow arguments for :Neorg generate-workspace-summary Nov 15, 2023
@vhyrro vhyrro merged commit 46741ed into nvim-neorg:main Nov 15, 2023
1 of 2 checks passed
benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
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.

Generate workspace summary per category
3 participants