From 5e51f8ed3636dce18072840e075292c79ca3cca7 Mon Sep 17 00:00:00 2001 From: juan Date: Sun, 7 Aug 2022 15:04:57 +0800 Subject: [PATCH] Feat | Add zk-nvim, remove glow.nvim --- lua/pluginList.lua | 10 +++++----- lua/plugins/zk.lua | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 lua/plugins/zk.lua diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 1fa6c68..1571098 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -62,7 +62,7 @@ return require('packer').startup(function(use) use { 'ms-jpq/coq_nvim', branch = 'coq', - after = 'nvim-lsp-installer', + after = {'nvim-lsp-installer', 'zk-nvim'}, run = ':COQdeps', config = function() require "plugins.coq" end } @@ -79,6 +79,7 @@ return require('packer').startup(function(use) end } + -- formating and editing use {"sbdchd/neoformat", cmd = "Neoformat"} use { @@ -110,7 +111,6 @@ return require('packer').startup(function(use) after = 'nvim-treesitter', config = function() require "plugins.matchup" end } - -- Lua use { 'abecodes/tabout.nvim', config = function() require('tabout').setup {} end, @@ -184,9 +184,9 @@ return require('packer').startup(function(use) -- integrations use {"tpope/vim-fugitive", cmd = "G"} use { - "ellisonleao/glow.nvim", - branch = 'main', - cmd = {"Glow", "GlowInstall"} + "mickael-menu/zk-nvim", + filetypes = {'markdown'}, + config = function() require "plugins.zk" end } -- fixes and misc. stuff diff --git a/lua/plugins/zk.lua b/lua/plugins/zk.lua new file mode 100644 index 0000000..593ebc1 --- /dev/null +++ b/lua/plugins/zk.lua @@ -0,0 +1,21 @@ +require("zk").setup({ + -- can be "telescope", "fzf" or "select" (`vim.ui.select`) + -- it's recommended to use "telescope" or "fzf" + picker = "telescope", + + lsp = { + -- `config` is passed to `vim.lsp.start_client(config)` + config = { + cmd = { "zk", "lsp" }, + name = "zk", + -- on_attach = ... + -- etc, see `:h vim.lsp.start_client()` + }, + + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + filetypes = { "markdown" }, + }, + }, +})