Auto sync: 2025-08-15 17:33:40 (9 files changed)
M lazy-lock.json M lua/custom/chadrc.lua A lua/custom/git_quickpush.lua M lua/custom/init.lua M lua/custom/language_specific_commands/markdown.lua A lua/custom/zk.lua M lua/plugins/configs/nvimtree.lua A spell/en.utf-8.add
This commit is contained in:
parent
86aaac67ba
commit
25e82e23a0
@ -1,37 +1,36 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"auto-session": { "branch": "main", "commit": "9c3f977aafb56bd73ba0d082c4dcbdba5666faf3" },
|
||||
"LuaSnip": { "branch": "master", "commit": "3d5bced1b9ae69fa3f9b1942e28af5dbc537f946" },
|
||||
"auto-session": { "branch": "main", "commit": "c93a9bfd8a5cbf931a6ead5c824998da874b9f79" },
|
||||
"base46": { "branch": "v2.0", "commit": "85de6cdb2d3c85d0aee53aea0569e73fdaf3df4e" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" },
|
||||
"crates.nvim": { "branch": "main", "commit": "6bf1b4ceb62f205c903590ccc62061aafc17024a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
|
||||
"crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "b7aa0aed55887edfaece23f7b46ab22232fc8741" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||
"nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "84e0cd5a3c58e88ef706fdf4a1eed59ded1d3ce2" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "c09ff35de503a41fa62465c6b4ae72d96e7a7ce4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "2b0760dca2354fecf48ea35fdf1d753a232e3de2" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" },
|
||||
"mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "16597180b4dd81fa3d23d88c4d2f1b49154f9479" },
|
||||
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "177be29e7b9c084c9200ee4033eb66e04ac536ec" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "65bae449224b8a3bc149471b96587b23b13a9946" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" },
|
||||
"nvterm": { "branch": "main", "commit": "9d7ba3b6e368243175d38e1ec956e0476fd86ed9" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"tla.nvim": { "branch": "master", "commit": "1db3e7558066b89c391d20dbc99972023a176491" },
|
||||
"ui": { "branch": "v2.0", "commit": "7b3225264af17a9e0aff0b4fd2a0fac90b73db53" },
|
||||
"ui": { "branch": "v2.0", "commit": "d4f7e64892a24075d5fdd5a58bd0db45e86e38ed" },
|
||||
"vim-tla": { "branch": "master", "commit": "220145ef791ac8d64d2c319eb2940b59da17d6ca" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ M.ui = {
|
||||
hl_add = {},
|
||||
hl_override = {},
|
||||
changed_themes = {},
|
||||
theme_toggle = { "ayu_light", "one_light" },
|
||||
theme = "ayu_light", -- default theme
|
||||
theme_toggle = { "dark_horizon", "one_light" },
|
||||
theme = "dark_horizon", -- default theme
|
||||
transparency = false,
|
||||
lsp_semantic_tokens = false, -- needs nvim v0.9, just adds highlight groups for lsp semantic tokens
|
||||
|
||||
|
||||
134
lua/custom/git_quickpush.lua
Normal file
134
lua/custom/git_quickpush.lua
Normal file
@ -0,0 +1,134 @@
|
||||
-- git_quickpush.lua
|
||||
-- A tiny helper that stages all changes, auto-commits with a generated message,
|
||||
-- and pushes the current repo (based on Neovim's *current working directory*).
|
||||
--
|
||||
-- Commands:
|
||||
-- :GitQuickPush
|
||||
-- :GitQuickPush small fix to hub template
|
||||
--
|
||||
-- Keymap:
|
||||
-- <leader>gp
|
||||
|
||||
local M = {}
|
||||
|
||||
-- --- helpers ---------------------------------------------------------------
|
||||
|
||||
-- Run a command synchronously and get code/stdout/stderr
|
||||
local function run(cmd, cwd)
|
||||
-- Prefer Neovim 0.10+ API
|
||||
if vim.system then
|
||||
local res = vim.system(cmd, { cwd = cwd }):wait()
|
||||
return res.code or 0, (res.stdout or ""), (res.stderr or "")
|
||||
end
|
||||
-- Fallback for older Neovim
|
||||
local out = vim.fn.systemlist(table.concat(cmd, " "), cwd) -- not perfect quoting, but fine for git
|
||||
local code = vim.v.shell_error
|
||||
return code, table.concat(out or {}, "\n"), ""
|
||||
end
|
||||
|
||||
-- Find the git repo root from a given working directory (or cwd if nil).
|
||||
local function git_root(from_dir)
|
||||
local start = from_dir or vim.fn.getcwd()
|
||||
local code, out = run({ "git", "rev-parse", "--show-toplevel" }, start)
|
||||
if code ~= 0 or not out or out == "" then
|
||||
return nil
|
||||
end
|
||||
-- Trim trailing newline(s)
|
||||
out = out:gsub("%s+$", "")
|
||||
return out
|
||||
end
|
||||
|
||||
-- Build a commit message and a short preview of changes
|
||||
local function build_commit_message(repo, extra_words, preview_limit)
|
||||
preview_limit = preview_limit or 8
|
||||
local code, status = run({ "git", "status", "--porcelain" }, repo)
|
||||
local lines = {}
|
||||
if code == 0 and status and #status > 0 then
|
||||
for line in status:gmatch "[^\r\n]+" do
|
||||
table.insert(lines, line)
|
||||
end
|
||||
end
|
||||
local count = #lines
|
||||
local ts = os.date "%Y-%m-%d %H:%M:%S"
|
||||
local msg = string.format("Auto sync: %s (%d files changed)", ts, count)
|
||||
if extra_words and extra_words:match "%S" then
|
||||
msg = msg .. " — " .. extra_words
|
||||
end
|
||||
local preview = {}
|
||||
for i = 1, math.min(preview_limit, count) do
|
||||
preview[i] = lines[i]
|
||||
end
|
||||
return msg, preview, count
|
||||
end
|
||||
|
||||
-- --- main action -----------------------------------------------------------
|
||||
|
||||
local function quick_push(opts)
|
||||
-- 0) Resolve repo root from Neovim's *current* working directory
|
||||
local cwd = vim.fn.getcwd()
|
||||
local repo = git_root(cwd)
|
||||
if not repo then
|
||||
vim.notify("Not inside a git repository (cwd: " .. cwd .. ")", vim.log.levels.ERROR, { title = "Git Quick Push" })
|
||||
return
|
||||
end
|
||||
|
||||
-- 1) Stage everything
|
||||
do
|
||||
local code, _, err = run({ "git", "add", "-A" }, repo)
|
||||
if code ~= 0 then
|
||||
vim.notify("git add failed:\n" .. (err or ""), vim.log.levels.ERROR, { title = "Git Quick Push" })
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- 2) Compose commit message (+ optional words from :GitQuickPush args)
|
||||
local extra = table.concat(opts.fargs or {}, " ")
|
||||
local msg, preview, count = build_commit_message(repo, extra, 8)
|
||||
|
||||
-- 3) If there are changes, commit; otherwise skip straight to push
|
||||
if count > 0 then
|
||||
local args = { "git", "commit", "-m", msg }
|
||||
for _, p in ipairs(preview) do
|
||||
table.insert(args, "-m")
|
||||
table.insert(args, p)
|
||||
end
|
||||
local code, out, err = run(args, repo)
|
||||
if code ~= 0 then
|
||||
vim.notify(
|
||||
"git commit failed:\n" .. (err ~= "" and err or out),
|
||||
vim.log.levels.ERROR,
|
||||
{ title = "Git Quick Push" }
|
||||
)
|
||||
return
|
||||
end
|
||||
else
|
||||
vim.notify("No changes to commit; pushing anyway…", vim.log.levels.INFO, { title = "Git Quick Push" })
|
||||
end
|
||||
|
||||
-- 4) Push to the current branch’s upstream
|
||||
do
|
||||
local code, out, err = run({ "git", "push" }, repo)
|
||||
if code ~= 0 then
|
||||
vim.notify("git push failed:\n" .. (err ~= "" and err or out), vim.log.levels.ERROR, { title = "Git Quick Push" })
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- 5) Done
|
||||
local summary = (count > 0) and ("Committed & pushed:\n" .. msg) or "Pushed (no new commits)."
|
||||
vim.notify(summary, vim.log.levels.INFO, { title = "Git Quick Push" })
|
||||
end
|
||||
|
||||
-- --- public command & keymap ----------------------------------------------
|
||||
|
||||
-- :GitQuickPush [optional words...]
|
||||
vim.api.nvim_create_user_command(
|
||||
"GitQuickPush",
|
||||
quick_push,
|
||||
{ nargs = "*", desc = "Stage all, auto-commit, and push for the repo at current working directory" }
|
||||
)
|
||||
|
||||
-- Optional keymap
|
||||
vim.keymap.set("n", "<leader>gp", ":GitQuickPush<CR>", { desc = "Git: quick add+commit+push (cwd repo)" })
|
||||
|
||||
return M
|
||||
@ -4,4 +4,7 @@ vim.env.PATH = vim.env.PATH .. ":/home/danesabo/.ghcup/bin"
|
||||
vim.g.loaded_python3_provider = 1
|
||||
vim.g.python3_host_prog = vim.fn.expand "~/.config/nvim/nvim_venv/bin/python"
|
||||
vim.keymap.set("i", "jj", "<ESC>")
|
||||
|
||||
require "custom.zk"
|
||||
require "custom.git_quickpush"
|
||||
print "Custom init settings loaded."
|
||||
|
||||
@ -17,6 +17,9 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
vim.wo.conceallevel = 2
|
||||
-- and set it to conceal in normal and command modes
|
||||
vim.wo.concealcursor = "nc"
|
||||
-- wrap text at 80 chars and show a visual line guide
|
||||
vim.opt_local.textwidth = 60
|
||||
vim.opt_local.formatoptions:append "t"
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
267
lua/custom/zk.lua
Normal file
267
lua/custom/zk.lua
Normal file
@ -0,0 +1,267 @@
|
||||
-- === Zettelkasten helpers (custom.zk) ===
|
||||
-- Root + folder layout (with spaces, as requested)
|
||||
local zk_root = vim.fn.expand "~/Documents/Dane's Vault/Zettelkasten"
|
||||
local fleeting_dir = zk_root .. "/Fleeting Notes"
|
||||
local hub_dir = zk_root .. "/Hub Notes"
|
||||
local permanent_dir = zk_root .. "/Permanent Notes"
|
||||
local daily_dir = fleeting_dir .. "/Daily" -- assumption: dailies live under Fleeting Notes/Daily
|
||||
|
||||
-- ---------- utilities ----------
|
||||
local function slugify(s)
|
||||
s = (s or ""):lower()
|
||||
s = s
|
||||
:gsub("[^%w%s%-]", "") -- keep letters, digits, space, dash
|
||||
:gsub("%s+", "-") -- spaces -> dash
|
||||
:gsub("%-+", "-") -- collapse dashes
|
||||
:gsub("^%-", "")
|
||||
:gsub("%-$", "")
|
||||
return s
|
||||
end
|
||||
|
||||
local function iso_utc()
|
||||
return os.date "!%Y-%m-%dT%H:%M:%SZ"
|
||||
end
|
||||
local function ensure_dir(path)
|
||||
vim.fn.mkdir(path, "p")
|
||||
end
|
||||
local function starts_with(s, prefix)
|
||||
return s:sub(1, #prefix) == prefix
|
||||
end
|
||||
|
||||
-- ---------- front-matter: update `modified:` on save ----------
|
||||
local function update_modified_in_buffer()
|
||||
local api, buf = vim.api, vim.api.nvim_get_current_buf()
|
||||
local path = vim.fn.expand "%:p"
|
||||
|
||||
-- Only touch Markdown in your ZK root
|
||||
if vim.bo[buf].filetype ~= "markdown" and not path:lower():match "%.md$" then
|
||||
return
|
||||
end
|
||||
if not starts_with(path, zk_root) then
|
||||
return
|
||||
end
|
||||
|
||||
local lines = api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
if #lines < 1 or lines[1] ~= "---" then
|
||||
return
|
||||
end
|
||||
|
||||
-- find closing '---'
|
||||
local fm_end
|
||||
for i = 2, math.min(#lines, 200) do
|
||||
if lines[i] == "---" then
|
||||
fm_end = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if not fm_end then
|
||||
return
|
||||
end
|
||||
|
||||
-- find or insert modified:
|
||||
local modified_idx
|
||||
for i = 2, fm_end - 1 do
|
||||
if lines[i]:match "^modified:%s" then
|
||||
modified_idx = i
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local now = "modified: " .. iso_utc()
|
||||
if modified_idx then
|
||||
if lines[modified_idx] ~= now then
|
||||
lines[modified_idx] = now
|
||||
api.nvim_buf_set_lines(buf, 0, -1, false, lines)
|
||||
end
|
||||
else
|
||||
table.insert(lines, fm_end, now)
|
||||
api.nvim_buf_set_lines(buf, 0, -1, false, lines)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.md",
|
||||
callback = update_modified_in_buffer,
|
||||
desc = "ZK: auto-update YAML modified: on save",
|
||||
})
|
||||
|
||||
-- ---------- create file helper ----------
|
||||
local function write_if_missing(path, lines)
|
||||
if vim.fn.filereadable(path) == 0 then
|
||||
local fh = io.open(path, "w")
|
||||
if not fh then
|
||||
vim.notify("Failed to create file at " .. path, vim.log.levels.ERROR)
|
||||
return false
|
||||
end
|
||||
fh:write(table.concat(lines, "\n"))
|
||||
fh:close()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- ---------- :ZkNewPermanent ----------
|
||||
local function new_permanent_note(opts)
|
||||
local title = table.concat(opts.fargs or {}, " ")
|
||||
if title == "" then
|
||||
title = vim.fn.input "Permanent note title: "
|
||||
end
|
||||
if not title or title == "" then
|
||||
vim.notify("Aborted: empty title.", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
local id = os.date "%Y%m%d%H%M%S"
|
||||
local slug = slugify(title)
|
||||
local filename = string.format("%s-%s.md", id, slug)
|
||||
|
||||
ensure_dir(permanent_dir)
|
||||
local path = permanent_dir .. "/" .. filename
|
||||
|
||||
local created = iso_utc()
|
||||
local ok = write_if_missing(path, {
|
||||
"---",
|
||||
"id: " .. id,
|
||||
"title: " .. title,
|
||||
"type: permanent",
|
||||
"created: " .. created,
|
||||
"modified: " .. created,
|
||||
"tags: []",
|
||||
"---",
|
||||
"",
|
||||
"# " .. title,
|
||||
"",
|
||||
})
|
||||
if ok then
|
||||
vim.cmd.edit(path)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
"ZkNewPermanent",
|
||||
new_permanent_note,
|
||||
{ nargs = "*", desc = "Create a new permanent ZK note and open it" }
|
||||
)
|
||||
|
||||
-- ---------- :ZkNewDaily ----------
|
||||
-- Opens today's daily note if it exists; otherwise creates it (under Fleeting Notes/Daily).
|
||||
local function new_daily_note()
|
||||
local today = os.date "%Y-%m-%d"
|
||||
local title = "Daily — " .. today
|
||||
local fname = today .. ".md"
|
||||
|
||||
ensure_dir(daily_dir)
|
||||
local path = daily_dir .. "/" .. fname
|
||||
|
||||
local created = iso_utc()
|
||||
local ok = write_if_missing(path, {
|
||||
"---",
|
||||
"id: " .. today, -- simple id for dailies
|
||||
"title: " .. title,
|
||||
"type: daily",
|
||||
"created: " .. created,
|
||||
"modified: " .. created,
|
||||
"tags: [daily]",
|
||||
"---",
|
||||
"",
|
||||
"# " .. title,
|
||||
"",
|
||||
"## Quick capture",
|
||||
"",
|
||||
"- ",
|
||||
"",
|
||||
"## Tasks",
|
||||
"",
|
||||
"- [ ] ",
|
||||
"",
|
||||
"## Notes",
|
||||
"",
|
||||
})
|
||||
if ok then
|
||||
vim.cmd.edit(path)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("ZkNewDaily", new_daily_note, { desc = "Open or create today's ZK daily note" })
|
||||
|
||||
-- ---------- :ZkNewHub ----------
|
||||
-- Hub/Structure note (MOC): great as an index/overview for a topic or project.
|
||||
-- File naming: HUB-YYYYMMDDHHMMSS-<slug>.md (easy to spot + sortable)
|
||||
local function new_hub_note(opts)
|
||||
local title = table.concat(opts.fargs or {}, " ")
|
||||
if title == "" then
|
||||
title = vim.fn.input "Hub note title: "
|
||||
end
|
||||
if not title or title == "" then
|
||||
vim.notify("Aborted: empty title.", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
local id = "HUB-" .. os.date "%Y%m%d%H%M%S"
|
||||
local slug = slugify(title)
|
||||
local filename = string.format("%s-%s.md", id, slug)
|
||||
|
||||
ensure_dir(hub_dir)
|
||||
local path = hub_dir .. "/" .. filename
|
||||
|
||||
local created = iso_utc()
|
||||
-- A practical hub template: overview, TOC, backlinks/related, and open questions.
|
||||
local ok = write_if_missing(path, {
|
||||
"---",
|
||||
"id: " .. id,
|
||||
"title: " .. title,
|
||||
"type: hub",
|
||||
"created: " .. created,
|
||||
"modified: " .. created,
|
||||
"tags: [hub]",
|
||||
"aliases: []",
|
||||
"---",
|
||||
"",
|
||||
"# " .. title,
|
||||
"",
|
||||
"> Brief purpose/definition of this hub.",
|
||||
"",
|
||||
"## Overview",
|
||||
"",
|
||||
"- ",
|
||||
"",
|
||||
"## Contents (map of notes)",
|
||||
"",
|
||||
"- [[ ]] ",
|
||||
"- [[ ]] ",
|
||||
"- [[ ]] ",
|
||||
"",
|
||||
"## Permanent seeds (key ideas)",
|
||||
"",
|
||||
"- [[ ]] ",
|
||||
"",
|
||||
"## Related hubs",
|
||||
"",
|
||||
"- [[ ]] ",
|
||||
"",
|
||||
"## Sources / Literature",
|
||||
"",
|
||||
"- ",
|
||||
"",
|
||||
"## Open questions / Next actions",
|
||||
"",
|
||||
"- [ ] ",
|
||||
"",
|
||||
})
|
||||
if ok then
|
||||
vim.cmd.edit(path)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
"ZkNewHub",
|
||||
new_hub_note,
|
||||
{ nargs = "*", desc = "Create a new hub (structure) note and open it" }
|
||||
)
|
||||
|
||||
-- ---------- keymaps ----------
|
||||
-- <leader>zn : new permanent
|
||||
-- <leader>zd : today's daily
|
||||
-- <leader>zh : new hub
|
||||
vim.keymap.set("n", "<leader>zn", ":ZkNewPermanent ", { desc = "ZK: New permanent note" })
|
||||
vim.keymap.set("n", "<leader>zd", ":ZkNewDaily<CR>", { desc = "ZK: Open/create today's daily" })
|
||||
vim.keymap.set("n", "<leader>zh", ":ZkNewHub ", { desc = "ZK: New hub (structure) note" })
|
||||
@ -15,11 +15,11 @@ local options = {
|
||||
view = {
|
||||
adaptive_size = false,
|
||||
side = "left",
|
||||
width = 30,
|
||||
width = 40,
|
||||
preserve_window_proportions = true,
|
||||
},
|
||||
git = {
|
||||
enable = false,
|
||||
enable = true,
|
||||
ignore = true,
|
||||
},
|
||||
filesystem_watchers = {
|
||||
@ -44,7 +44,7 @@ local options = {
|
||||
file = true,
|
||||
folder = true,
|
||||
folder_arrow = true,
|
||||
git = false,
|
||||
git = true,
|
||||
},
|
||||
|
||||
glyphs = {
|
||||
|
||||
1
spell/en.utf-8.add
Normal file
1
spell/en.utf-8.add
Normal file
@ -0,0 +1 @@
|
||||
advisor
|
||||
BIN
spell/en.utf-8.add.spl
Normal file
BIN
spell/en.utf-8.add.spl
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user