From f988f9bdec7b24b2d2d9ca5db2530c2710cbd0c8 Mon Sep 17 00:00:00 2001 From: gacallea Date: Sun, 26 Nov 2023 18:20:31 +0100 Subject: [PATCH 1/5] feat(note-taking): add support for zettelkasten with zk-nvim --- .../note-taking/zk-nvim/README.md | 23 +++++++++++++++++++ .../note-taking/zk-nvim/init.lua | 17 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lua/astrocommunity/note-taking/zk-nvim/README.md create mode 100644 lua/astrocommunity/note-taking/zk-nvim/init.lua diff --git a/lua/astrocommunity/note-taking/zk-nvim/README.md b/lua/astrocommunity/note-taking/zk-nvim/README.md new file mode 100644 index 000000000..ba1da2aec --- /dev/null +++ b/lua/astrocommunity/note-taking/zk-nvim/README.md @@ -0,0 +1,23 @@ +# zk-nvim + +Neovim extension for the [zk](https://github.com/mickael-menu/zk) plain text +note-taking assistant. + +zk is a command-line tool helping you to maintain a plain text +[Zettelkasten](https://zettelkasten.de/introduction/) or personal wiki. + +## Requirements + +- Telescope + +## This plugin pack does the following + +Adds `zk-nvim` +Adds `zk` language server + +## NOTE + +This plugin will: + +- setup and start the LSP server for you, do not call require("lspconfig").zk.setup(). +- automatically attach buffers in a zk notebook that match the given filetypes diff --git a/lua/astrocommunity/note-taking/zk-nvim/init.lua b/lua/astrocommunity/note-taking/zk-nvim/init.lua new file mode 100644 index 000000000..4bca60cbf --- /dev/null +++ b/lua/astrocommunity/note-taking/zk-nvim/init.lua @@ -0,0 +1,17 @@ +local utils = require "astronvim.utils" + +return { + { + "mickael-menu/zk-nvim", + config = function() + require("zk").setup { + picker = "telescope", + } + end, + }, + + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "zk") end, + }, +} From 7dc13e317fe35d5f12061996d85bf263a9819629 Mon Sep 17 00:00:00 2001 From: Andrea C from The App <3269984+gacallea@users.noreply.github.com> Date: Mon, 27 Nov 2023 08:39:29 +0100 Subject: [PATCH 2/5] Update lua/astrocommunity/note-taking/zk-nvim/README.md Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> --- .../note-taking/zk-nvim/README.md | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/lua/astrocommunity/note-taking/zk-nvim/README.md b/lua/astrocommunity/note-taking/zk-nvim/README.md index ba1da2aec..d16b6ad65 100644 --- a/lua/astrocommunity/note-taking/zk-nvim/README.md +++ b/lua/astrocommunity/note-taking/zk-nvim/README.md @@ -1,23 +1,9 @@ # zk-nvim -Neovim extension for the [zk](https://github.com/mickael-menu/zk) plain text -note-taking assistant. +Neovim extension for the [zk](https://github.com/mickael-menu/zk) plain text note-taking assistant. -zk is a command-line tool helping you to maintain a plain text -[Zettelkasten](https://zettelkasten.de/introduction/) or personal wiki. +**Repository:** -## Requirements +> :warning: This plugin will setup and start the LSP server for you, do *not* call `require("lspconfig").zk.setup()`. -- Telescope -## This plugin pack does the following - -Adds `zk-nvim` -Adds `zk` language server - -## NOTE - -This plugin will: - -- setup and start the LSP server for you, do not call require("lspconfig").zk.setup(). -- automatically attach buffers in a zk notebook that match the given filetypes From 28dad5302ff5d784542f5157f2f0e35004dbc2a7 Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:02:44 +0100 Subject: [PATCH 3/5] feat(zk-nvim): Use opts instead of config --- lua/astrocommunity/note-taking/zk-nvim/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/astrocommunity/note-taking/zk-nvim/init.lua b/lua/astrocommunity/note-taking/zk-nvim/init.lua index 4bca60cbf..167ac86eb 100644 --- a/lua/astrocommunity/note-taking/zk-nvim/init.lua +++ b/lua/astrocommunity/note-taking/zk-nvim/init.lua @@ -3,11 +3,10 @@ local utils = require "astronvim.utils" return { { "mickael-menu/zk-nvim", - config = function() - require("zk").setup { - picker = "telescope", - } - end, + opts = { + picker = "telescope" + }, + }, { From 74d8dd43cb4c0b78e8b14468d21d41b6caa6279e Mon Sep 17 00:00:00 2001 From: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:03:14 +0100 Subject: [PATCH 4/5] chore(zk-nvim): Remove empty line --- lua/astrocommunity/note-taking/zk-nvim/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/astrocommunity/note-taking/zk-nvim/init.lua b/lua/astrocommunity/note-taking/zk-nvim/init.lua index 167ac86eb..77e2b4b00 100644 --- a/lua/astrocommunity/note-taking/zk-nvim/init.lua +++ b/lua/astrocommunity/note-taking/zk-nvim/init.lua @@ -6,7 +6,6 @@ return { opts = { picker = "telescope" }, - }, { From a2feae6556f49e535901811f13cbf675e007b360 Mon Sep 17 00:00:00 2001 From: Uzair Aftab Date: Mon, 27 Nov 2023 10:04:52 +0100 Subject: [PATCH 5/5] chore(zk-nvim): Fix style --- lua/astrocommunity/note-taking/zk-nvim/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/astrocommunity/note-taking/zk-nvim/init.lua b/lua/astrocommunity/note-taking/zk-nvim/init.lua index 77e2b4b00..b550a5ec8 100644 --- a/lua/astrocommunity/note-taking/zk-nvim/init.lua +++ b/lua/astrocommunity/note-taking/zk-nvim/init.lua @@ -4,7 +4,7 @@ return { { "mickael-menu/zk-nvim", opts = { - picker = "telescope" + picker = "telescope", }, },