aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-12-06 21:18:17 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-12-06 21:18:17 +0800
commitf90a7b44c867fe5fe02ae2a478f4411bb58004ff (patch)
treee6c320179f1e74092ef41be045cacbe447087590
parent71b4064c2ab055734dad3eb795f1e076603d58a1 (diff)
vim: Disable obsidian plugin
-rw-r--r--vim/mini.lua172
1 files changed, 86 insertions, 86 deletions
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({
882 -- end, 882 -- end,
883 -- }, 883 -- },
884 -- --}}} 884 -- --}}}
885 -- Markdown: obsidian {{{ 885-- -- Markdown: obsidian {{{
886 { 886-- {
887 "epwalsh/obsidian.nvim", 887-- "epwalsh/obsidian.nvim",
888 version = "*", -- recommended, use latest release instead of latest commit 888-- version = "*", -- recommended, use latest release instead of latest commit
889 lazy = false, 889-- lazy = false,
890 ft = "markdown", 890-- ft = "markdown",
891 -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: 891-- -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
892 -- event = { 892-- -- event = {
893 -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. 893-- -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
894 -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" 894-- -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
895 -- "BufReadPre path/to/my-vault/**.md", 895-- -- "BufReadPre path/to/my-vault/**.md",
896 -- "BufNewFile path/to/my-vault/**.md", 896-- -- "BufNewFile path/to/my-vault/**.md",
897 -- }, 897-- -- },
898 dependencies = { 898-- dependencies = {
899 -- Required. 899-- -- Required.
900 "nvim-lua/plenary.nvim", 900-- "nvim-lua/plenary.nvim",
901 }, 901-- },
902 config = function() 902-- config = function()
903 vim.keymap.set("n", "<leader>oo", ":Obsidian", {}) 903-- vim.keymap.set("n", "<leader>oo", ":Obsidian", {})
904 vim.keymap.set("n", "<leader>ot", ":ObsidianTags<CR>", {}) 904-- vim.keymap.set("n", "<leader>ot", ":ObsidianTags<CR>", {})
905 vim.keymap.set("n", "<leader>os", ":ObsidianSearch<CR>", {}) 905-- vim.keymap.set("n", "<leader>os", ":ObsidianSearch<CR>", {})
906 vim.keymap.set("n", "<leader>oq", ":ObsidianQuickSwitch<CR>", {}) 906-- vim.keymap.set("n", "<leader>oq", ":ObsidianQuickSwitch<CR>", {})
907 vim.keymap.set("v", "<leader>on", ":ObsidianLinkNew<CR>", {}) 907-- vim.keymap.set("v", "<leader>on", ":ObsidianLinkNew<CR>", {})
908 vim.keymap.set("n", "<leader>ol", ":ObsidianLinks<CR>", {}) 908-- vim.keymap.set("n", "<leader>ol", ":ObsidianLinks<CR>", {})
909 require("obsidian").setup({ 909-- require("obsidian").setup({
910 disable_frontmatter = true, 910-- disable_frontmatter = true,
911 workspaces = { 911-- workspaces = {
912 { 912-- {
913 name = "log", 913-- name = "log",
914 path = "~/log", 914-- path = "~/log",
915 }, 915-- },
916 }, 916-- },
917 completion = { 917-- completion = {
918 -- Set to false to disable completion. 918-- -- Set to false to disable completion.
919 nvim_cmp = true, 919-- nvim_cmp = true,
920 -- Trigger completion at 2 chars. 920-- -- Trigger completion at 2 chars.
921 min_chars = 2, 921-- min_chars = 2,
922 }, 922-- },
923 mapping = { 923-- mapping = {
924 -- Toggle check-boxes. 924-- -- Toggle check-boxes.
925 ["<leader>oc"] = { 925-- ["<leader>oc"] = {
926 action = function() 926-- action = function()
927 return require("obsidian").util.toggle_checkbox() 927-- return require("obsidian").util.toggle_checkbox()
928 end, 928-- end,
929 opts = { buffer = true }, 929-- opts = { buffer = true },
930 }, 930-- },
931 -- Smart action depending on context, either follow link or toggle checkbox. 931-- -- Smart action depending on context, either follow link or toggle checkbox.
932 ["<cr>"] = { 932-- ["<cr>"] = {
933 action = function() 933-- action = function()
934 return require("obsidian").util.smart_action() 934-- return require("obsidian").util.smart_action()
935 end, 935-- end,
936 opts = { buffer = true, expr = true }, 936-- opts = { buffer = true, expr = true },
937 }, 937-- },
938 }, 938-- },
939 -- see below for full list of options 👇 939-- -- see below for full list of options 👇
940 note_id_func = function(title) 940-- note_id_func = function(title)
941 return title 941-- return title
942 -- Create note IDs in a Zettelkasten format with a timestamp and a suffix. 942-- -- Create note IDs in a Zettelkasten format with a timestamp and a suffix.
943 -- In this case a note with the title 'My new note' will be given an ID that looks 943-- -- In this case a note with the title 'My new note' will be given an ID that looks
944 -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md' 944-- -- like '1657296016-my-new-note', and therefore the file name '1657296016-my-new-note.md'
945 -- local suffix = "" 945-- -- local suffix = ""
946 -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() 946-- -- title = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
947 -- if title ~= nil and title ~= "" then 947-- -- if title ~= nil and title ~= "" then
948 -- -- If title is given, transform it into valid file name. 948-- -- -- If title is given, transform it into valid file name.
949 -- suffix = "-" .. title 949-- -- suffix = "-" .. title
950 -- else 950-- -- else
951 -- -- If title is nil, just add 4 random uppercase letters to the suffix. 951-- -- -- If title is nil, just add 4 random uppercase letters to the suffix.
952 -- for _ = 1, 4 do 952-- -- for _ = 1, 4 do
953 -- suffix = suffix .. string.char(math.random(65, 90)) 953-- -- suffix = suffix .. string.char(math.random(65, 90))
954 -- end 954-- -- end
955 -- suffix = "-" .. title 955-- -- suffix = "-" .. title
956 -- end 956-- -- end
957 -- return tostring(os.time()) .. suffix 957-- -- return tostring(os.time()) .. suffix
958 end, 958-- end,
959 -- Optional, for templates (see below). 959-- -- Optional, for templates (see below).
960 templates = { 960-- templates = {
961 folder = "templates", 961-- folder = "templates",
962 date_format = "%Y-%m-%d", 962-- date_format = "%Y-%m-%d",
963 time_format = "%H:%M", 963-- time_format = "%H:%M",
964 -- A map for custom variables, the key should be the variable and the value a function 964-- -- A map for custom variables, the key should be the variable and the value a function
965 substitutions = {}, 965-- substitutions = {},
966 }, 966-- },
967 }) 967-- })
968 end, 968-- end,
969 }, 969-- },
970 -- }}} 970-- -- }}}
971 -- Markdown: preview {{{ 971 -- Markdown: preview {{{
972 { 972 {
973 "iamcco/markdown-preview.nvim", 973 "iamcco/markdown-preview.nvim",