diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index 729f4ac..39a84a3 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -1,4 +1,4 @@ -if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE +-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE -- AstroCore provides a central place to modify mappings, vim options, autocommands, and more! -- Configuration documentation can be found with `:h astrocore` @@ -76,6 +76,29 @@ return { desc = "Close buffer from tabline", }, + ["nz"] = { + function() + function Scandir(directory) + local i, t, popen = 0, {}, io.popen + local pfile = popen('ls -A "' .. directory .. '"') + for filename in pfile:lines() do + i = i + 1 + t[i] = '"' .. filename .. '"' + end + pfile:close() + return t + end + local ZK_DIR = os.getenv "ZK_NOTEBOOK_DIR" or "~/Desktop/notebooks/slipbox" + ZK_DIR = ZK_DIR .. "/.zk/templates" + local Template_List = Scandir(ZK_DIR) + vim.ui.select( + Template_List, + { prompt = "Template:" }, + function(str) vim.cmd("ZkNew {title = vim.fn.input('Title: '), template = " .. str .. "}") end + ) + end, + desc = "New zk slip", + }, -- tables with just a `desc` key will be registered with which-key if it's installed -- this is useful for naming menus -- ["b"] = { desc = "Buffers" }, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add new file mode 100644 index 0000000..7b9e5ed --- /dev/null +++ b/spell/en.utf-8.add @@ -0,0 +1,4 @@ +slipbox +i've +memphis +we're diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl new file mode 100644 index 0000000..d796cce Binary files /dev/null and b/spell/en.utf-8.add.spl differ