{"id":13412237,"url":"https://github.com/zk-org/zk-nvim","last_synced_at":"2025-12-24T08:48:37.796Z","repository":{"id":37039576,"uuid":"396687108","full_name":"zk-org/zk-nvim","owner":"zk-org","description":"Neovim extension for zk","archived":false,"fork":false,"pushed_at":"2025-05-09T16:21:04.000Z","size":181,"stargazers_count":678,"open_issues_count":5,"forks_count":54,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-09T16:43:52.084Z","etag":null,"topics":["neovim","notes","nvim","zk"],"latest_commit_sha":null,"homepage":"https://github.com/zk-org/zk","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-16T08:03:21.000Z","updated_at":"2025-05-09T16:21:06.000Z","dependencies_parsed_at":"2023-01-31T15:31:04.525Z","dependency_job_id":"f810cff2-5d84-46d8-9b69-1578202e90c6","html_url":"https://github.com/zk-org/zk-nvim","commit_stats":{"total_commits":58,"total_committers":28,"mean_commits":"2.0714285714285716","dds":0.7586206896551724,"last_synced_commit":"42dc341d897ac4da3d4a9c5c506a36153473f021"},"previous_names":["zk-org/zk-nvim","mickael-menu/zk-nvim"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-org%2Fzk-nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-org%2Fzk-nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-org%2Fzk-nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-org%2Fzk-nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk-org","download_url":"https://codeload.github.com/zk-org/zk-nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301432,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","notes","nvim","zk"],"created_at":"2024-07-30T20:01:22.462Z","updated_at":"2025-12-24T08:48:37.790Z","avatar_url":"https://github.com/zk-org.png","language":"Lua","funding_links":[],"categories":["Note Taking","neovim","Lua"],"sub_categories":["Cursorline"],"readme":"# zk-nvim\n\nNeovim extension for the [`zk`](https://github.com/zk-org/zk) plain text\nnote-taking assistant.\n\nCheckout [Shivan's](https://github.com/shivan-s) video,\n[_Note-taking System ALL Programmers Should Consider_](https://www.youtube.com/watch?v=UzhZb7e4l4Y),\nto see it in action.\n\n## Requirements\n\n| `zk-nvim`     | `zk`            | Neovim         |\n| ------------- | --------------- | -------------- |\n| 0.4.0 - HEAD  | \u003e=0.15.1        | \u003e= 0.11.0      |\n| 0.2.0 - 0.3.0 | 0.14.1 - 0.15.1 | 0.9.5 - 0.10.4 |\n| 0.1.1         | 0.13.0 - 0.14.1 | 0.9.5          |\n| 0.1.0         | 0.13.0 - 0.14.1 | 0.8.0 - 0.9.5  |\n\n## Installation\n\nVia [packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse(\"zk-org/zk-nvim\")\n```\n\nVia [vim-plug](https://github.com/junegunn/vim-plug)\n\n```viml\nPlug 'zk-org/zk-nvim'\n```\n\nVia [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  \"zk-org/zk-nvim\",\n  config = function()\n    require(\"zk\").setup({\n      -- See Setup section below\n    })\n  end\n}\n```\n\nTo get the best experience, it's recommended to also install either\n[Telescope](https://github.com/nvim-telescope/telescope.nvim),\n[fzf](https://github.com/junegunn/fzf),\n[mini.pick](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pick.md),\nor\n[snacks.picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md)\n\n## Setup\n\n\u003e [!IMPORTANT] If you have the [zk cli](https://github.com/zk-org/zk) installed,\n\u003e then you _do not need to install `zk lsp`_ via Mason (or otherwise).\n\nDefault `lazy.nvim` setup:\n\n```lua\nreturn {\n  \"zk-org/zk-nvim\",\n  config = function()\n    require(\"zk\").setup({\n      -- Can be \"telescope\", \"fzf\", \"fzf_lua\", \"minipick\", \"snacks_picker\",\n      -- or select\" (`vim.ui.select`).\n      picker = \"select\",\n\n      lsp = {\n        -- `config` is passed to `vim.lsp.start(config)`\n        config = {\n          name = \"zk\",\n          cmd = { \"zk\", \"lsp\" },\n          filetypes = { \"markdown\" },\n          -- on_attach = ...\n          -- etc, see `:h vim.lsp.start()`\n        },\n\n        -- automatically attach buffers in a zk notebook that match the given filetypes\n        auto_attach = {\n          enabled = true,\n        },\n      },\n    })\n  end,\n}\n```\n\nNote that the `setup` function will not add any key mappings for you. If you\nwant to add key mappings, see the [example mappings](#example-mappings).\n\n### Picker Options\n\nYou can define default configurations for the pickers opened by `zk-nvim`,\nallowing you to apply a specific theme or layout for `zk-nvim`. This works for\nall supported pickers, but you'll need to refer to the relevant configuration\noptions for each picker.\n\n```lua\nrequire(\"zk\").setup({\n    picker_options = {\n        telescope = require(\"telescope.themes\").get_ivy(),\n\n        -- or if you use snacks picker\n\n        snacks_picker = {\n            layout = {\n                preset = \"ivy\",\n            }\n        },\n    },\n    ...\n})\n```\n\n### Notebook Directory Discovery\n\nWhen you run a notebook command, this plugin will look for a notebook in the\nfollowing places and order:\n\n1. the current buffer path (i.e. the file you are currently editing),\n2. the current working directory,\n3. the `$ZK_NOTEBOOK_DIR` environment variable.\n\nWe recommend you to export the `$ZK_NOTEBOOK_DIR` environment variable, so that\na notebook can always be found.\n\nIt is worth noting that for some notebook commands you can explicitly specify a\nnotebook by providing a path to any file or directory within the notebook. An\nexplicitly provided path will always take precedence and override the automatic\nnotebook discovery. However, this is always optional, and usually not necessary.\n\n## Getting Started\n\nAfter you have installed the plugin and added the setup code to your config, you\nare good to go. If you are not familiar with `zk`, we recommend you to read\nthrough the\n[getting started guide](https://zk-org.github.io/zk/tips/getting-started.html).\n\nWhen using the default config, the `zk` LSP client will automatically attach\nitself to buffers inside your notebook and provide capabilities like completion,\nhover and go-to-definition; see https://github.com/zk-org/zk/issues/22 for a\nfull list of what is supported.\n\nTry out different [commands](#built-in-commands) such as `:ZkNotes` or `:ZkNew`,\nsee what they can do, and learn as you go.\n\n## Built-in Commands\n\n### Indexing\n\n[Options (ZkIndex)](https://zk-org.github.io/zk/tips/editors-integration.html#zk-index)\n\n- `:ZkIndex [{options}]`  \n  Indexes the notebook.\n\n### Creating Notes\n\n[Options (ZkNew)](https://zk-org.github.io/zk/tips/editors-integration.html#zk-new)\n\n- `:ZkNew [{options}]`  \n  Creates and edits a new note.\n\n- `:'\u003c,'\u003eZkNewFromTitleSelection [{options}]`  \n  Creates a new note from the visual selection (used as the **title**) and\n  replaces the selection with a link to the note.\n\n- `:'\u003c,'\u003eZkNewFromContentSelection [{options}]`  \n  Creates a new note from the visual selection (used as the **content**) and\n  replaces the selection with a link to the note.\n\n### Navigation\n\n[Options (ZkList)](https://zk-org.github.io/zk/tips/editors-integration.html#zk-list)\n\n- `:ZkCd [{options}]`  \n  Changes directory to the notebook root.\n\n- `:ZkNotes [{options}]`  \n  Opens a notes picker.\n\n- `:ZkBuffers [{options}]`  \n  Opens a notes picker for active buffers (notebook files only).\n\n- `:ZkBacklinks [{options}]`  \n  Opens a notes picker showing backlinks of the current buffer.\n\n- `:ZkLinks [{options}]`  \n  Opens a notes picker showing outbound links of the current buffer.\n\n### Linking\n\n[Options (ZkList)](https://zk-org.github.io/zk/tips/editors-integration.html#zk-list)\n\n- `:ZkInsertLink`  \n  Inserts a link at the cursor location.\n\n- `:'\u003c,'\u003eZkInsertLinkAtSelection [{options}]`  \n  Inserts a link around the selected text.\n  - Special option: `matchSelected = true` → filters notes similar to the\n    selection.\n\n### Searching \u0026 Tagging\n\n[Options (ZkList)](https://zk-org.github.io/zk/tips/editors-integration.html#zk-list)\n\n- `:'\u003c,'\u003eZkMatch [{options}]`  \n  Opens a notes picker, filtering for notes matching the visual selection.\n\n- `:ZkTags [{options}]`  \n  Opens a notes picker for selected tags.\n\nIn addition, `options.notebook_path` can be used to explicitly specify a\nnotebook by providing a path to any file or directory within the notebook; see\n[Notebook Directory Discovery](#notebook-directory-discovery).\n\n_Examples:_\n\n```vim\n:ZkNew { dir = \"daily\", date = \"yesterday\" }\n:ZkNotes { createdAfter = \"3 days ago\", tags = { \"work\" } }\n:'\u003c,'\u003eZkNewFromTitleSelection \" this will use your last visual mode selection. Note that you *must* call this command with the '\u003c,'\u003e range.\n:ZkCd\n```\n\n---\n\n**Via Lua**\n\nYou can access the underlying Lua function of a command, with\n`require(\"zk.commands\").get`.\n\n_Examples:_\n\n```lua\nrequire(\"zk.commands\").get(\"ZkNew\")({ dir = \"daily\" })\nrequire(\"zk.commands\").get(\"ZkNotes\")({ createdAfter = \"3 days ago\", tags = { \"work\" } })\nrequire(\"zk.commands\").get(\"ZkNewFromTitleSelection\")()\n```\n\n## Custom Commands\n\n```lua\n---A thin wrapper around `vim.api.nvim_add_user_command` which parses the `params.args` of the command as a Lua table and passes it on to `fn`.\n---@param name string\n---@param fn function\n---@param opts? table {needs_selection} makes sure the command is called with a range\n---@see vim.api.nvim_add_user_command\nrequire(\"zk.commands\").add(name, fn, opts)\n```\n\n_Example 1:_\n\nLet us add a custom `:ZkOrphans` command that will list all notes that are\norphans, i.e. not referenced by any other note.\n\n```lua\nlocal zk = require(\"zk\")\nlocal commands = require(\"zk.commands\")\n\ncommands.add(\"ZkOrphans\", function(options)\n  options = vim.tbl_extend(\"force\", { orphan = true }, options or {})\n  zk.edit(options, { title = \"Zk Orphans\" })\nend)\n```\n\nThis adds the `:ZkOrphans [{options}]` vim user command, which accepts an\n`options` Lua table as an argument. We can execute it like this\n`:ZkOrphans { tags = { \"work\" } }` for example.\n\n\u003e Note: The `zk.edit` function is from the [high-level API](#high-level-api),\n\u003e which also contains other functions that might be useful for your custom\n\u003e commands.\n\n_Example 2:_\n\nChances are that this will not be our only custom command following this\npattern. So let's also add a `:ZkRecents` command and make the pattern a bit\nmore reusable.\n\n```lua\nlocal zk = require(\"zk\")\nlocal commands = require(\"zk.commands\")\n\nlocal function make_edit_fn(defaults, picker_options)\n  return function(options)\n    options = vim.tbl_extend(\"force\", defaults, options or {})\n    zk.edit(options, picker_options)\n  end\nend\n\ncommands.add(\"ZkOrphans\", make_edit_fn({ orphan = true }, { title = \"Zk Orphans\" }))\ncommands.add(\"ZkRecents\", make_edit_fn({ createdAfter = \"2 weeks ago\" }, { title = \"Zk Recents\" }))\n```\n\n## High-level API\n\nThe high-level API is inspired by the commands provided by the `zk` CLI tool;\nsee `zk --help`. It's mainly used for the implementation of built-in and custom\ncommands.\n\n```lua\n---Cd into the notebook root\n--\n---@param options? table\nrequire(\"zk\").cd(options)\n```\n\n```lua\n---Creates and edits a new note\n--\n---@param options? table additional options\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zknew\nrequire(\"zk\").new(options)\n```\n\n```lua\n---Indexes the notebook\n--\n---@param options? table additional options\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zkindex\nrequire(\"zk\").index(options)\n```\n\n```lua\n---Opens a notes picker, and calls the callback with the selection\n--\n---@param options? table additional options\n---@param picker_options? table options for the picker\n---@param cb function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zklist\n---@see zk.ui.pick_notes\nrequire(\"zk\").pick_notes(options, picker_options, cb)\n```\n\n```lua\n---Opens a tags picker, and calls the callback with the selection\n--\n---@param options? table additional options\n---@param picker_options? table options for the picker\n---@param cb function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zktaglist\n---@see zk.ui.pick_tags\nrequire(\"zk\").pick_tags(options, picker_options, cb)\n```\n\n```lua\n---Opens a notes picker, and edits the selected notes\n--\n---@param options? table additional options\n---@param picker_options? table options for the picker\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zklist\n---@see zk.ui.pick_notes\nrequire(\"zk\").edit(options, picker_options)\n```\n\n## API\n\nThe functions in the API module give you maximum flexibility and provide only a\nthin Lua friendly layer around `zk`'s LSP API. You can use it to write your own\nspecialized functions for interacting with `zk`.\n\n```lua\n---@param path? string path to explicitly specify the notebook\n---@param options? table additional options\n---@param cb function callback function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zkindex\nrequire(\"zk.api\").index(path, options, function(err, stats)\n  -- do something with the stats\nend)\n```\n\n```lua\n---@param path? string path to explicitly specify the notebook\n---@param options? table additional options\n---@param cb function callback function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zknew\nrequire(\"zk.api\").new(path, options, function(err, res)\n  file_path = res.path\n  -- do something with the new file path\nend)\n```\n\n```lua\n---@param path? string path to explicitly specify the notebook\n---@param options table additional options\n---@param cb function callback function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zklist\nrequire(\"zk.api\").list(path, options, function(err, notes)\n  -- do something with the notes\nend)\n```\n\n```lua\n---@param path? string path to explicitly specify the notebook\n---@param options? table additional options\n---@param cb function callback function\n---@see https://github.com/zk-org/zk/blob/main/docs/tips/editors-integration.md#zktaglist\nrequire(\"zk.api\").tag.list(path, options, function(err, tags)\n  -- do something with the tags\nend)\n```\n\n## Pickers\n\nUsed by the [high-level API](#high-level-api) to display the results of the\n[API](#api).\n\n```lua\n---Opens a notes picker\n--\n---@param notes list\n---@param options? table containing {picker}, {title}, {multi_select} keys\n---@param cb function\nrequire(\"zk.ui\").pick_notes(notes, options, cb)\n```\n\n```lua\n---Opens a tags picker\n--\n---@param tags list\n---@param options? table containing {picker}, {title}, {multi_select} keys\n---@param cb function\nrequire(\"zk.ui\").pick_tags(tags, options, cb)\n```\n\n```lua\n---To be used in zk.api.list as the `selection` in the additional options table\n--\n---@param options table the same options that are use for pick_notes\n---@return table api selection\nrequire(\"zk.ui\").get_pick_notes_list_api_selection(options)\n```\n\n## Example Mappings\n\nAdd these global mappings in your main Neovim config:\n\n```lua\nlocal opts = { noremap=true, silent=false }\n\n-- Create a new note after asking for its title.\nvim.api.nvim_set_keymap(\"n\", \"\u003cleader\u003ezn\", \"\u003cCmd\u003eZkNew { title = vim.fn.input('Title: ') }\u003cCR\u003e\", opts)\n\n-- Open notes.\nvim.api.nvim_set_keymap(\"n\", \"\u003cleader\u003ezo\", \"\u003cCmd\u003eZkNotes { sort = { 'modified' } }\u003cCR\u003e\", opts)\n-- Open notes associated with the selected tags.\nvim.api.nvim_set_keymap(\"n\", \"\u003cleader\u003ezt\", \"\u003cCmd\u003eZkTags\u003cCR\u003e\", opts)\n\n-- Search for the notes matching a given query.\nvim.api.nvim_set_keymap(\"n\", \"\u003cleader\u003ezf\", \"\u003cCmd\u003eZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }\u003cCR\u003e\", opts)\n-- Search for the notes matching the current visual selection.\nvim.api.nvim_set_keymap(\"v\", \"\u003cleader\u003ezf\", \":'\u003c,'\u003eZkMatch\u003cCR\u003e\", opts)\n```\n\nYou can add additional key mappings for Markdown buffers located in a `zk`\nnotebook, using `ftplugin`. First, make sure it is enabled in your Neovim\nconfig:\n\n```viml\nfiletype plugin on\n```\n\nThen, create a new file under `~/.config/nvim/ftplugin/markdown.lua` to setup\nthe mappings:\n\n```lua\n-- Add the key mappings only for Markdown files in a zk notebook.\nif require(\"zk.util\").notebook_root(vim.fn.expand('%:p')) ~= nil then\n  local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end\n  local opts = { noremap=true, silent=false }\n\n  -- Open the link under the caret.\n  map(\"n\", \"\u003cCR\u003e\", \"\u003cCmd\u003elua vim.lsp.buf.definition()\u003cCR\u003e\", opts)\n\n  -- Create a new note after asking for its title.\n  -- This overrides the global `\u003cleader\u003ezn` mapping to create the note in the same directory as the current buffer.\n  map(\"n\", \"\u003cleader\u003ezn\", \"\u003cCmd\u003eZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }\u003cCR\u003e\", opts)\n  -- Create a new note in the same directory as the current buffer, using the current selection for title.\n  map(\"v\", \"\u003cleader\u003eznt\", \":'\u003c,'\u003eZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }\u003cCR\u003e\", opts)\n  -- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.\n  map(\"v\", \"\u003cleader\u003eznc\", \":'\u003c,'\u003eZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }\u003cCR\u003e\", opts)\n\n  -- Open notes linking to the current buffer.\n  map(\"n\", \"\u003cleader\u003ezb\", \"\u003cCmd\u003eZkBacklinks\u003cCR\u003e\", opts)\n  -- Alternative for backlinks using pure LSP and showing the source context.\n  --map('n', '\u003cleader\u003ezb', '\u003cCmd\u003elua vim.lsp.buf.references()\u003cCR\u003e', opts)\n  -- Open notes linked by the current buffer.\n  map(\"n\", \"\u003cleader\u003ezl\", \"\u003cCmd\u003eZkLinks\u003cCR\u003e\", opts)\n\n  -- Preview a linked note.\n  map(\"n\", \"K\", \"\u003cCmd\u003elua vim.lsp.buf.hover()\u003cCR\u003e\", opts)\n  -- Open the code actions for a visual selection.\n  map(\"v\", \"\u003cleader\u003eza\", \":'\u003c,'\u003elua vim.lsp.buf.range_code_action()\u003cCR\u003e\", opts)\nend\n```\n\n# Miscellaneous\n\n## Syntax Highlighting Tips\n\nYou can extend Neovim's built-in Markdown syntax with proper highlighting and\nconceal support for `[[Wikilinks]]`, and conceal support for standard\n`[Markdown Links]()`. Create a new file under\n`~/.config/nvim/after/syntax/markdown.vim` for this purpose:\n\n```vim\n\" markdownWikiLink is a new region\nsyn region markdownWikiLink matchgroup=markdownLinkDelimiter start=\"\\[\\[\" end=\"\\]\\]\" contains=markdownUrl keepend oneline concealends\n\" markdownLinkText is copied from runtime files with 'concealends' appended\nsyn region markdownLinkText matchgroup=markdownLinkTextDelimiter start=\"!\\=\\[\\%(\\%(\\_[^][]\\|\\[\\_[^][]*\\]\\)*]\\%( \\=[[(]\\)\\)\\@=\" end=\"\\]\\%( \\=[[(]\\)\\@=\" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends\n\" markdownLink is copied from runtime files with 'conceal' appended\nsyn region markdownLink matchgroup=markdownLinkDelimiter start=\"(\" end=\")\" contains=markdownUrl keepend contained conceal\n```\n\nYou can then enable conceal with `:setlocal conceallevel=2`, see\n`:h 'conceallevel'`.\n\nNote that if you are using `nvim-treesitter` for Markdown, don't forget to\nenable `additional_vim_regex_highlighting`:\n\n```lua\nrequire(\"nvim-treesitter.configs\").setup({\n  -- ...\n  highlight = {\n    -- ...\n    additional_vim_regex_highlighting = { \"markdown\" }\n  },\n})\n```\n\n## Troubleshooting With a Minimal Config\n\nIf there are issues, you can test with a minimal config to rule out other\nplayers.\n\nMake a new directory, `init-zk` and make a fresh zk notebook. The structure of\n`init-zk` should look as follows:\n\n```text\n.\n├── init.lua\n└── notebook\n    └── .zk\n        ├── config.toml\n        ├── notebook.db\n        └── templates\n            └── default.md\n```\n\nPaste the following into `init.lua`:\n\n```lua\n-- Redirect Neovim runtime paths to /tmp\nvim.env.XDG_CONFIG_HOME = \"/tmp/nvim/config\"\nvim.env.XDG_DATA_HOME = \"/tmp/nvim/data\"\nvim.env.XDG_STATE_HOME = \"/tmp/nvim/state\"\nvim.env.XDG_CACHE_HOME = \"/tmp/nvim/cache\"\n\n-- Bootstrap lazy.nvim\nlocal lazypath = vim.fn.stdpath(\"data\") .. \"/lazy/lazy.nvim\"\nif not (vim.uv or vim.loop).fs_stat(lazypath) then\n  local lazyrepo = \"https://github.com/folke/lazy.nvim.git\"\n  local out = vim.fn.system({ \"git\", \"clone\", \"--filter=blob:none\", \"--branch=stable\", lazyrepo, lazypath })\n  if vim.v.shell_error ~= 0 then\n    vim.api.nvim_echo({\n      { \"Failed to clone lazy.nvim:\\n\", \"ErrorMsg\" },\n      { out, \"WarningMsg\" },\n      { \"\\nPress any key to exit...\" },\n    }, true, {})\n    vim.fn.getchar()\n    os.exit(1)\n  end\nend\nvim.opt.rtp:prepend(lazypath)\n\n-- Make sure to setup `mapleader` and `maplocalleader` before\n-- loading lazy.nvim so that mappings are correct.\n-- This is also a good place to setup other settings (vim.opt)\nvim.g.mapleader = \" \"\nvim.g.maplocalleader = \"\\\\\"\n\n-- Setup lazy.nvim\nrequire(\"lazy\").setup({\n\t{\n\t\t\"neovim/nvim-lspconfig\",\n\t},\n\t{\n\t\t\"zk-org/zk-nvim\",\n\t\tconfig = function()\n\t\t\trequire(\"zk\").setup()\n\t\tend,\n\t},\n\t-- automatically check for plugin updates\n\tchecker = { enabled = true },\n})\n```\n\nThen change this line in `.zk/config.toml`\n\n```toml\n[tool]\n# editor = \"vim\"\neditor = \"nvim -u ~/path/to/init-zk/init.lua\"\n```\n\n## Telescope Plugin\n\n\u003e Not recommended, instead just use the\n\u003e [:ZkNotes or :ZkTags commands](#built-in-commands).\n\nIt's possible (but not required) to also load the notes and tags pickers as a\ntelescope plugin.\n\n```lua\nrequire(\"telescope\").load_extension(\"zk\")\n```\n\n```vim\n:Telescope zk notes\n:Telescope zk notes createdAfter=3\\ days\\ ago\n:Telescope zk tags\n:Telescope zk tags created=today\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-org%2Fzk-nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk-org%2Fzk-nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-org%2Fzk-nvim/lists"}