├── .zk ├── templates │ ├── default.md │ ├── idea.md │ └── daily.md ├── notebook.db ├── command_picker.sh └── config.toml ├── ideas └── 06-08-2023-untitled.md ├── journal └── 06-08-2023.md ├── .helix ├── config.toml └── languages.toml └── README.md /.zk/templates/default.md: -------------------------------------------------------------------------------- 1 | # {{title}} 2 | 3 | {{content}} 4 | -------------------------------------------------------------------------------- /.zk/notebook.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YurkoHoshko/helix_zk_notebook/HEAD/.zk/notebook.db -------------------------------------------------------------------------------- /.zk/templates/idea.md: -------------------------------------------------------------------------------- 1 | ## IDEA TITLE 2 | 3 | ### Short Summary 4 | 5 | ### Implementation 6 | 7 | ### Pros 8 | 9 | ### Cons 10 | -------------------------------------------------------------------------------- /.zk/templates/daily.md: -------------------------------------------------------------------------------- 1 | # {{format-date now "full"}} 2 | 3 | --- 4 | 5 | # Agenda for the day 6 | 7 | - [ ] 8 | - [ ] 9 | - [ ] 10 | 11 | # Day summary -------------------------------------------------------------------------------- /ideas/06-08-2023-untitled.md: -------------------------------------------------------------------------------- 1 | ## ZK integration with Helix 2 | 3 | ### Short Summary 4 | 5 | ### Implementation 6 | 7 | ### Pros 8 | 9 | ### Cons 10 | -------------------------------------------------------------------------------- /journal/06-08-2023.md: -------------------------------------------------------------------------------- 1 | # Thursday, June 08, 2023 2 | 3 | --- 4 | 5 | # Agenda for the day 6 | 7 | - [ ] Record my idea [[ideas/06-08-2023-untitled]] 8 | - [ ] 9 | - [ ] 10 | 11 | # Day summary -------------------------------------------------------------------------------- /.helix/config.toml: -------------------------------------------------------------------------------- 1 | [keys.normal] 2 | 3 | space = { n = [":new", ":insert-output tmux popup -d \"$(pwd)\" -E \".zk/command_picker.sh\"", ":insert-output pbpaste", "select_all", "split_selection_on_newline", "goto_file", "goto_last_modified_file", ":buffer-close!"]} 4 | -------------------------------------------------------------------------------- /.helix/languages.toml: -------------------------------------------------------------------------------- 1 | [language-server.zk] 2 | command = "zk" 3 | args = ["lsp"] 4 | 5 | 6 | [[language]] 7 | name = "markdown" 8 | scope = "source.md" 9 | injection-regex = "md|markdown" 10 | file-types = ["md", "markdown"] 11 | roots = [".zk"] 12 | language-servers = ["zk"] 13 | -------------------------------------------------------------------------------- /.zk/command_picker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Get all aliases names, ouput them comma separated, split them into new lines, feed to fzf. After alias is selected - pass it to zk for execution. Capture result into clipboard. 4 | yq '.alias | keys' -oc .zk/config.toml | tr ',' "\n" | fzf --print0 | xargs -0 -o zk | pbcopy 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Repo to demonstrate Helix + ZK customized interop 2 | 3 | [Reddit post](https://www.reddit.com/r/HelixEditor/comments/144x6r3/escape_hatch_xd/) 4 | 5 | ## Required tools: 6 | 7 | - helix - text editor 8 | - zk - notes manager 9 | - yq - YAML parser 10 | - fzf - fuzzy finder 11 | 12 | 13 | ## Next steps: 14 | 15 | - [ ] Prompt for notes that require title (e.g. if idea category is selected) 16 | - [ ] Make a PR to ZK to have a command that will return all aliases / filters. -------------------------------------------------------------------------------- /.zk/config.toml: -------------------------------------------------------------------------------- 1 | [note] 2 | template = "default.md" 3 | 4 | [group.ideas.note] 5 | template = "idea.md" 6 | filename = "{{format-date now '%m-%d-%Y'}}-{{slug title}}" 7 | 8 | [group.journal.note] 9 | template = "daily.md" 10 | filename = "{{format-date now '%m-%d-%Y'}}" 11 | 12 | [extra] 13 | 14 | [tool] 15 | shell = "/opt/homebrew/bin/fish" 16 | 17 | [format.markdown] 18 | link-format = "wiki" 19 | hashtags = false 20 | colon-tags = false 21 | multiword-tags = false 22 | 23 | [alias] 24 | daily = "zk new journal --print-path --no-input" 25 | idea = "zk new ideas --print-path --no-input" 26 | 27 | 28 | 29 | 30 | 31 | 32 | --------------------------------------------------------------------------------