From 95aea6b533e71e478d61d18fac71cca116c56a4d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 22 May 2022 22:47:23 +0100 Subject: Add all the plugins I currently use --- .../lua/lspconfig/server_configurations/zk.lua | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua (limited to 'start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua') diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua new file mode 100644 index 0000000..c289045 --- /dev/null +++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua @@ -0,0 +1,48 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'zk', 'lsp' }, + filetypes = { 'markdown' }, + root_dir = util.root_pattern '.zk', + }, + commands = { + ZkIndex = { + function() + vim.lsp.buf.execute_command { + command = 'zk.index', + arguments = { vim.api.nvim_buf_get_name(0) }, + } + end, + description = 'Index', + }, + ZkNew = { + function(...) + vim.lsp.buf_request(0, 'workspace/executeCommand', { + command = 'zk.new', + arguments = { + vim.api.nvim_buf_get_name(0), + ..., + }, + }, function(_, result, _, _) + if not (result and result.path) then + return + end + vim.cmd('edit ' .. result.path) + end) + end, + + description = 'ZkNew', + }, + }, + docs = { + description = [[ +github.com/mickael-menu/zk + +A plain text note-taking assistant +]], + default_config = { + root_dir = [[root_pattern(".zk")]], + }, + }, +} -- cgit v1.2.3