Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pritchett/neorg-capture
A capture implementation for Neorg
https://github.com/pritchett/neorg-capture
Last synced: 3 months ago
JSON representation
A capture implementation for Neorg
- Host: GitHub
- URL: https://github.com/pritchett/neorg-capture
- Owner: pritchett
- License: gpl-3.0
- Created: 2023-10-28T18:55:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T14:55:25.000Z (8 months ago)
- Last Synced: 2024-04-04T12:33:23.476Z (7 months ago)
- Size: 28.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neorg - Neorg Capture - A neorg module to capture quick notes using neorg-templates (Neorg Modules)
README
# Neorg Capture
\* **This README is generated from [./README.norg](./README.norg).**
## Usage
Set up a template with [neorg-templates](https://github.com/pysan3/neorg-templates)
## Installation
- [lazy.nvim](https://github.com/folke/lazy.nvim) installation
```lua
-- neorg.lua
local M = {
"nvim-neorg/neorg",
ft = "norg",
dependencies = {
{ "pysan3/neorg-templates", dependencies = { "L3MON4D3/LuaSnip" } }, -- ADD THIS LINE
{ "pritchett/neorg-capture"}, -- ADD THIS LINE
},
}
```## Configuration
```lua
M.config = function ()
require("neorg").setup({
load = {
["external.templates"] = {
...
},
["external.capture"] = {
templates = {
{
description = "Example", -- What will be shown when invoked
name = "example", -- Name of the neorg-templates template.
file = "example", -- Name of the target file for the caputure. With or without `.norg` suffix
-- Can be a function. If a full filepath is given, thats where it will be save.
-- If just a filename, it will be saved into your workspace.enabled = function() -- Either a function or boolean value. Default is true.
return true -- If false, it will not be shown in the list when invoked.
end,datetree = true, -- Save the capture into a datetree. Default is false
headline = "Example" -- If set, will save the caputure under this headline
path = { "Save", "Here" } -- List of headlines to traverse, then save the capture under
query = -- A query for where to place the capture. Must be named neorg-capture-target
"(headline1) @neorg-capture-target"},
...
}
},
}
})
end
```- Headlines take precedence over paths. If neither is set, the capture is set at the bottom of the target file.
- Datetrees can be combined with headlines or paths.## Contribution
- PRs are welcome
- Please follow code style defined in [./stylua.toml](./stylua.toml) using [StyLua](https://github.com/johnnymorganz/stylua).## LICENSE
All files in this repository without annotation are licensed under the **GPL-3.0 license** as detailed in [LICENSE](LICENSE).