From 7756703feb73c87455b0764b0497cd920f1ea5e6 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 1 Oct 2024 14:21:31 +0200 Subject: [PATCH] nvim: adding obsidian plugin --- nvim/lua/user/lazy.lua | 3 +++ nvim/lua/user/plugins/misc/obsidian.lua | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 nvim/lua/user/plugins/misc/obsidian.lua diff --git a/nvim/lua/user/lazy.lua b/nvim/lua/user/lazy.lua index 9ab5dca..4f60163 100644 --- a/nvim/lua/user/lazy.lua +++ b/nvim/lua/user/lazy.lua @@ -19,6 +19,9 @@ require("lazy").setup({ spec = { { import = "user.plugins" }, + -- Misc + { import = "user.plugins.misc.obsidian" }, + -- Language specific { import = "user.plugins.lang.lua" }, { import = "user.plugins.lang.bash" }, diff --git a/nvim/lua/user/plugins/misc/obsidian.lua b/nvim/lua/user/plugins/misc/obsidian.lua new file mode 100644 index 0000000..d5f785f --- /dev/null +++ b/nvim/lua/user/plugins/misc/obsidian.lua @@ -0,0 +1,25 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + 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" + -- -- refer to `:h file-pattern` for more examples + -- "BufReadPre path/to/my-vault/*.md", + -- "BufNewFile path/to/my-vault/*.md", + -- }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "main", + path = "~/obsidian", + } + }, + }, +}