From 8349e2ed92a9b1ef13ec4dc4066ffd8df941c4f3 Mon Sep 17 00:00:00 2001 From: cool-mist Date: Fri, 16 Feb 2024 15:23:46 +0530 Subject: [PATCH] Add ZK --- README.md | 1 + init.lua | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index 582d125..f0ea2f9 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This uses Packer as the plugin manager. - `go` - `rust` - `ripgrep` - for fuzzy searching +- `fzf` - for fuzzy searching # Installation # diff --git a/init.lua b/init.lua index b8e156a..ca9ba5f 100644 --- a/init.lua +++ b/init.lua @@ -82,6 +82,7 @@ packer.startup({function(u) u 'elzr/vim-json' u 'preservim/vim-markdown' u 'vim-pandoc/vim-pandoc-syntax' + u 'mickael-menu/zk-nvim' -- File tree, telescope u 'nvim-lua/plenary.nvim' @@ -179,6 +180,24 @@ lualine.setup({ } }); +local zk = require('zk') +zk.setup({ + picker = "fzf", + + lsp = { + config = { + cmd = { "zk", "lsp" }, + name = "zk", + }, + + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + filetypes = { "markdown", "markdown.pandoc" }, + }, + }, +}) + local whichkey = require('which-key') whichkey.setup() @@ -221,3 +240,4 @@ V.keymap.set('n', 'fh', ':Telescope help_tags') V.keymap.set('n', 'fr', ':Telescope oldfiles') V.keymap.set('n', 'ns', '/Config Section') V.keymap.set('n', 'o', 'oi') +V.keymap.set('n', 'fy', 'let @+=@%')