nvim: Fix zk plugin and lsp loading correctly

The plugin was not loading since lazyloading was not given an event
to start it with. Now, anytime any zk command is given, or we enter
a prose-like filetype the plugin is sourced.

The zk lsp on the other hand was started twice whenever the plugin
was loaded, since we also loaded it through the lspconfig manually.

This commit fixes both issues by sourcing and plugin and letting the
plugin load the lsp as well.
This commit is contained in:
Marty Oehme 2023-06-20 13:30:24 +02:00
parent 20c8edbe19
commit eb9fa8a156
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 15 additions and 1 deletions

View file

@ -37,7 +37,6 @@ local servers = {
texlab = {}, texlab = {},
tsserver = {}, tsserver = {},
yamlls = {}, yamlls = {},
zk = {},
} }
local function on_attach(client, bufnr) local function on_attach(client, bufnr)

View file

@ -37,6 +37,21 @@ return {
config = function() config = function()
require("zk").setup({ picker = "telescope" }) require("zk").setup({ picker = "telescope" })
end, end,
ft = writing_ft,
cmd = {
"ZkBacklinks",
"ZkCd",
"ZkIndex",
"ZkInsertLink",
"ZkInsertLinkAtSelection",
"ZkLinks",
"ZkMatch",
"ZkNew",
"ZkNewFromContentSelection",
"ZkNewFromTitleSelection",
"ZkNotes",
"ZkTags",
},
}, },
-- simple static markdown linking and link following using zettel IDs -- simple static markdown linking and link following using zettel IDs
{ "marty-oehme/zettelkasten.nvim", ft = writing_ft, event = "VeryLazy" }, { "marty-oehme/zettelkasten.nvim", ft = writing_ft, event = "VeryLazy" },