diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-05-19 23:27:57 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-05-19 23:27:57 +0800 |
commit | ffd076d2c434d6c850dd1a05a19ff477c2a29023 (patch) | |
tree | 0447642465482a7c882f2328545fd00dc407ee72 /vim/kickstarter.lua | |
parent | 2ba442a9426700e9b3c8338419c9cbbb89b46adc (diff) |
Update
Diffstat (limited to 'vim/kickstarter.lua')
-rw-r--r-- | vim/kickstarter.lua | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/vim/kickstarter.lua b/vim/kickstarter.lua index e4b6238..1805fa2 100644 --- a/vim/kickstarter.lua +++ b/vim/kickstarter.lua | |||
@@ -193,9 +193,27 @@ require('lazy').setup({ | |||
193 | end, | 193 | end, |
194 | opts = { buffer = true, expr = true }, | 194 | opts = { buffer = true, expr = true }, |
195 | } | 195 | } |
196 | } | 196 | }, |
197 | |||
198 | -- see below for full list of options 👇 | 197 | -- see below for full list of options 👇 |
198 | note_id_func = function(title) | ||
199 | return title | ||
200 | -- Create note IDs in a Zettelkasten format with a timestamp and a suffix. | ||
201 | -- In this case a note with the title 'My new note' will be given an ID that looks | ||
202 | -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md' | ||
203 | -- local suffix = "" | ||
204 | -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() | ||
205 | -- if title ~= nil and title ~= "" then | ||
206 | -- -- If title is given, transform it into valid file name. | ||
207 | -- suffix = "-" .. title | ||
208 | -- else | ||
209 | -- -- If title is nil, just add 4 random uppercase letters to the suffix. | ||
210 | -- for _ = 1, 4 do | ||
211 | -- suffix = suffix .. string.char(math.random(65, 90)) | ||
212 | -- end | ||
213 | -- suffix = "-" .. title | ||
214 | -- end | ||
215 | -- return tostring(os.time()) .. suffix | ||
216 | end, | ||
199 | }, | 217 | }, |
200 | }, | 218 | }, |
201 | 219 | ||
@@ -470,6 +488,8 @@ vim.cmd('nmap <C-/> V<C-/>') | |||
470 | vim.keymap.set('n', "<leader>oo", ':Obsidian') | 488 | vim.keymap.set('n', "<leader>oo", ':Obsidian') |
471 | vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>') | 489 | vim.keymap.set('n', "<leader>ot", ':ObsidianTags<CR>') |
472 | vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>') | 490 | vim.keymap.set('n', "<leader>os", ':ObsidianSearch<CR>') |
491 | vim.keymap.set('n', "<leader>oq", ':ObsidianQuickSwitch<CR>') | ||
492 | vim.keymap.set('v', "<leader>on", ':ObsidianLinkNew<CR>') | ||
473 | 493 | ||
474 | -- [[ Configure Telescope ]] | 494 | -- [[ Configure Telescope ]] |
475 | -- See `:help telescope` and `:help telescope.setup()` | 495 | -- See `:help telescope` and `:help telescope.setup()` |
@@ -509,7 +529,7 @@ require('telescope').setup { | |||
509 | -- Display symbols as <root>.<parent>.<symbol> | 529 | -- Display symbols as <root>.<parent>.<symbol> |
510 | show_nesting = { | 530 | show_nesting = { |
511 | ["_"] = false, -- This key will be the default | 531 | ["_"] = false, -- This key will be the default |
512 | json = true, -- You can set the option for specific filetypes | 532 | json = true, -- You can set the option for specific filetypes |
513 | yaml = true, | 533 | yaml = true, |
514 | }, | 534 | }, |
515 | }, | 535 | }, |