From e9f767903296a76739d15989d63c932691572ecd Mon Sep 17 00:00:00 2001 From: krolxon Date: Fri, 4 Jul 2025 11:09:36 +0530 Subject: [PATCH] add obsidian.nvim --- lazy-lock.json | 2 +- lua/chadrc.lua | 2 +- lua/options.lua | 1 + lua/plugins/init.lua | 13 ---------- lua/plugins/obsidian.lua | 54 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 15 deletions(-) create mode 100644 lua/plugins/obsidian.lua diff --git a/lazy-lock.json b/lazy-lock.json index a23831c..a25dd7b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,7 +11,6 @@ "conform.nvim": { "branch": "master", "commit": "a4bb5d6c4ae6f32ab13114e62e70669fa67745b9" }, "crates.nvim": { "branch": "main", "commit": "25f31372ab6f504d4fd7cfee836ad459caed8e68" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gemini.nvim": { "branch": "master", "commit": "c638a431a810e43951a8227684c3236bd2708b4a" }, "gitsigns.nvim": { "branch": "main", "commit": "8b729e489f1475615dc6c9737da917b3bc163605" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, @@ -27,6 +26,7 @@ "nvim-tree.lua": { "branch": "master", "commit": "25d16aab7d29ca940a9feb92e6bb734697417009" }, "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, + "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "overseer.nvim": { "branch": "master", "commit": "6271cab7ccc4ca840faa93f54440ffae3a3918bd" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "render-markdown.nvim": { "branch": "main", "commit": "76f7ce56ccb913632745714f160faa53164c5574" }, diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 2b4f565..713bbd0 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -2,7 +2,7 @@ local M = {} M.base46 = { - theme = "gruvbox", + theme = "tokyodark", theme_toggle = { "tokyodark", "tokyonight" }, } diff --git a/lua/options.lua b/lua/options.lua index 70c9f55..43fa417 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -6,3 +6,4 @@ o.shiftwidth = 4 o.relativenumber = true o.colorcolumn = "100" o.swapfile = false +vim.opt.conceallevel = 1 diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index c9c6916..b4c9a2e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -48,19 +48,6 @@ return { "ThePrimeagen/harpoon", }, - { - 'MeanderingProgrammer/render-markdown.nvim', - lazy = false, - dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons - ---@module 'render-markdown' - ---@type render.md.UserConfig - opts = { - render_modes = {'n', 'c', 't'} - }, - }, - { "Zeioth/compiler.nvim", cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..149516c --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,54 @@ +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 = { + -- Required. + "nvim-lua/plenary.nvim", + + -- see below for full list of optional dependencies 👇 + }, + opts = { + workspaces = { + { + name = "Brain", + path = "~/dox/brain", + overrides = { + disable_frontmatter = true, + } + }, + { + name = "no-vault", + path = function() + -- alternatively use the CWD: + -- return assert(vim.fn.getcwd()) + return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0))) + end, + overrides = { + notes_subdir = vim.NIL, -- have to use 'vim.NIL' instead of 'nil' + new_notes_location = "current_dir", + templates = { + folder = vim.NIL, + }, + disable_frontmatter = true, + }, + }, + }, + + templates = { + folder = "99 - Meta/Templates", + date_format = "%Y-%m-%d-%a", + time_format = "%H:%M", + }, + -- see below for full list of options 👇 + }, +}