All notable changes to this project will be documented in this file. Pull requests can be viewed online at https://github.com/zk-org/zk/pulls
Format: <description> (by <contributor>, <pr number>)
- Parse links to notes in frontmatter (by @tjex, 710)
- Set a note's modification time in frontmatter and allow for custom key naming for both creation and modification keys (by @BennoLossin and @tjex, 531)
- Indexing made significantly more performant (by @Keluaa, 735)
- Support filtering by date and time with
"<date> <time>"instead of<date>T<time>only (by @tjex, 743) - Exclude globs now prune matching directories from indexing, improving speed of indexing (by @ehsash, 741)
- List, edit and filter for broken links with
--broken-links(by @WhyNotHugo, 708) - Update strftime package, supporting
%gand%Gformats in the{{format-date}}helper (by @tjex, 723) - Option to append links to selected text, instead of replacing (by @tjex, 724)
- Paths with
~and env variables no longer error when passed to--notebook-dirand--working-dir(by @tjex, 732) - Guard LSP against unnecessary erroring on missing textDocument/definition capabilities (by @SAY-5, 718)
- "jump to definition" follows wrong link (by @WhyNotHugo, 703)
zk config --list <object>(by @andrebauer, 484)
- Ignore commented links for LSP diagnostics. Use an AST to parse files, fixing other similar edge cases. (by @WhyNotHugo, 638)
- Links in markdown footnotes now included in :ZkLinks (by @WhyNotHugo, 639)
- Indexing notebook now 35% and 74% faster for full and incremental indexing respectively (by @WhyNotHugo, 642)
- Stop crashing lsp server when server received
textDocument/completionrequest with out of range parameters. (by @virusbb001, 667) - lsp: Provide completion after [[ on lines with multi-byte characters (by @virusbb001, 671)
- Prevent crash in LookForward when the parameters is out of characters number. (by @virusbb001, 673)
- Find notes with missing backlinks using
zk list --missing-backlink(by @WhyNotHugo, 578) - LSP diagnostic for missing backlinks when other notes link to current note without reciprocal links (by @WhyNotHugo, 577)
- Code action to add missing backlinks (by @WhyNotHugo, 581)
- LSP diagnostic for self-referential links (by @WhyNotHugo, 622)
- Release tarballs now output the program version (by @WhyNotHugo, 556)
- Config path can be set with
$ZK_CONFIG_DIR(by @Alb-O, 575)
- Better mac tar compress command compatibility (by @williambowman, 8931553)
- Set group path rule for any directory with the same name (by @mcDevnagh,
09d0621)
- See docs:
./docs/config/config-group.md
- See docs:
- LSP crashes when adjusting code fences (by @dandeandean, f4d3dc7)
- Editor not opening via zk commands on Windows (by @apraga and @mcDevnagh, 64ad7f4)
- Ctrl-E no longer created notes from fzf picker (by @gyorb, e939463)
- zk.list.tags LSP error message correction (by @mcDevnagh, f581447)
- Path in .zk/config.toml for the default note template now accepts UNIX "~/paths" (by @WhyNotHugo, a50d533)
- Find notes without tags with
zk list --tagless(by @njnygaard, 0787930)
- LSP ignores magnet links as links to notes (by @billymosis, 53df879)
- Compilation robustness for Alpine package builds (by @nmeum, 00a4361)
- Note titles with double quoted words no longer break json output (by @flytaly, 4a51e39)
- Grammar in error output (by @fspeirs-ti, 3ffa0c2)
- Group rules could not be nested (by @dodgog, 2f8be08)
- Fixed parsing large notes @khimaros in zk-org#339
- fix day range parsing (zk-org#382) by @tjex in zk-org#384
- accept tripple dash file URIs as valid links by @tjex in zk-org#391
- fix(lsp): fix trigger completion of zk LSP by @Rahlir in zk-org#397
- fix(lsp): ignore diagnostic check within code blocks by @Rahlir in zk-org#399
- allow notebook as hidden dir by @tjex in zk-org#402
- New
tool.shellconfiguration key to set a custom shell (contributed by @lsvmello). - New
notebook.dirconfiguration key to set the default notebook (contributed by @lsvmello).
- The
note.ignoreconfiguration property was renamed tonote.exclude, to be more consistent with the CLI flags.
- Fixed LSP positions using UTF-16 offsets (contributed by @wrvsrx).
- LSP:
zk.newnow returns the created note's content in its output (content), and has two new options:dryRunwill preventzk.newfrom creating the note on the file system.insertContentAtLocationcan be used to insert the created note's content into an arbitrary location.
- A new
zk.linkcommand to insert a link to a given note (contributed by @psanker).
-
LSP: Support for external URLs with
documentLink. -
New
{{date}}template helper to obtain a date object from natural language (contributed by @zalegrala).Get a relative date using natural language: {{date "next week"}} Format a date returned by `get-date`: {{format-date (date "monday") "timestamp"}} -
zk listnow support multiple--match/-mflags, which allows to search for several tokens appearing in any order in the notes (contributed by @rktjmp).
- Breaking change: The
{{date}}template helper was renamed to{{format-date}}. You might need to update your configuration and templates.
- #243 LSP: Fixed finding backlink references for notes in a folder.
- #254 Fixed SQL error when pairing
--link-toand--linked-by.
zk newnow requires the--interactive/-iflag to read the note body from a pipe or standard input. See rational.
- Use regular expressions when searching for notes with
--match.# Find notes containing emails. $ zk list --match-strategy re --match ".+@.+" $ zk list -Mr -m ".+@.+"
- The flags
--exact-match/-eare deprecated in favor of--match-strategy exact/-Me.
- The LSP server does not support resolving a wiki link to a note title anymore.
- For example,
[[Planet]]can match a note with filenamei4w0 Planet.mdbut noti4w0.mdwith a Markdown titlePlanetanymore. - This "smart" fallback resolution based on note titles was too fragile and
not supported by the
zkCLI.
- For example,
- #233 Hide index progress in non-interactive shells.
- #235 Fix LSP link recognition with unicode (contributed by @zkbpkp).
- #236 Fix updating links after creating a new note.
- #239 Support standard input
via shell redirection with
zk new.
- Removed the dependency on
libicu.
- Indexed links are now automatically updated when adding a new note, if it is a better match than the previous link target.
-
New
--dateflag forzk newto set the current date manually. -
New
--idflag forzk newto skip ID generation and use a provided value (contributed by @skbolton). -
#144 LSP auto-completion of YAML frontmatter tags.
-
zk-nvim#26 The LSP server doesn't use
additionalTextEditsanymore to remove the trigger characters when completing links.- You can customize the default behavior with the
use-additional-text-editsconfiguration key.
- You can customize the default behavior with the
-
#163 Use the
ZK_SHELLenvironment variable to override the shell forzkonly. -
#173 Support for double star globbing in
note.ignoreconfig option. -
#137 Customize the
fzfoptions used byzk's interactive modes with thefzf-optionsconfig option (contributed by @Nelyah). -
#168 Customize the
fzfkey binding to create new notes with thefzf-bind-newconfig option.
- The default
fzfkey binding to create a new note withzk edit --interactivewas changed toCtrl-E, to avoid conflict with the defaultCtrl-Nbinding.
- #126 Embedded image links shown as not found.
- #152 Incorrect timezone for natural dates.
- #170 Broken wiki links in subdirectories.
- #185 Don't parse a Markdown table header as a colon tag.
- New LSP commands:
zk.listto search for notes.zk.tag.listto retrieve the list of tags.
--debugmode which prints a stacktrace onSIGINT.
- #111 Filenames take precedence over folders when matching a sub-path with wiki links.
- #118 Fix infinite loop when parsing a single-character hashtag.
- #121 Take into account the
--no-inputflag withzk init. - #120 Support RFC 3339 dates
with the time flags (e.g.
--created-before).
- New
zk graph --format jsoncommand which produces a JSON graph of the notes matching the given criteria. - New template variables
filenameandfilename-stemwhen formatting notes (e.g. withzk list --format) and for thefzf-lineconfig key. - Customize how LSP completion items appear in your editor when auto-completing
links with the
[lsp.completion]configuration section.[lsp.completion] # Show the note title in the completion pop-up, or fallback on its path if empty. note-label = "{{title-or-path}}" # Filter out the completion pop-up using the note title or its path. note-filter-text = "{{title}} {{path}}" # Show the note filename without extension as detail. note-detail = "{{filename-stem}}"
- New
--dry-runflag forzk newwhich prints out the path and content of the generated note instead of saving it to the file system. - New
--verboseflag forzk indexwhich prints detailed information about the indexing process. - You can now filter through the YAML frontmatter
with
zk list --interactive.
- #89 Calling
zk indexfrom outside the notebook (contributed by @adamreese). - #98 Index wiki links using partial
paths for
--linked-byand--link-to. - #98 Ignore spaces around the pipe in wiki links for LSP diagnostics.
- List the tags found in your notebook with
zk tag list.- Many options are available to customize the output, including JSON
serialization. See
zk tag list --help.
- Many options are available to customize the output, including JSON
serialization. See
- Support for LSP references to browse the backlinks of the current note, if the caret is not over a link.
- New template variables are available when
generating custom Markdown links with
link-format.filename,path,abs-pathandrel-pathfor many path flavors.metadatato use information (e.g.id) from the YAML frontmatter.
- The LSP server is now matching wiki links to any part of a note's path or its
title.
- Given the note
book/z5mj Information Graphics.mdwith the title "Book Review of Information Graphics", the following wiki links would work from a note located underjournal/2020-09-25.md:[[../book/z5mj]] [[book/z5mj]] [[z5mj]] [[book review information]] [[Information Graphics]]
- Given the note
- Use the
{{abs-path}}template variable when formatting notes to print the absolute path to the note (contributed by @pstuifzand). - A new
{{substring s index length}}template helper extracts a portion of a given string, e.g.:{{substring 'A full quote' 2 4}}outputsfull{{substring 'A full quote' -5 5}outputsquote
- UTF-8 handling in the LSP server.
- #78 Do not exclude notes containing broken links from the index.
- Allow setting the
--working-dirand--notebook-dirflags before thezksubcommand when using aliases, e.g.zk -W ~/notes my-alias. - #86 Index encoded Markdown links.
- Use JSON formats with
zk listfor easy post-processing:--format jsonprints a plain JSON array.--format jsonlprints one JSON note object per line, according to JSON Lines.
- The new
{{json}}template helper serializes any template context variable into a valid JSON value, e.g.:{{json title}}prints with quotes"An interesting note"{{json .}}serializes the full template context as a JSON object.
- Use
--headerand--footeroptions withzk listto print arbitrary text at the start or end of the list. - Support for LSP references to browse the backlinks of the link under the caret (contributed by @pstuifzand).
- New
note.ignoreconfiguration option to ignore files matching the given path globs when indexing notes.[note] ignore = [ "log-*.md" "drafts/*" ]
- #16 Links with section anchors, e.g.
[[filename#section]]. - Unicode support in wiki links. If you use accents or ideograms, please run
zk index --forceafter upgrading to fix your index.
- Editor integration through LSP:
- New code actions to create a note using the current selection as title.
- Custom commands to
run
newandindexfrom your editor. - Diagnostics to report dead links or wiki link titles.
- Auto-complete only the path of a Markdown link by typing
[custom title]((.
- Customize the format of
fzf's lines with your own template.[tool] fzf-line = "{{style 'green' path}}{{#each tags}} #{{this}}{{/each}} {{style 'black' body}}"
- Automatically index the notebook when saving a note with an LSP-enabled
editor.
- This ensures that tags and notes auto-completion lists are up-to-date.
- Creating a new note from
fzfin a directory containing spaces. - Fix completion with Neovim's built-in LSP client (contributed by @cormacrelf).
- Interactive wizard for the
zk initcommand. - An experimental Language Server for LSP-compatible editors:
- Auto-complete Markdown links with
[[(setup wiki links in the note formats configuration) - Auto-complete hashtags and colon-separated tags.
- Preview the content of a note when hovering a link.
- Navigate in your notes by following internal links.
- And more to come...
- See the documentation for configuration samples.
- Auto-complete Markdown links with
- Pair
--matchwith--exact-match/-eto search for (case insensitive) exact occurrences in your notes.- This can be useful when looking for terms including special characters, such
as
[[name]].
- This can be useful when looking for terms including special characters, such
as
- Generating links to notes.
- Use the
{{link}}template variable when formatting notes to print a link to the note, relative to the working directory. - Use the
{{format-link path title}}template helper to render a custom link. - Customize the link format from the note formats settings. You can for example choose regular Markdown links, wiki links or a custom format.
- Use the
- The local configuration file (
.zk/config.toml) is not required anymore in a notebook's.zkdirectory. --notebook-dirdoes not change the working directory anymore, instead it sets manually the current notebook and disable auto-discovery. Use the new--working-dir/-Wflag to runzkas if it was started from this path instead of the current working directory.- For convenience,
ZK_NOTEBOOK_DIRbehaves like setting a--working-dirfallback, instead of--notebook-dir. This way, paths will be relative to the root of the notebook. - A practical use case is to use
zk list -W .when outside a notebook. This will list the notes inZK_NOTEBOOK_DIRbut print paths relative to the current directory, making them actionable from your terminal emulator.
- For convenience,
- Global
zkconfiguration at~/.config/zk/config.toml.- Useful to share aliases or default settings across several notebooks.
- This is the same format as a notebook configuration file.
- Shared templates can be stored in
~/.config/zk/templates/. XDG_CONFIG_HOMEis taken into account.
- Use
--notebook-diror setZK_NOTEBOOK_DIRto runzkas if it was started from this path instead of the current working directory.- This allows running
zkwithout being in a notebook. - By setting
ZK_NOTEBOOK_DIRin your shell configuration file (e.g.~/.profile), you are declaring a default global notebook which will be used whenzkis not in a notebook. - When the notebook directory is set explicitly, any path given as argument will be relative to it instead of the actual working directory.
- This allows running
- Find every note whose title is mentioned in the note you are working on with
--mentioned-by file.md.- To refer to a note using several names, you can use the
YAML frontmatter key
aliases. For example the note titled "Artificial Intelligence" might have:aliases: [AI, robot] - To find only unlinked mentions, pair it with
--no-linked-by, e.g.--mentioned-by file.md --no-linked-by file.md.
- To refer to a note using several names, you can use the
YAML frontmatter key
- Declare named filters in the configuration file to
reuse note filtering options used frequently
together, for example:
[filter] recents = "--sort created- --created-after 'last two weeks'"
$ zk list recents --limit 10 $ zk edit recents --interactive
- #4 Terminal borked when piping content with Vim
- Looking for mentions of a note with a title containing double quotes.
- Crash when parsing certain link snippets.
- Support for tags.
- Filter notes by their tags using
--tag "history, europe".- To match notes associated with either tags, use a pipe
|orOR(all caps), e.g.--tag "inbox OR todo". - If you want to exclude notes having a particular tag, prefix it with
-orNOT(all caps), e.g.--tag "NOT done". - Use glob patterns to match multiple tags, e.g.
--tag "book-*".
- To match notes associated with either tags, use a pipe
- Many tag flavors are supported:
#hashtags,:colon:separated:tags:(opt-in) and even Bear's#multi-word tags#(opt-in). If you prefer to use a YAML frontmatter, list your tags with the keytagsorkeywords.
- Filter notes by their tags using
- Find every mention of a note in your notebook with
--mention file.md.- This will look for occurrences of the note's title in other notes.
- To refer to a note using several names, you can use the
YAML frontmatter key
aliases. For example the note titled "Artificial Intelligence" might have:aliases: [AI, robot] - To find only unlinked mentions, pair it with
--no-link-to, e.g.--mention file.md --no-link-to file.md.
- Print metadata from the YAML frontmatter in
listoutput using{{metadata.<key>}}, e.g.{{metadata.description}}. Keys are normalized to lower case. - Use the YAML frontmatter key
datefor the note creation date, when provided. - Access environment variables from note templates with the
env.<key>template variable, e.g.{{env.PATH}}.
- Renamed
--linking-tofiltering option to--link-to. - Multiple
--extravariables are now separated by,instead of;.