From 11209de3b5f768a646d6ac38f1790f75853dfc09 Mon Sep 17 00:00:00 2001 From: pro100ton Date: Fri, 15 Nov 2024 09:39:21 +0300 Subject: [PATCH] Add obsidian nvim plugin --- init.lua | 1 + lua/t0xa/core/keybindings.lua | 3 +++ lua/t0xa/core/options.lua | 3 +++ lua/t0xa/plugins/obsidian.lua | 23 +++++++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 lua/t0xa/core/keybindings.lua create mode 100644 lua/t0xa/plugins/obsidian.lua diff --git a/init.lua b/init.lua index 04f1b13..314a563 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ -- Omitting `lua` directory, because neovim autmaticaly serching in it require("t0xa.core.options") +require("t0xa.core.keybindings") require("t0xa.lazy") diff --git a/lua/t0xa/core/keybindings.lua b/lua/t0xa/core/keybindings.lua new file mode 100644 index 0000000..1ac3d0a --- /dev/null +++ b/lua/t0xa/core/keybindings.lua @@ -0,0 +1,3 @@ +-- Obsidian-related keybinds +vim.keymap.set("n", "oit", "ObsidianTemplate", { silent = true, noremap = true, desc="Obsidian: insert template" }) +vim.keymap.set("n", "oo", "ObsidianQuickSwitch", { silent = true, noremap = true, desc="Obsidian: open file" }) diff --git a/lua/t0xa/core/options.lua b/lua/t0xa/core/options.lua index 0f79ee2..7653077 100644 --- a/lua/t0xa/core/options.lua +++ b/lua/t0xa/core/options.lua @@ -38,3 +38,6 @@ opt.swapfile = false -- Add line at 88 symbols opt.colorcolumn = "88" + +-- Obsidian setting fot concealing charachters +opt.conceallevel = 0 diff --git a/lua/t0xa/plugins/obsidian.lua b/lua/t0xa/plugins/obsidian.lua new file mode 100644 index 0000000..c845f73 --- /dev/null +++ b/lua/t0xa/plugins/obsidian.lua @@ -0,0 +1,23 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", -- recommended, use latest release instead of latest commit + lazy = true, + ft = "markdown", + dependencies = { + -- Required. + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/Documents/t0xa_vault/", + }, + }, + templates = { + folder = "Templates" + }, + -- disable adding properties on top of file on save + disable_frontmatter = true, + }, +}