diff --git a/flake.lock b/flake.lock index 93d44c7..7ea2ec8 100644 --- a/flake.lock +++ b/flake.lock @@ -550,6 +550,22 @@ "type": "github" } }, + "obsidian-nvim": { + "flake": false, + "locked": { + "lastModified": 1722536347, + "narHash": "sha256-mbq7fAPmlwOAbWlN3lGX9WGBKTV8cAPZx8pnRCyszJc=", + "owner": "epwalsh", + "repo": "obsidian.nvim", + "rev": "14e0427bef6c55da0d63f9a313fd9941be3a2479", + "type": "github" + }, + "original": { + "owner": "epwalsh", + "repo": "obsidian.nvim", + "type": "github" + } + }, "octo": { "flake": false, "locked": { @@ -657,6 +673,7 @@ "nvim-treesitter-endwise": "nvim-treesitter-endwise", "nvim-treesitter-just": "nvim-treesitter-just", "nvim-web-devicons": "nvim-web-devicons", + "obsidian-nvim": "obsidian-nvim", "octo": "octo", "plenary": "plenary", "pre-commit-hooks": "pre-commit-hooks", diff --git a/flake.nix b/flake.nix index 9ea89de..75adf00 100644 --- a/flake.nix +++ b/flake.nix @@ -137,18 +137,22 @@ url = "github:nvim-tree/nvim-web-devicons"; flake = false; }; - octo = { - url = "github:pwntester/octo.nvim"; + obsidian-nvim = { + url = "github:epwalsh/obsidian.nvim"; flake = false; }; - render-markdown = { - url = "github:MeanderingProgrammer/render-markdown.nvim"; + octo = { + url = "github:pwntester/octo.nvim"; flake = false; }; plenary = { url = "github:nvim-lua/plenary.nvim"; flake = false; }; + render-markdown = { + url = "github:MeanderingProgrammer/render-markdown.nvim"; + flake = false; + }; rustacean = { url = "github:mrcjkb/rustaceanvim"; flake = false; diff --git a/lib/lua/init.lua b/lib/lua/init.lua index 3b5daed..67b3405 100644 --- a/lib/lua/init.lua +++ b/lib/lua/init.lua @@ -107,6 +107,7 @@ M.finish = function() vim.opt.splitkeep = "screen" vim.opt.tabstop = 2 vim.opt.termguicolors = true + vim.opt.conceallevel = 2 -- Set custom filetypes for some specific files vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { diff --git a/plugins/default.nix b/plugins/default.nix index 5d907ac..ed69deb 100644 --- a/plugins/default.nix +++ b/plugins/default.nix @@ -85,6 +85,7 @@ symlinkJoin rec { (importPlugin ./neo-tree) (importPlugin ./neogit) (importPlugin ./nvim-web-devicons) + (importPlugin ./obsidian) (importPlugin ./octo) (importPlugin ./render-markdown) (importPlugin ./rustacean) diff --git a/plugins/obsidian/configuration.lua b/plugins/obsidian/configuration.lua new file mode 100644 index 0000000..24396a5 --- /dev/null +++ b/plugins/obsidian/configuration.lua @@ -0,0 +1,9 @@ +require("obsidian").setup({ + notes_subdir = "notes", + workspaces = { + { + name = "personal", + path = "~/Notes", + }, + }, +}) diff --git a/plugins/obsidian/default.nix b/plugins/obsidian/default.nix new file mode 100644 index 0000000..bf3d32b --- /dev/null +++ b/plugins/obsidian/default.nix @@ -0,0 +1,21 @@ +{ + inputs, + mkPlugin, + ... +}: +let + inherit (builtins) readFile; +in +mkPlugin { + name = "obsidian-nvim"; + src = inputs.obsidian-nvim; + + depends = [ + "cmp" + "treesitter" + "plenary" + "telescope" + ]; + + config = readFile ./configuration.lua; +} diff --git a/plugins/treesitter/configuration.lua b/plugins/treesitter/configuration.lua index a0be573..dc7dfa6 100644 --- a/plugins/treesitter/configuration.lua +++ b/plugins/treesitter/configuration.lua @@ -32,7 +32,6 @@ require("nvim-treesitter.configs").setup({ "vimdoc", "yaml", }, - sync_install = false, auto_install = true, highlight = { enable = true },