set up zk properly
This commit is contained in:
parent
ff6ade0cec
commit
c5bc828d58
|
@ -38,7 +38,7 @@ M.mason_install = {
|
|||
"marksman",
|
||||
"markdownlint",
|
||||
"ruff-lsp",
|
||||
"rust-analyzer"
|
||||
"rust-analyzer",
|
||||
}
|
||||
|
||||
---@type Array<string>
|
||||
|
@ -160,6 +160,13 @@ M.lsp_setup = {
|
|||
end
|
||||
end)
|
||||
end,
|
||||
-- marksman = function()
|
||||
-- LazyVim.lsp.on_attach(function(client, _)
|
||||
-- if client.name == "marksman" then
|
||||
-- client.server_capabilities.hoverProvider = false
|
||||
-- end
|
||||
-- end)
|
||||
-- end,
|
||||
rust_analyzer = function()
|
||||
return true
|
||||
end,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
|
@ -17,4 +18,52 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"zk-org/zk-nvim",
|
||||
ft = { "markdown" },
|
||||
main = "zk",
|
||||
dependencies = {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
optional = true,
|
||||
opts = {
|
||||
defaults = {
|
||||
["<leader>z"] = { name = "+zk" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
picker = "telescope",
|
||||
lsp = {
|
||||
cmd = { "zk", "lsp" },
|
||||
name = "zk",
|
||||
config = {
|
||||
on_attach = function(client)
|
||||
if client.name == "zk" then
|
||||
require("zk").cd()
|
||||
end
|
||||
end,
|
||||
},
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
filetypes = { "markdown" },
|
||||
},
|
||||
},
|
||||
},
|
||||
--stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>zn", function() require("zk.commands").get("ZkNew")({ title = vim.fn.input('Title: ') }) end, desc = "New Note", mode = { "n", "v" } },
|
||||
{ "<leader>znt", function() require("zk.commands").get("ZkNewFromTitleSelection")() end, desc = "Title from selection", mode = { "v" } },
|
||||
{ "<leader>znc", function() require("zk.commands").get("ZkNewFromContentSelection")({ title = vim.fn.input('Title: ') }) end, desc = "Content from selection", mode = { "v" } },
|
||||
{ "<leader>zb", function() require("zk.commands").get("ZkBacklinks")() end, desc = "Links" },
|
||||
{ "<leader>zl", function() require("zk.commands").get("ZkLinks")() end, desc = "Backlinks" },
|
||||
{ "<leader>zx", function() require("zk.commands").get("ZkIndex")() end, desc = "Index" },
|
||||
{ "<leader>zf", function() require("zk.commands").get("ZkNotes")({ sort = { 'modified' } }) end, desc = "Find Notes" },
|
||||
{ "<leader>sz", function() require("zk.commands").get("ZkNotes")({ sort = { 'modified' } }) end, desc = "Notes" },
|
||||
{ "<leader>zt", function() require("zk.commands").get("ZkTags")() end, desc = "Find Note Tags" },
|
||||
{ "<leader>zf", function() require("zk.commands").get("ZkMatch")() end, desc = "Find Notes (Match Selection)", mode = { "v" } },
|
||||
{ "<leader>zi", function() require("zk.commands").get("ZkInsertLinkAtSelection")() end, desc = "Insert Link", mode = { "n", "v" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
[notebook]
|
||||
dir = "~/Documents/notes"
|
||||
|
||||
[note]
|
||||
language = "en"
|
||||
filename = "{{slug title}}-{{id}}"
|
||||
extension = "md"
|
||||
|
||||
[tool]
|
||||
fzf-preview = "glow -s '$XDG_CONFIG_HOME/glow/style.json' {-1}"
|
||||
|
|
|
@ -120,6 +120,7 @@ export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
|||
export PYTHONSTARTUP="/etc/python/pythonrc"
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
export XBPS_DISTDIR="$XDG_DOCUMENTS_DIR/dev/desktop/void-packages"
|
||||
export ZK_NOTEBOOK_DIR="$XDG_DOCUMENTS_DIR/notes"
|
||||
|
||||
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
|
||||
fpath=($XDG_CONFIG_HOME/zsh/completions $fpath)
|
||||
|
|
Loading…
Reference in New Issue