From f90a7b44c867fe5fe02ae2a478f4411bb58004ff Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 6 Dec 2024 13:18:17 +0000 Subject: vim: Disable obsidian plugin --- vim/mini.lua | 172 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 86 insertions(+), 86 deletions(-) (limited to 'vim/mini.lua') diff --git a/vim/mini.lua b/vim/mini.lua index 24d868b..05b71de 100644 --- a/vim/mini.lua +++ b/vim/mini.lua @@ -882,92 +882,92 @@ require("lazy").setup({ -- end, -- }, -- --}}} - -- Markdown: obsidian {{{ - { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = false, - ft = "markdown", - -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: - -- event = { - -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. - -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" - -- "BufReadPre path/to/my-vault/**.md", - -- "BufNewFile path/to/my-vault/**.md", - -- }, - dependencies = { - -- Required. - "nvim-lua/plenary.nvim", - }, - config = function() - vim.keymap.set("n", "oo", ":Obsidian", {}) - vim.keymap.set("n", "ot", ":ObsidianTags", {}) - vim.keymap.set("n", "os", ":ObsidianSearch", {}) - vim.keymap.set("n", "oq", ":ObsidianQuickSwitch", {}) - vim.keymap.set("v", "on", ":ObsidianLinkNew", {}) - vim.keymap.set("n", "ol", ":ObsidianLinks", {}) - require("obsidian").setup({ - disable_frontmatter = true, - workspaces = { - { - name = "log", - path = "~/log", - }, - }, - completion = { - -- Set to false to disable completion. - nvim_cmp = true, - -- Trigger completion at 2 chars. - min_chars = 2, - }, - mapping = { - -- Toggle check-boxes. - ["oc"] = { - action = function() - return require("obsidian").util.toggle_checkbox() - end, - opts = { buffer = true }, - }, - -- Smart action depending on context, either follow link or toggle checkbox. - [""] = { - action = function() - return require("obsidian").util.smart_action() - end, - opts = { buffer = true, expr = true }, - }, - }, - -- see below for full list of options 👇 - note_id_func = function(title) - return title - -- Create note IDs in a Zettelkasten format with a timestamp and a suffix. - -- In this case a note with the title 'My new note' will be given an ID that looks - -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md' - -- local suffix = "" - -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() - -- if title ~= nil and title ~= "" then - -- -- If title is given, transform it into valid file name. - -- suffix = "-" .. title - -- else - -- -- If title is nil, just add 4 random uppercase letters to the suffix. - -- for _ = 1, 4 do - -- suffix = suffix .. string.char(math.random(65, 90)) - -- end - -- suffix = "-" .. title - -- end - -- return tostring(os.time()) .. suffix - end, - -- Optional, for templates (see below). - templates = { - folder = "templates", - date_format = "%Y-%m-%d", - time_format = "%H:%M", - -- A map for custom variables, the key should be the variable and the value a function - substitutions = {}, - }, - }) - end, - }, - -- }}} +-- -- Markdown: obsidian {{{ +-- { +-- "epwalsh/obsidian.nvim", +-- version = "*", -- recommended, use latest release instead of latest commit +-- lazy = false, +-- ft = "markdown", +-- -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: +-- -- event = { +-- -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. +-- -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" +-- -- "BufReadPre path/to/my-vault/**.md", +-- -- "BufNewFile path/to/my-vault/**.md", +-- -- }, +-- dependencies = { +-- -- Required. +-- "nvim-lua/plenary.nvim", +-- }, +-- config = function() +-- vim.keymap.set("n", "oo", ":Obsidian", {}) +-- vim.keymap.set("n", "ot", ":ObsidianTags", {}) +-- vim.keymap.set("n", "os", ":ObsidianSearch", {}) +-- vim.keymap.set("n", "oq", ":ObsidianQuickSwitch", {}) +-- vim.keymap.set("v", "on", ":ObsidianLinkNew", {}) +-- vim.keymap.set("n", "ol", ":ObsidianLinks", {}) +-- require("obsidian").setup({ +-- disable_frontmatter = true, +-- workspaces = { +-- { +-- name = "log", +-- path = "~/log", +-- }, +-- }, +-- completion = { +-- -- Set to false to disable completion. +-- nvim_cmp = true, +-- -- Trigger completion at 2 chars. +-- min_chars = 2, +-- }, +-- mapping = { +-- -- Toggle check-boxes. +-- ["oc"] = { +-- action = function() +-- return require("obsidian").util.toggle_checkbox() +-- end, +-- opts = { buffer = true }, +-- }, +-- -- Smart action depending on context, either follow link or toggle checkbox. +-- [""] = { +-- action = function() +-- return require("obsidian").util.smart_action() +-- end, +-- opts = { buffer = true, expr = true }, +-- }, +-- }, +-- -- see below for full list of options 👇 +-- note_id_func = function(title) +-- return title +-- -- Create note IDs in a Zettelkasten format with a timestamp and a suffix. +-- -- In this case a note with the title 'My new note' will be given an ID that looks +-- -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md' +-- -- local suffix = "" +-- -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() +-- -- if title ~= nil and title ~= "" then +-- -- -- If title is given, transform it into valid file name. +-- -- suffix = "-" .. title +-- -- else +-- -- -- If title is nil, just add 4 random uppercase letters to the suffix. +-- -- for _ = 1, 4 do +-- -- suffix = suffix .. string.char(math.random(65, 90)) +-- -- end +-- -- suffix = "-" .. title +-- -- end +-- -- return tostring(os.time()) .. suffix +-- end, +-- -- Optional, for templates (see below). +-- templates = { +-- folder = "templates", +-- date_format = "%Y-%m-%d", +-- time_format = "%H:%M", +-- -- A map for custom variables, the key should be the variable and the value a function +-- substitutions = {}, +-- }, +-- }) +-- end, +-- }, +-- -- }}} -- Markdown: preview {{{ { "iamcco/markdown-preview.nvim", -- cgit v1.2.3-70-g09d2