Remove references to old repo (#373)

Finalise transfer from old repo (github.com/mickael-menu/zk) to new (github.com/zk-org/zk)

Co-authored-by: tjex <tjex@tjex.net>
pull/363/head
Michael McDonagh 4 months ago committed by GitHub
parent 5a2333d0af
commit 0eaf26483f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,5 +6,5 @@ body:
attributes: attributes:
label: If you have an idea, open a discussion label: If you have an idea, open a discussion
options: options:
- label: I will [create a new discussion](https://github.com/mickael-menu/zk/discussions/new?category=ideas) instead of an issue. - label: I will [create a new discussion](https://github.com/zk-org/zk/discussions/new?category=ideas) instead of an issue.

@ -10,4 +10,4 @@ body:
attributes: attributes:
label: If you need help, open a discussion label: If you need help, open a discussion
options: options:
- label: I will [create a new discussion](https://github.com/mickael-menu/zk/discussions/new?category=help) instead of an issue. - label: I will [create a new discussion](https://github.com/zk-org/zk/discussions/new?category=help) instead of an issue.

@ -6,14 +6,14 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#331](https://github.com/mickael-menu/zk/issues/331) Fixed parsing large notes (contributed by [@khimaros](https://github.com/mickael-menu/zk/pull/339)). * [#331](https://github.com/zk-org/zk/issues/331) Fixed parsing large notes (contributed by [@khimaros](https://github.com/zk-org/zk/pull/339)).
## 0.14.0 ## 0.14.0
### Added ### Added
* New [`tool.shell`](docs/tool-shell.md) configuration key to set a custom shell (contributed by [@lsvmello](https://github.com/mickael-menu/zk/pull/302)). * New [`tool.shell`](docs/tool-shell.md) configuration key to set a custom shell (contributed by [@lsvmello](https://github.com/zk-org/zk/pull/302)).
* New [`notebook.dir`](docs/config-notebook.md) configuration key to set the default notebook (contributed by [@lsvmello](https://github.com/mickael-menu/zk/pull/304)). * New [`notebook.dir`](docs/config-notebook.md) configuration key to set the default notebook (contributed by [@lsvmello](https://github.com/zk-org/zk/pull/304)).
### Changed ### Changed
@ -21,7 +21,7 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* Fixed LSP positions using UTF-16 offsets (contributed by [@wrvsrx](https://github.com/mickael-menu/zk/pull/317)). * Fixed LSP positions using UTF-16 offsets (contributed by [@wrvsrx](https://github.com/zk-org/zk/pull/317)).
## 0.13.0 ## 0.13.0
@ -31,14 +31,14 @@ All notable changes to this project will be documented in this file.
* `zk.new` now returns the created note's content in its output (`content`), and has two new options: * `zk.new` now returns the created note's content in its output (`content`), and has two new options:
* `dryRun` will prevent `zk.new` from creating the note on the file system. * `dryRun` will prevent `zk.new` from creating the note on the file system.
* `insertContentAtLocation` can be used to insert the created note's content into an arbitrary location. * `insertContentAtLocation` can be used to insert the created note's content into an arbitrary location.
* A new `zk.link` command to insert a link to a given note (contributed by [@psanker](https://github.com/mickael-menu/zk/pull/284)). * A new `zk.link` command to insert a link to a given note (contributed by [@psanker](https://github.com/zk-org/zk/pull/284)).
## 0.12.0 ## 0.12.0
### Added ### Added
* LSP: Support for external URLs with `documentLink`. * LSP: Support for external URLs with `documentLink`.
* New `{{date}}` template helper to obtain a date object from natural language (contributed by [@zalegrala](https://github.com/mickael-menu/zk/pull/262)). * New `{{date}}` template helper to obtain a date object from natural language (contributed by [@zalegrala](https://github.com/zk-org/zk/pull/262)).
``` ```
Get a relative date using natural language: Get a relative date using natural language:
{{date "next week"}} {{date "next week"}}
@ -46,7 +46,7 @@ All notable changes to this project will be documented in this file.
Format a date returned by `get-date`: Format a date returned by `get-date`:
{{format-date (date "monday") "timestamp"}} {{format-date (date "monday") "timestamp"}}
``` ```
* `zk list` now support multiple `--match`/`-m` flags, which allows to search for several tokens appearing in any order in the notes (contributed by [@rktjmp](https://github.com/mickael-menu/zk/pull/268)). * `zk list` now support multiple `--match`/`-m` flags, which allows to search for several tokens appearing in any order in the notes (contributed by [@rktjmp](https://github.com/zk-org/zk/pull/268)).
### Changed ### Changed
@ -54,19 +54,19 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#243](https://github.com/mickael-menu/zk/issues/243) LSP: Fixed finding backlink references for notes in a folder. * [#243](https://github.com/zk-org/zk/issues/243) LSP: Fixed finding backlink references for notes in a folder.
* [#254](https://github.com/mickael-menu/zk/issues/254) Fixed SQL error when pairing `--link-to` and `--linked-by`. * [#254](https://github.com/zk-org/zk/issues/254) Fixed SQL error when pairing `--link-to` and `--linked-by`.
## 0.11.1 ## 0.11.1
### Changed ### Changed
* `zk new` now requires the `--interactive`/`-i` flag to read the note body from a pipe or standard input. [See rational](https://github.com/mickael-menu/zk/pull/242#issuecomment-1182602001). * `zk new` now requires the `--interactive`/`-i` flag to read the note body from a pipe or standard input. [See rational](https://github.com/zk-org/zk/pull/242#issuecomment-1182602001).
### Fixed ### Fixed
* [#244](https://github.com/mickael-menu/zk/issues/244) Fixed `zk new` waiting for `Ctrl-D` to proceed (contributed by [@pkazmier](https://github.com/mickael-menu/zk/pull/242)). * [#244](https://github.com/zk-org/zk/issues/244) Fixed `zk new` waiting for `Ctrl-D` to proceed (contributed by [@pkazmier](https://github.com/zk-org/zk/pull/242)).
## 0.11.0 ## 0.11.0
@ -92,10 +92,10 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#233](https://github.com/mickael-menu/zk/issues/233) Hide index progress in non-interactive shells. * [#233](https://github.com/zk-org/zk/issues/233) Hide index progress in non-interactive shells.
* [#235](https://github.com/mickael-menu/zk/issues/235) Fix LSP link recognition with unicode (contributed by [@zkbpkp](https://github.com/mickael-menu/zk/issues/235)). * [#235](https://github.com/zk-org/zk/issues/235) Fix LSP link recognition with unicode (contributed by [@zkbpkp](https://github.com/zk-org/zk/issues/235)).
* [#236](https://github.com/mickael-menu/zk/issues/236) Fix updating links after creating a new note. * [#236](https://github.com/zk-org/zk/issues/236) Fix updating links after creating a new note.
* [#239](https://github.com/mickael-menu/zk/discussions/239) Support standard input via shell redirection with `zk new`. * [#239](https://github.com/zk-org/zk/discussions/239) Support standard input via shell redirection with `zk new`.
## 0.10.1 ## 0.10.1
@ -114,15 +114,15 @@ All notable changes to this project will be documented in this file.
### Added ### Added
* New `--date` flag for `zk new` to set the current date manually. * New `--date` flag for `zk new` to set the current date manually.
* New `--id` flag for `zk new` to skip ID generation and use a provided value (contributed by [@skbolton](https://github.com/mickael-menu/zk/pull/183)). * New `--id` flag for `zk new` to skip ID generation and use a provided value (contributed by [@skbolton](https://github.com/zk-org/zk/pull/183)).
* [#144](https://github.com/mickael-menu/zk/issues/144) LSP auto-completion of YAML frontmatter tags. * [#144](https://github.com/zk-org/zk/issues/144) LSP auto-completion of YAML frontmatter tags.
* [zk-nvim#26](https://github.com/mickael-menu/zk-nvim/issues/26) The LSP server doesn't use `additionalTextEdits` anymore to remove the trigger characters when completing links. * [zk-nvim#26](https://github.com/zk-org/zk-nvim/issues/26) The LSP server doesn't use `additionalTextEdits` anymore to remove the trigger characters when completing links.
* You can customize the default behavior with the [`use-additional-text-edits` configuration key](docs/config-lsp.md). * You can customize the default behavior with the [`use-additional-text-edits` configuration key](docs/config-lsp.md).
* [#163](https://github.com/mickael-menu/zk/issues/163) Use the `ZK_SHELL` environment variable to override the shell for `zk` only. * [#163](https://github.com/zk-org/zk/issues/163) Use the `ZK_SHELL` environment variable to override the shell for `zk` only.
* [#173](https://github.com/mickael-menu/zk/issues/173) Support for double star globbing in `note.ignore` config option. * [#173](https://github.com/zk-org/zk/issues/173) Support for double star globbing in `note.ignore` config option.
* [#137](https://github.com/mickael-menu/zk/issues/137) Customize the `fzf` options used by `zk`'s interactive modes with the [`fzf-options`](docs/tool-fzf.md) config option (contributed by [@Nelyah](https://github.com/mickael-menu/zk/pull/154)). * [#137](https://github.com/zk-org/zk/issues/137) Customize the `fzf` options used by `zk`'s interactive modes with the [`fzf-options`](docs/tool-fzf.md) config option (contributed by [@Nelyah](https://github.com/zk-org/zk/pull/154)).
* [#168](https://github.com/mickael-menu/zk/discussions/168) Customize the `fzf` key binding to create new notes with the [`fzf-bind-new`](docs/tool-fzf.md) config option. * [#168](https://github.com/zk-org/zk/discussions/168) Customize the `fzf` key binding to create new notes with the [`fzf-bind-new`](docs/tool-fzf.md) config option.
### Changed ### Changed
@ -130,10 +130,10 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#126](https://github.com/mickael-menu/zk/issues/126) Embedded image links shown as not found. * [#126](https://github.com/zk-org/zk/issues/126) Embedded image links shown as not found.
* [#152](https://github.com/mickael-menu/zk/issues/152) Incorrect timezone for natural dates. * [#152](https://github.com/zk-org/zk/issues/152) Incorrect timezone for natural dates.
* [#170](https://github.com/mickael-menu/zk/issues/170) Broken wiki links in subdirectories. * [#170](https://github.com/zk-org/zk/issues/170) Broken wiki links in subdirectories.
* [#185](https://github.com/mickael-menu/zk/issues/185) Don't parse a Markdown table header as a colon tag. * [#185](https://github.com/zk-org/zk/issues/185) Don't parse a Markdown table header as a colon tag.
## 0.9.0 ## 0.9.0
@ -147,10 +147,10 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#111](https://github.com/mickael-menu/zk/issues/111) Filenames take precedence over folders when matching a sub-path with wiki links. * [#111](https://github.com/zk-org/zk/issues/111) Filenames take precedence over folders when matching a sub-path with wiki links.
* [#118](https://github.com/mickael-menu/zk/issues/118) Fix infinite loop when parsing a single-character hashtag. * [#118](https://github.com/zk-org/zk/issues/118) Fix infinite loop when parsing a single-character hashtag.
* [#121](https://github.com/mickael-menu/zk/issues/121) Take into account the `--no-input` flag with `zk init`. * [#121](https://github.com/zk-org/zk/issues/121) Take into account the `--no-input` flag with `zk init`.
* [#120](https://github.com/mickael-menu/zk/discussions/120) Support RFC 3339 dates with the time flags (e.g. `--created-before`). * [#120](https://github.com/zk-org/zk/discussions/120) Support RFC 3339 dates with the time flags (e.g. `--created-before`).
## 0.8.0 ## 0.8.0
@ -175,9 +175,9 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#89](https://github.com/mickael-menu/zk/issues/89) Calling `zk index` from outside the notebook (contributed by [@adamreese](https://github.com/mickael-menu/zk/pull/90)). * [#89](https://github.com/zk-org/zk/issues/89) Calling `zk index` from outside the notebook (contributed by [@adamreese](https://github.com/zk-org/zk/pull/90)).
* [#98](https://github.com/mickael-menu/zk/issues/98) Index wiki links using partial paths for `--linked-by` and `--link-to`. * [#98](https://github.com/zk-org/zk/issues/98) Index wiki links using partial paths for `--linked-by` and `--link-to`.
* [#98](https://github.com/mickael-menu/zk/issues/98) Ignore spaces around the pipe in wiki links for LSP diagnostics. * [#98](https://github.com/zk-org/zk/issues/98) Ignore spaces around the pipe in wiki links for LSP diagnostics.
## 0.7.0 ## 0.7.0
@ -199,7 +199,7 @@ All notable changes to this project will be documented in this file.
[[book review information]] [[book review information]]
[[Information Graphics]] [[Information Graphics]]
``` ```
* Use the `{{abs-path}}` template variable when [formatting notes](docs/template-format.md) to print the absolute path to the note (contributed by [@pstuifzand](https://github.com/mickael-menu/zk/pull/60)). * Use the `{{abs-path}}` template variable when [formatting notes](docs/template-format.md) to print the absolute path to the note (contributed by [@pstuifzand](https://github.com/zk-org/zk/pull/60)).
* A new `{{substring s index length}}` template helper extracts a portion of a given string, e.g.: * A new `{{substring s index length}}` template helper extracts a portion of a given string, e.g.:
* `{{substring 'A full quote' 2 4}}` outputs `full` * `{{substring 'A full quote' 2 4}}` outputs `full`
* `{{substring 'A full quote' -5 5}` outputs `quote` * `{{substring 'A full quote' -5 5}` outputs `quote`
@ -207,9 +207,9 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* UTF-8 handling in the LSP server. * UTF-8 handling in the LSP server.
* [#78](https://github.com/mickael-menu/zk/issues/78) Do not exclude notes containing broken links from the index. * [#78](https://github.com/zk-org/zk/issues/78) Do not exclude notes containing broken links from the index.
* Allow setting the `--working-dir` and `--notebook-dir` flags before the `zk` subcommand when using aliases, e.g. `zk -W ~/notes my-alias`. * Allow setting the `--working-dir` and `--notebook-dir` flags before the `zk` subcommand when using aliases, e.g. `zk -W ~/notes my-alias`.
* [#86](https://github.com/mickael-menu/zk/issues/86) Index encoded Markdown links. * [#86](https://github.com/zk-org/zk/issues/86) Index encoded Markdown links.
## 0.6.0 ## 0.6.0
@ -223,7 +223,7 @@ All notable changes to this project will be documented in this file.
* `{{json title}}` prints with quotes `"An interesting note"` * `{{json title}}` prints with quotes `"An interesting note"`
* `{{json .}}` serializes the full template context as a JSON object. * `{{json .}}` serializes the full template context as a JSON object.
* Use `--header` and `--footer` options with `zk list` to print arbitrary text at the start or end of the list. * Use `--header` and `--footer` options with `zk list` to 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](https://github.com/mickael-menu/zk/pull/58)). * Support for LSP references to browse the backlinks of the link under the caret (contributed by [@pstuifzand](https://github.com/zk-org/zk/pull/58)).
* New [`note.ignore`](docs/config-note.md) configuration option to ignore files matching the given path globs when indexing notes. * New [`note.ignore`](docs/config-note.md) configuration option to ignore files matching the given path globs when indexing notes.
```yaml ```yaml
[note] [note]
@ -235,7 +235,7 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#16](https://github.com/mickael-menu/zk/issues/16) Links with section anchors, e.g. `[[filename#section]]`. * [#16](https://github.com/zk-org/zk/issues/16) Links with section anchors, e.g. `[[filename#section]]`.
* Unicode support in wiki links. If you use accents or ideograms, please run `zk index --force` after upgrading to fix your index. * Unicode support in wiki links. If you use accents or ideograms, please run `zk index --force` after upgrading to fix your index.
@ -243,7 +243,7 @@ All notable changes to this project will be documented in this file.
### Added ### Added
* [Editor integration through LSP](https://github.com/mickael-menu/zk/issues/22): * [Editor integration through LSP](https://github.com/zk-org/zk/issues/22):
* New code actions to create a note using the current selection as title. * New code actions to create a note using the current selection as title.
* Custom commands to [run `new` and `index` from your editor](docs/editors-integration.md#custom-commands). * Custom commands to [run `new` and `index` from your editor](docs/editors-integration.md#custom-commands).
* Diagnostics to [report dead links or wiki link titles](docs/config-lsp.md). * Diagnostics to [report dead links or wiki link titles](docs/config-lsp.md).
@ -262,7 +262,7 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* Creating a new note from `fzf` in a directory containing spaces. * Creating a new note from `fzf` in a directory containing spaces.
* Fix completion with Neovim's built-in LSP client (contributed by [@cormacrelf](https://github.com/mickael-menu/zk/pull/39)). * Fix completion with Neovim's built-in LSP client (contributed by [@cormacrelf](https://github.com/zk-org/zk/pull/39)).
## 0.4.0 ## 0.4.0
@ -275,7 +275,7 @@ All notable changes to this project will be documented in this file.
* Auto-complete [hashtags and colon-separated tags](docs/tags.md). * Auto-complete [hashtags and colon-separated tags](docs/tags.md).
* Preview the content of a note when hovering a link. * Preview the content of a note when hovering a link.
* Navigate in your notes by following internal links. * Navigate in your notes by following internal links.
* [And more to come...](https://github.com/mickael-menu/zk/issues/22) * [And more to come...](https://github.com/zk-org/zk/issues/22)
* See [the documentation](docs/editors-integration.md) for configuration samples. * See [the documentation](docs/editors-integration.md) for configuration samples.
* Pair `--match` with `--exact-match` / `-e` to search for (case insensitive) exact occurrences in your notes. * Pair `--match` with `--exact-match` / `-e` to 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 `[[name]]`.
@ -320,7 +320,7 @@ All notable changes to this project will be documented in this file.
### Fixed ### Fixed
* [#4](https://github.com/mickael-menu/zk/issues/4) Terminal borked when piping content with Vim * [#4](https://github.com/zk-org/zk/issues/4) Terminal borked when piping content with Vim
## 0.2.1 ## 0.2.1

@ -43,8 +43,8 @@
* [Advanced search and filtering capabilities](docs/note-filtering.md) including [tags](docs/tags.md), links and mentions * [Advanced search and filtering capabilities](docs/note-filtering.md) including [tags](docs/tags.md), links and mentions
* [Integration with your favorite editors](docs/editors-integration.md): * [Integration with your favorite editors](docs/editors-integration.md):
* [Any LSP-compatible editor](docs/editors-integration.md) * [Any LSP-compatible editor](docs/editors-integration.md)
* [`zk-nvim`](https://github.com/mickael-menu/zk-nvim) for Neovim 0.5+ * [`zk-nvim`](https://github.com/zk-org/zk.nvim) for Neovim 0.5+
* [`zk-vscode`](https://github.com/mickael-menu/zk-vscode) for Visual Studio Code * [`zk-vscode`](https://github.com/zk-org/zk-vscode) for Visual Studio Code
* (*unmaintained*) [`zk.nvim`](https://github.com/megalithic/zk.nvim) for Neovim 0.5+ by [Seth Messer](https://github.com/megalithic) * (*unmaintained*) [`zk.nvim`](https://github.com/megalithic/zk.nvim) for Neovim 0.5+ by [Seth Messer](https://github.com/megalithic)
* [Interactive browser](docs/tool-fzf.md), powered by `fzf` * [Interactive browser](docs/tool-fzf.md), powered by `fzf`
* [Git-style command aliases](docs/config-alias.md) and [named filters](docs/config-filter.md) * [Git-style command aliases](docs/config-alias.md) and [named filters](docs/config-filter.md)
@ -65,7 +65,7 @@
## Install ## Install
[Check out the latest release](https://github.com/mickael-menu/zk/releases) for pre-built binaries for macOS and Linux (`zk` was not tested on Windows). [Check out the latest release](https://github.com/zk-org/zk/releases) for pre-built binaries for macOS and Linux (`zk` was not tested on Windows).
### Homebrew ### Homebrew
@ -101,7 +101,7 @@ sudo pacman -S zk
Make sure you have a working [Go 1.18+ installation](https://golang.org/), then clone the repository: Make sure you have a working [Go 1.18+ installation](https://golang.org/), then clone the repository:
```sh ```sh
$ git clone https://github.com/mickael-menu/zk.git $ git clone https://github.com/zk-org/zk.git
$ cd zk $ cd zk
``` ```

@ -17,7 +17,7 @@
<body> <body>
<div class="wrapper"> <div class="wrapper">
<header {% unless site.description or site.github.project_tagline %} class="without-description" {% endunless %}> <header {% unless site.description or site.github.project_tagline %} class="without-description" {% endunless %}>
<h1><a href="https://mickael-menu.github.io/zk/">{{ site.title | default: site.github.repository_name }}</a></h1> <h1><a href="https://zk-org.github.io/zk/">{{ site.title | default: site.github.repository_name }}</a></h1>
{% if site.description or site.github.project_tagline %} {% if site.description or site.github.project_tagline %}
<p>{{ site.description | default: site.github.project_tagline }}</p> <p>{{ site.description | default: site.github.project_tagline }}</p>
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

@ -7,4 +7,4 @@
* [send notes for processing by other programs](external-processing.md) * [send notes for processing by other programs](external-processing.md)
* [create a note with initial content](note-creation.md) from a standard input pipe * [create a note with initial content](note-creation.md) from a standard input pipe
If you find out that `zk` does not behave as expected or could communicate better with other programs, [please post an issue](https://github.com/mickael-menu/zk/issues). If you find out that `zk` does not behave as expected or could communicate better with other programs, [please post an issue](https://github.com/zk-org/zk/issues).

@ -9,7 +9,7 @@ Declaring your own aliases is a great way to make your experience with `zk` easi
Command aliases are declared in your [configuration file](config.md), under the `[alias]` section. They are executed with [your default shell](tool-shell.md), which allows you to: Command aliases are declared in your [configuration file](config.md), under the `[alias]` section. They are executed with [your default shell](tool-shell.md), which allows you to:
* expand arguments with `$@` or `$*` * expand arguments with `$@` or `$*`
* [it is recommended to wrap `$@` in quotes](https://github.com/mickael-menu/zk/issues/316#issuecomment-1543564168) * [it is recommended to wrap `$@` in quotes](https://github.com/zk-org/zk/issues/316#issuecomment-1543564168)
* expand environment variables * expand environment variables
* run several commands with `&&` * run several commands with `&&`
* pipe several commands with `|` * pipe several commands with `|`

@ -2,8 +2,8 @@
There are several extensions available to integrate `zk` in your favorite editor: There are several extensions available to integrate `zk` in your favorite editor:
* [`zk-nvim`](https://github.com/mickael-menu/zk-nvim) for Neovim 0.5+ * [`zk-nvim`](https://github.com/zk-org/zk.nvim) for Neovim 0.5+
* [`zk-vscode`](https://github.com/mickael-menu/zk-vscode) for Visual Studio Code * [`zk-vscode`](https://github.com/zk-org/zk-vscode) for Visual Studio Code
## Language Server Protocol ## Language Server Protocol
@ -15,13 +15,13 @@ There are several extensions available to integrate `zk` in your favorite editor
* Navigate in your notes by following internal links. * Navigate in your notes by following internal links.
* Create a new note using the current selection as title. * Create a new note using the current selection as title.
* Diagnostics for dead links and wiki-links titles. * Diagnostics for dead links and wiki-links titles.
* [And more to come...](https://github.com/mickael-menu/zk/issues/22) * [And more to come...](https://github.com/zk-org/zk/issues/22)
You can configure some of these features in your notebook's [configuration file](config-lsp.md). You can configure some of these features in your notebook's [configuration file](config-lsp.md).
### Editor LSP configurations ### Editor LSP configurations
To start the Language Server, use the `zk lsp` command. Refer to the following sections for editor-specific examples. [Feel free to share the configuration for your editor](https://github.com/mickael-menu/zk/issues/22). To start the Language Server, use the `zk lsp` command. Refer to the following sections for editor-specific examples. [Feel free to share the configuration for your editor](https://github.com/zk-org/zk/issues/22).
#### Vim and Neovim #### Vim and Neovim

@ -4,7 +4,7 @@
Besides the standard [`fzf` configuration options](https://github.com/junegunn/fzf) documented on its website, `zk` offers additional options you can set in the `[tool]` [configuration section](config.md). Besides the standard [`fzf` configuration options](https://github.com/junegunn/fzf) documented on its website, `zk` offers additional options you can set in the `[tool]` [configuration section](config.md).
If you wish to customize more of `fzf` behavior, [please post a feature request](https://github.com/mickael-menu/zk/issues). If you wish to customize more of `fzf` behavior, [please post a feature request](https://github.com/zk-org/zk/issues).
## Preview command ## Preview command

@ -1,9 +1,7 @@
module github.com/mickael-menu/zk module github.com/zk-org/zk
go 1.21 go 1.21
replace github.com/tliron/glsp => github.com/mickael-menu/glsp v0.1.1
require ( require (
github.com/AlecAivazis/survey/v2 v2.3.4 github.com/AlecAivazis/survey/v2 v2.3.4
github.com/alecthomas/kong v0.5.0 github.com/alecthomas/kong v0.5.0
@ -17,7 +15,6 @@ require (
github.com/lestrrat-go/strftime v1.0.6 github.com/lestrrat-go/strftime v1.0.6
github.com/mattn/go-isatty v0.0.14 github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-sqlite3 v1.14.16 github.com/mattn/go-sqlite3 v1.14.16
github.com/mickael-menu/pretty v0.2.3
github.com/mvdan/xurls v1.1.0 github.com/mvdan/xurls v1.1.0
github.com/pelletier/go-toml v1.9.5 github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
@ -29,6 +26,7 @@ require (
github.com/tliron/kutil v0.1.59 github.com/tliron/kutil v0.1.59
github.com/yuin/goldmark v1.4.12 github.com/yuin/goldmark v1.4.12
github.com/yuin/goldmark-meta v1.1.0 github.com/yuin/goldmark-meta v1.1.0
github.com/zk-org/pretty v0.2.4
gopkg.in/djherbis/times.v1 v1.3.0 gopkg.in/djherbis/times.v1 v1.3.0
) )
@ -43,7 +41,7 @@ require (
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4 // indirect github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4 // indirect
github.com/rivo/uniseg v0.2.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sourcegraph/jsonrpc2 v0.1.0 // indirect github.com/sourcegraph/jsonrpc2 v0.1.0 // indirect
github.com/zchee/color/v2 v2.0.6 // indirect github.com/zchee/color/v2 v2.0.6 // indirect

@ -17,6 +17,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -128,10 +129,6 @@ github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mickael-menu/glsp v0.1.1 h1:OW7meY/k5/mdZ5F4ds8H2ugq4rXARGRFp9vb+wzpP7k=
github.com/mickael-menu/glsp v0.1.1/go.mod h1:JkdOZOy+1znsGY8oa1zwT00kBsiNgL5QbcrW5JiPrIM=
github.com/mickael-menu/pretty v0.2.3 h1:AXi5WcBuWxwQV6iY/GhmCFpaoboQO2SLtzfujrn7dv0=
github.com/mickael-menu/pretty v0.2.3/go.mod h1:gupeWUSWoo3KX7BItIuouLgTqQLlmRylpaPdIK6IqLk=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
github.com/mvdan/xurls v1.1.0 h1:OpuDelGQ1R1ueQ6sSryzi6P+1RtBpfQHM8fJwlE45ww= github.com/mvdan/xurls v1.1.0 h1:OpuDelGQ1R1ueQ6sSryzi6P+1RtBpfQHM8fJwlE45ww=
@ -141,7 +138,6 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4 h1:COozsq2xbSoZ6kt+/iHGF7eQqiUZr2uxQoAe4OzNkhE= github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4 h1:COozsq2xbSoZ6kt+/iHGF7eQqiUZr2uxQoAe4OzNkhE=
github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/petermattis/goid v0.0.0-20220526132513-07eaf5d0b9f4/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@ -152,8 +148,8 @@ github.com/relvacode/iso8601 v1.1.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
@ -184,6 +180,8 @@ github.com/tj/assert v0.0.0-20190920132354-ee03d75cd160 h1:NSWpaDaurcAJY7PkL8Xt0
github.com/tj/assert v0.0.0-20190920132354-ee03d75cd160/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.0-20190920132354-ee03d75cd160/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
github.com/tj/go-naturaldate v1.3.0 h1:OgJIPkR/Jk4bFMBLbxZ8w+QUxwjqSvzd9x+yXocY4RI= github.com/tj/go-naturaldate v1.3.0 h1:OgJIPkR/Jk4bFMBLbxZ8w+QUxwjqSvzd9x+yXocY4RI=
github.com/tj/go-naturaldate v1.3.0/go.mod h1:rpUbjivDKiS1BlfMGc2qUKNZ/yxgthOfmytQs8d8hKk= github.com/tj/go-naturaldate v1.3.0/go.mod h1:rpUbjivDKiS1BlfMGc2qUKNZ/yxgthOfmytQs8d8hKk=
github.com/tliron/glsp v0.1.1 h1:GNNgUX9p1Q9MoPQooJoZ0+WaLL03EkhcKZUYJAtiNqs=
github.com/tliron/glsp v0.1.1/go.mod h1:RVyVKeY3U+Nlc3DRklUiaegNsQyjzNTEool6YWh1v7g=
github.com/tliron/kutil v0.1.59 h1:ReZ/o2EB0TsoTsmGIFNRUnbLyHvuFmSI5TKO8VZgnFk= github.com/tliron/kutil v0.1.59 h1:ReZ/o2EB0TsoTsmGIFNRUnbLyHvuFmSI5TKO8VZgnFk=
github.com/tliron/kutil v0.1.59/go.mod h1:jzWwDRumthKR8qHIquhHrErveSzZeFImNacoKfEjYkM= github.com/tliron/kutil v0.1.59/go.mod h1:jzWwDRumthKR8qHIquhHrErveSzZeFImNacoKfEjYkM=
github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0= github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0=
@ -193,6 +191,8 @@ github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBv
github.com/zchee/color/v2 v2.0.6 h1:+mD95jTXou3Bi8+ZWn3SOEDts36SNROILd9JId7VI9A= github.com/zchee/color/v2 v2.0.6 h1:+mD95jTXou3Bi8+ZWn3SOEDts36SNROILd9JId7VI9A=
github.com/zchee/color/v2 v2.0.6/go.mod h1:mtte+U+f1/0xODbqR9J+TfcTjd86MMv6KNmpnC8MiXk= github.com/zchee/color/v2 v2.0.6/go.mod h1:mtte+U+f1/0xODbqR9J+TfcTjd86MMv6KNmpnC8MiXk=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/zk-org/pretty v0.2.4 h1:pxf2E61IDO1I9cSNVoESQqK/y129Xophlp6XOH59130=
github.com/zk-org/pretty v0.2.4/go.mod h1:GIPC7TRqGw0VDdumZQ6JP21n0xCsXBd+rnVHeyEjN10=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
@ -251,6 +251,7 @@ golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

@ -6,10 +6,10 @@ import (
"strings" "strings"
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
executil "github.com/mickael-menu/zk/internal/util/exec" executil "github.com/zk-org/zk/internal/util/exec"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
osutil "github.com/mickael-menu/zk/internal/util/os" osutil "github.com/zk-org/zk/internal/util/os"
) )
// Editor represents an external editor able to edit the notes. // Editor represents an external editor able to edit the notes.
@ -37,7 +37,7 @@ func (e *Editor) Open(paths ...string) error {
// /dev/tty is restored as stdin, in case the user used a pipe to feed // /dev/tty is restored as stdin, in case the user used a pipe to feed
// initial note content to `zk new`. Without this, Vim doesn't work // initial note content to `zk new`. Without this, Vim doesn't work
// properly in this case. // properly in this case.
// See https://github.com/mickael-menu/zk/issues/4 // See https://github.com/zk-org/zk/issues/4
cmd := executil.CommandFromString(e.editor + " " + shellquote.Join(paths...) + " </dev/tty") cmd := executil.CommandFromString(e.editor + " " + shellquote.Join(paths...) + " </dev/tty")
cmd.Stdin = os.Stdin cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout

@ -4,8 +4,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestEditorUsesZkEditorFirst(t *testing.T) { func TestEditorUsesZkEditorFirst(t *testing.T) {

@ -5,7 +5,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// FileStorage implements the port core.FileStorage. // FileStorage implements the port core.FileStorage.

@ -9,9 +9,9 @@ import (
"sync" "sync"
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
stringsutil "github.com/mickael-menu/zk/internal/util/strings" stringsutil "github.com/zk-org/zk/internal/util/strings"
) )
// ErrCancelled is returned when the user cancelled fzf. // ErrCancelled is returned when the user cancelled fzf.

@ -7,10 +7,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/mickael-menu/zk/internal/adapter/term" "github.com/zk-org/zk/internal/adapter/term"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
stringsutil "github.com/mickael-menu/zk/internal/util/strings" stringsutil "github.com/zk-org/zk/internal/util/strings"
) )
// NoteFilter uses fzf to filter interactively a set of notes. // NoteFilter uses fzf to filter interactively a set of notes.

@ -6,11 +6,11 @@ import (
"path/filepath" "path/filepath"
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/mickael-menu/zk/internal/adapter/handlebars/helpers" "github.com/zk-org/zk/internal/adapter/handlebars/helpers"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
func Init(supportsUTF8 bool, logger util.Logger) { func Init(supportsUTF8 bool, logger util.Logger) {

@ -7,12 +7,12 @@ import (
"testing" "testing"
"time" "time"
"github.com/mickael-menu/zk/internal/adapter/handlebars/helpers" "github.com/zk-org/zk/internal/adapter/handlebars/helpers"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/fixtures" "github.com/zk-org/zk/internal/util/fixtures"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func init() { func init() {

@ -6,8 +6,8 @@ import (
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/lestrrat-go/strftime" "github.com/lestrrat-go/strftime"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
dateutil "github.com/mickael-menu/zk/internal/util/date" dateutil "github.com/zk-org/zk/internal/util/date"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/rvflash/elapsed" "github.com/rvflash/elapsed"
) )

@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// RegisterJSON registers a {{json}} template helper which serializes its // RegisterJSON registers a {{json}} template helper which serializes its

@ -1,8 +1,8 @@
package helpers package helpers
import ( import (
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// NewLinkHelper creates a new template helper to generate an internal link // NewLinkHelper creates a new template helper to generate an internal link

@ -2,8 +2,8 @@ package helpers
import ( import (
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// RegisterPrepend registers a {{prepend}} template helper which prepend a // RegisterPrepend registers a {{prepend}} template helper which prepend a

@ -4,8 +4,8 @@ import (
"strings" "strings"
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/exec" "github.com/zk-org/zk/internal/util/exec"
) )
// RegisterShell registers the {{sh}} template helper, which runs shell commands. // RegisterShell registers the {{sh}} template helper, which runs shell commands.

@ -3,7 +3,7 @@ package helpers
import ( import (
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/gosimple/slug" "github.com/gosimple/slug"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// NewSlugHelper creates a new template helper to slugify text. // NewSlugHelper creates a new template helper to slugify text.

@ -4,8 +4,8 @@ import (
"strings" "strings"
"github.com/aymerick/raymond" "github.com/aymerick/raymond"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// NewStyleHelper creates a new template helper which stylizes the text input // NewStyleHelper creates a new template helper which stylizes the text input

@ -3,7 +3,7 @@ package lsp
import ( import (
"fmt" "fmt"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
) )
const cmdIndex = "zk.index" const cmdIndex = "zk.index"

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/tliron/glsp" "github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )

@ -5,11 +5,11 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
) )
const cmdList = "zk.list" const cmdList = "zk.list"

@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
dateutil "github.com/mickael-menu/zk/internal/util/date" dateutil "github.com/zk-org/zk/internal/util/date"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/tliron/glsp" "github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )

@ -3,9 +3,9 @@ package lsp
import ( import (
"fmt" "fmt"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
const cmdTagList = "zk.tag.list" const cmdTagList = "zk.tag.list"

@ -3,8 +3,8 @@ package lsp
import ( import (
"path/filepath" "path/filepath"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
// completionTemplates holds templates to render the various elements of an LSP // completionTemplates holds templates to render the various elements of an LSP

@ -7,10 +7,10 @@ import (
"strings" "strings"
"unicode/utf16" "unicode/utf16"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
"github.com/tliron/glsp" "github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )
@ -258,7 +258,7 @@ func (d *document) IsTagPosition(position protocol.Position, noteContentParser c
lineIdx := int(position.Line) lineIdx := int(position.Line)
charIdx := int(position.Character) charIdx := int(position.Character)
line := lines[lineIdx] line := lines[lineIdx]
// https://github.com/mickael-menu/zk/issues/144#issuecomment-1006108485 // https://github.com/zk-org/zk/issues/144#issuecomment-1006108485
line = line[:charIdx] + "ZK_PLACEHOLDER" + line[charIdx:] line = line[:charIdx] + "ZK_PLACEHOLDER" + line[charIdx:]
lines[lineIdx] = line lines[lineIdx] = line
targetWord := strutil.WordAt(line, charIdx) targetWord := strutil.WordAt(line, charIdx)

@ -8,11 +8,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
"github.com/tliron/glsp" "github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
glspserv "github.com/tliron/glsp/server" glspserv "github.com/tliron/glsp/server"

@ -7,8 +7,8 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/tliron/glsp" "github.com/tliron/glsp"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )

@ -267,7 +267,7 @@ func isValidTag(tag string) bool {
} }
// Prevent Markdown table syntax to be parsed a a colon tag, e.g. |:---:| // Prevent Markdown table syntax to be parsed a a colon tag, e.g. |:---:|
// https://github.com/mickael-menu/zk/issues/185 // https://github.com/zk-org/zk/issues/185
for _, c := range tag { for _, c := range tag {
if c != '-' { if c != '-' {
return true return true

@ -3,7 +3,7 @@ package extensions
import ( import (
"strings" "strings"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/yuin/goldmark" "github.com/yuin/goldmark"
"github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/parser"

@ -7,12 +7,12 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/mickael-menu/zk/internal/adapter/markdown/extensions" "github.com/zk-org/zk/internal/adapter/markdown/extensions"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
"github.com/mickael-menu/zk/internal/util/yaml" "github.com/zk-org/zk/internal/util/yaml"
"github.com/mvdan/xurls" "github.com/mvdan/xurls"
"github.com/yuin/goldmark" "github.com/yuin/goldmark"
meta "github.com/yuin/goldmark-meta" meta "github.com/yuin/goldmark-meta"

@ -3,10 +3,10 @@ package markdown
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestParseTitle(t *testing.T) { func TestParseTitle(t *testing.T) {
@ -190,7 +190,7 @@ func TestParseHashtags(t *testing.T) {
test("#multi word# end", []string{"multi"}) test("#multi word# end", []string{"multi"})
// Single character // Single character
// See https://github.com/mickael-menu/zk/issues/118 // See https://github.com/zk-org/zk/issues/118
test("#a", []string{"a"}) test("#a", []string{"a"})
} }
@ -570,7 +570,7 @@ A link can have [one relation](one "rel-1") or [several relations](several "rel-
}) })
// Markdown links are decoded, but not WikiLinks. // Markdown links are decoded, but not WikiLinks.
// i.e. https://github.com/mickael-menu/zk/issues/86 // i.e. https://github.com/zk-org/zk/issues/86
test("[foo%20bar](202110031652%20foo%20bar)", []core.Link{ test("[foo%20bar](202110031652%20foo%20bar)", []core.Link{
{ {
Title: "foo%20bar", Title: "foo%20bar",

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// CollectionDAO persists collections (e.g. tags) in the SQLite database. // CollectionDAO persists collections (e.g. tags) in the SQLite database.

@ -3,9 +3,9 @@ package sqlite
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestCollectionDAOFindOrCreate(t *testing.T) { func TestCollectionDAOFindOrCreate(t *testing.T) {

@ -6,8 +6,8 @@ import (
"regexp" "regexp"
sqlite "github.com/mattn/go-sqlite3" sqlite "github.com/mattn/go-sqlite3"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
func init() { func init() {
@ -214,7 +214,7 @@ func (db *DB) migrate() error {
{ // 7 { // 7
SQL: []string{}, SQL: []string{},
// https://github.com/mickael-menu/zk/issues/170#issuecomment-1107848441 // https://github.com/zk-org/zk/issues/170#issuecomment-1107848441
NeedsReindexing: true, NeedsReindexing: true,
}, },
} }

@ -3,8 +3,8 @@ package sqlite
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/fixtures" "github.com/zk-org/zk/internal/util/fixtures"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestOpen(t *testing.T) { func TestOpen(t *testing.T) {

@ -4,8 +4,8 @@ import (
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// LinkDAO persists links in the SQLite database. // LinkDAO persists links in the SQLite database.

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func testLinkDAO(t *testing.T, callback func(tx Transaction, dao *LinkDAO)) { func testLinkDAO(t *testing.T, callback func(tx Transaction, dao *LinkDAO)) {

@ -3,7 +3,7 @@ package sqlite
import ( import (
"database/sql" "database/sql"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// Known metadata keys. // Known metadata keys.

@ -3,7 +3,7 @@ package sqlite
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestMetadataDAOGetUnknown(t *testing.T) { func TestMetadataDAOGetUnknown(t *testing.T) {

@ -8,12 +8,12 @@ import (
"strings" "strings"
"time" "time"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/fts5" "github.com/zk-org/zk/internal/util/fts5"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
) )
// NoteDAO persists notes in the SQLite database. // NoteDAO persists notes in the SQLite database.
@ -74,7 +74,7 @@ func NewNoteDAO(tx Transaction, logger util.Logger) *NoteDAO {
SELECT id FROM notes SELECT id FROM notes
WHERE path REGEXP ? WHERE path REGEXP ?
-- To find the best match possible, we sort by path length. -- To find the best match possible, we sort by path length.
-- See https://github.com/mickael-menu/zk/issues/23 -- See https://github.com/zk-org/zk/issues/23
ORDER BY LENGTH(path) ASC ORDER BY LENGTH(path) ASC
`), `),

@ -6,11 +6,11 @@ import (
"testing" "testing"
"time" "time"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestNoteDAOIndexed(t *testing.T) { func TestNoteDAOIndexed(t *testing.T) {
@ -239,7 +239,7 @@ func TestNoteDAOFindIdsByHref(t *testing.T) {
test("test", true, []core.NoteID{6, 5, 8}) test("test", true, []core.NoteID{6, 5, 8})
// Filename takes precedence over the rest of the path. // Filename takes precedence over the rest of the path.
// See https://github.com/mickael-menu/zk/issues/111 // See https://github.com/zk-org/zk/issues/111
test("ref", true, []core.NoteID{8}) test("ref", true, []core.NoteID{8})
} }
@ -258,7 +258,7 @@ func TestNoteDAOFindIncludingHrefs(t *testing.T) {
test("test", true, []string{"ref/test/ref.md", "ref/test/b.md", "ref/test/a.md"}) test("test", true, []string{"ref/test/ref.md", "ref/test/b.md", "ref/test/a.md"})
// Filename takes precedence over the rest of the path. // Filename takes precedence over the rest of the path.
// See https://github.com/mickael-menu/zk/issues/111 // See https://github.com/zk-org/zk/issues/111
test("ref", true, []string{"ref/test/ref.md"}) test("ref", true, []string{"ref/test/ref.md"})
} }
@ -280,7 +280,7 @@ func TestNoteDAOFindExcludingHrefs(t *testing.T) {
"log/2021-02-04.md", "index.md", "log/2021-01-04.md"}) "log/2021-02-04.md", "index.md", "log/2021-01-04.md"})
// Filename takes precedence over the rest of the path. // Filename takes precedence over the rest of the path.
// See https://github.com/mickael-menu/zk/issues/111 // See https://github.com/zk-org/zk/issues/111
test("ref", true, []string{"ref/test/b.md", "f39c8.md", "ref/test/a.md", test("ref", true, []string{"ref/test/b.md", "f39c8.md", "ref/test/a.md",
"log/2021-01-03.md", "log/2021-02-04.md", "index.md", "log/2021-01-04.md"}) "log/2021-01-03.md", "log/2021-02-04.md", "index.md", "log/2021-01-04.md"})
} }

@ -5,11 +5,11 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
) )
// NoteIndex persists note indexing results in the SQLite database. // NoteIndex persists note indexing results in the SQLite database.
@ -150,7 +150,7 @@ func (ni *NoteIndex) fixExistingLinks(dao *dao, id core.NoteID, path string) err
for _, link := range links { for _, link := range links {
// To find the best match possible, shortest paths take precedence. // To find the best match possible, shortest paths take precedence.
// See https://github.com/mickael-menu/zk/issues/23 // See https://github.com/zk-org/zk/issues/23
if link.TargetPath != "" && len(link.TargetPath) < len(path) { if link.TargetPath != "" && len(link.TargetPath) < len(path) {
continue continue
} }

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
// FIXME: Missing tests // FIXME: Missing tests

@ -4,7 +4,7 @@ import (
"database/sql" "database/sql"
"sync" "sync"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// LazyStmt is a wrapper around a sql.Stmt which will be evaluated on first use. // LazyStmt is a wrapper around a sql.Stmt which will be evaluated on first use.

@ -1,4 +1,4 @@
# See https://github.com/mickael-menu/zk/issues/23 # See https://github.com/zk-org/zk/issues/23
- id: 1 - id: 1
path: "prefix-longest.md" path: "prefix-longest.md"
sortable_path: "prefix-longest.md" sortable_path: "prefix-longest.md"

@ -4,8 +4,8 @@ import (
"testing" "testing"
"github.com/go-testfixtures/testfixtures/v3" "github.com/go-testfixtures/testfixtures/v3"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
// testDB is an utility function to create a database loaded with the default fixtures. // testDB is an utility function to create a database loaded with the default fixtures.

@ -6,8 +6,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
type RowScanner interface { type RowScanner interface {

@ -3,7 +3,7 @@ package sqlite
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestEscapeLikeTerm(t *testing.T) { func TestEscapeLikeTerm(t *testing.T) {

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
) )
// Style implements core.Styler using ANSI escape codes to be used with a terminal. // Style implements core.Styler using ANSI escape codes to be used with a terminal.

@ -4,8 +4,8 @@ import (
"testing" "testing"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func createTerminal() *Terminal { func createTerminal() *Terminal {

@ -5,10 +5,10 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/mickael-menu/zk/internal/adapter/fzf" "github.com/zk-org/zk/internal/adapter/fzf"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// Edit opens notes matching a set of criteria with the user editor. // Edit opens notes matching a set of criteria with the user editor.

@ -5,11 +5,11 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/mickael-menu/zk/internal/adapter/fzf" "github.com/zk-org/zk/internal/adapter/fzf"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// Graph produces a directed graph of the notes matching a set of criteria. // Graph produces a directed graph of the notes matching a set of criteria.

@ -5,9 +5,9 @@ import (
"os" "os"
"time" "time"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/schollz/progressbar/v3" "github.com/schollz/progressbar/v3"
) )

@ -6,9 +6,9 @@ import (
"github.com/AlecAivazis/survey/v2" "github.com/AlecAivazis/survey/v2"
"github.com/AlecAivazis/survey/v2/terminal" "github.com/AlecAivazis/survey/v2/terminal"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// Init creates a notebook in the given directory // Init creates a notebook in the given directory

@ -5,10 +5,10 @@ import (
"io" "io"
"os" "os"
"github.com/mickael-menu/zk/internal/adapter/fzf" "github.com/zk-org/zk/internal/adapter/fzf"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// List displays notes matching a set of criteria. // List displays notes matching a set of criteria.

@ -3,7 +3,7 @@ package cmd
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestListFormatDefault(t *testing.T) { func TestListFormatDefault(t *testing.T) {

@ -1,9 +1,9 @@
package cmd package cmd
import ( import (
"github.com/mickael-menu/zk/internal/adapter/lsp" "github.com/zk-org/zk/internal/adapter/lsp"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
) )
// LSP starts a server implementing the Language Server Protocol. // LSP starts a server implementing the Language Server Protocol.

@ -8,10 +8,10 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
dateutil "github.com/mickael-menu/zk/internal/util/date" dateutil "github.com/zk-org/zk/internal/util/date"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
) )
// New adds a new note to the notebook. // New adds a new note to the notebook.

@ -5,10 +5,10 @@ import (
"io" "io"
"os" "os"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// Tag manages the note tags in the notebook. // Tag manages the note tags in the notebook.

@ -6,21 +6,21 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/mickael-menu/zk/internal/adapter/editor" "github.com/zk-org/zk/internal/adapter/editor"
"github.com/mickael-menu/zk/internal/adapter/fs" "github.com/zk-org/zk/internal/adapter/fs"
"github.com/mickael-menu/zk/internal/adapter/fzf" "github.com/zk-org/zk/internal/adapter/fzf"
"github.com/mickael-menu/zk/internal/adapter/handlebars" "github.com/zk-org/zk/internal/adapter/handlebars"
hbhelpers "github.com/mickael-menu/zk/internal/adapter/handlebars/helpers" hbhelpers "github.com/zk-org/zk/internal/adapter/handlebars/helpers"
"github.com/mickael-menu/zk/internal/adapter/markdown" "github.com/zk-org/zk/internal/adapter/markdown"
"github.com/mickael-menu/zk/internal/adapter/sqlite" "github.com/zk-org/zk/internal/adapter/sqlite"
"github.com/mickael-menu/zk/internal/adapter/term" "github.com/zk-org/zk/internal/adapter/term"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
osutil "github.com/mickael-menu/zk/internal/util/os" osutil "github.com/zk-org/zk/internal/util/os"
"github.com/mickael-menu/zk/internal/util/pager" "github.com/zk-org/zk/internal/util/pager"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/mickael-menu/zk/internal/util/rand" "github.com/zk-org/zk/internal/util/rand"
) )
type Dirs struct { type Dirs struct {

@ -6,10 +6,10 @@ import (
"github.com/alecthomas/kong" "github.com/alecthomas/kong"
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
dateutil "github.com/mickael-menu/zk/internal/util/date" dateutil "github.com/zk-org/zk/internal/util/date"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/strings" "github.com/zk-org/zk/internal/util/strings"
) )
// Filtering holds filtering options to select notes. // Filtering holds filtering options to select notes.

@ -3,7 +3,7 @@ package cli
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestExpandNamedFiltersNone(t *testing.T) { func TestExpandNamedFiltersNone(t *testing.T) {

@ -5,8 +5,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
toml "github.com/pelletier/go-toml" toml "github.com/pelletier/go-toml"
) )

@ -5,8 +5,8 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestParseDefaultConfig(t *testing.T) { func TestParseDefaultConfig(t *testing.T) {

@ -5,8 +5,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
// Metadata used to generate a link. // Metadata used to generate a link.

@ -4,7 +4,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestMarkdownLinkFormatter(t *testing.T) { func TestMarkdownLinkFormatter(t *testing.T) {

@ -4,7 +4,7 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
// NoteID represents the unique ID of a note collection relative to a given // NoteID represents the unique ID of a note collection relative to a given

@ -3,7 +3,7 @@ package core
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestNoteSorterFromString(t *testing.T) { func TestNoteSorterFromString(t *testing.T) {

@ -5,10 +5,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestNewNoteFormatter(t *testing.T) { func TestNewNoteFormatter(t *testing.T) {

@ -6,10 +6,10 @@ import (
"time" "time"
"github.com/bmatcuk/doublestar/v4" "github.com/bmatcuk/doublestar/v4"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
) )
// NoteIndex persists and grants access to indexed information about the notes. // NoteIndex persists and grants access to indexed information about the notes.

@ -4,8 +4,8 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
type newNoteTask struct { type newNoteTask struct {

@ -5,10 +5,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestNotebookNewNote(t *testing.T) { func TestNotebookNewNote(t *testing.T) {

@ -7,9 +7,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
strutil "github.com/mickael-menu/zk/internal/util/strings" strutil "github.com/zk-org/zk/internal/util/strings"
"github.com/relvacode/iso8601" "github.com/relvacode/iso8601"
"gopkg.in/djherbis/times.v1" "gopkg.in/djherbis/times.v1"
) )

@ -6,10 +6,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
"github.com/mickael-menu/zk/internal/util/paths" "github.com/zk-org/zk/internal/util/paths"
) )
// Notebook handles queries and commands performed on an opened notebook. // Notebook handles queries and commands performed on an opened notebook.

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
) )
// NotebookStore retrieves or creates new notebooks. // NotebookStore retrieves or creates new notebooks.
@ -316,7 +316,7 @@ multiword-tags = false
# LSP # LSP
# #
# Configure basic editor integration for LSP-compatible editors. # Configure basic editor integration for LSP-compatible editors.
# See https://github.com/mickael-menu/zk/blob/main/docs/editors-integration.md # See https://github.com/zk-org/zk/blob/main/docs/editors-integration.md
# #
[lsp] [lsp]

@ -5,7 +5,7 @@ package exec
import ( import (
"os/exec" "os/exec"
osutil "github.com/mickael-menu/zk/internal/util/os" osutil "github.com/zk-org/zk/internal/util/os"
) )
// CommandFromString returns a Cmd running the given command with $SHELL. // CommandFromString returns a Cmd running the given command with $SHELL.

@ -3,7 +3,7 @@ package fts5
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestConvertQuery(t *testing.T) { func TestConvertQuery(t *testing.T) {

@ -4,7 +4,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
) )
// Getenv returns an optional String for the environment variable with given // Getenv returns an optional String for the environment variable with given

@ -9,11 +9,11 @@ import (
"sync" "sync"
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/errors" "github.com/zk-org/zk/internal/util/errors"
executil "github.com/mickael-menu/zk/internal/util/exec" executil "github.com/zk-org/zk/internal/util/exec"
"github.com/mickael-menu/zk/internal/util/opt" "github.com/zk-org/zk/internal/util/opt"
osutil "github.com/mickael-menu/zk/internal/util/os" osutil "github.com/zk-org/zk/internal/util/os"
) )
// Pager writes text to a terminal using the user's pager. // Pager writes text to a terminal using the user's pager.

@ -5,7 +5,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
var date1 = time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC) var date1 = time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC)

@ -5,7 +5,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
) )
// Walk emits the metadata of each file stored in the directory if they pass // Walk emits the metadata of each file stored in the directory if they pass

@ -4,9 +4,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/mickael-menu/zk/internal/util" "github.com/zk-org/zk/internal/util"
"github.com/mickael-menu/zk/internal/util/fixtures" "github.com/zk-org/zk/internal/util/fixtures"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestWalk(t *testing.T) { func TestWalk(t *testing.T) {

@ -5,7 +5,7 @@ import (
"time" "time"
"unicode" "unicode"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
) )
// NewIDGenerator returns a function generating string IDs using the given options. // NewIDGenerator returns a function generating string IDs using the given options.

@ -3,7 +3,7 @@ package strings
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
func TestPrepend(t *testing.T) { func TestPrepend(t *testing.T) {

@ -7,7 +7,7 @@ import (
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/mickael-menu/pretty" "github.com/zk-org/pretty"
) )
func True(t *testing.T, value bool) { func True(t *testing.T, value bool) {

@ -3,7 +3,7 @@ package yaml
import ( import (
"testing" "testing"
"github.com/mickael-menu/zk/internal/util/test/assert" "github.com/zk-org/zk/internal/util/test/assert"
) )
// Credit: https://github.com/icza/dyno // Credit: https://github.com/icza/dyno

@ -12,10 +12,10 @@ import (
"strings" "strings"
"github.com/alecthomas/kong" "github.com/alecthomas/kong"
"github.com/mickael-menu/zk/internal/cli" "github.com/zk-org/zk/internal/cli"
"github.com/mickael-menu/zk/internal/cli/cmd" "github.com/zk-org/zk/internal/cli/cmd"
"github.com/mickael-menu/zk/internal/core" "github.com/zk-org/zk/internal/core"
executil "github.com/mickael-menu/zk/internal/util/exec" executil "github.com/zk-org/zk/internal/util/exec"
) )
var Version = "dev" var Version = "dev"

@ -126,7 +126,7 @@ $ cat .zk/config.toml
># LSP ># LSP
># >#
># Configure basic editor integration for LSP-compatible editors. ># Configure basic editor integration for LSP-compatible editors.
># See https://github.com/mickael-menu/zk/blob/main/docs/editors-integration.md ># See https://github.com/zk-org/zk/blob/main/docs/editors-integration.md
># >#
>[lsp] >[lsp]
> >

@ -1,5 +1,5 @@
# A single-character hashtag freezes the indexing step. # A single-character hashtag freezes the indexing step.
# https://github.com/mickael-menu/zk/issues/118 # https://github.com/zk-org/zk/issues/118
$ cd blank $ cd blank
$ echo "#A" > test.md $ echo "#A" > test.md

@ -1,5 +1,5 @@
# Links with anchors are broken. # Links with anchors are broken.
# https://github.com/mickael-menu/zk/issues/16 # https://github.com/zk-org/zk/issues/16
$ cd blank $ cd blank

@ -1,5 +1,5 @@
# Wiki links in subdirectories are broken # Wiki links in subdirectories are broken
# https://github.com/mickael-menu/zk/issues/170 # https://github.com/zk-org/zk/issues/170
$ cd blank-slug $ cd blank-slug

@ -1,5 +1,5 @@
# Support for double star globbing with `note.ignore`. # Support for double star globbing with `note.ignore`.
# https://github.com/mickael-menu/zk/issues/173 # https://github.com/zk-org/zk/issues/173
$ cd blank $ cd blank

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save