Working with Obsidian and Neovim is a great experience. Combining the note-taking prowess of Obsidian with the editing power of Neovim.

Configuration

First I had to install the Obsidian plugin for Neovim my plugin manager of choice lazy.nvim by adding the following file to my ~/.config/nvim/plugin directory.

-- ~/.config/nvim/plugin/obsidian.lua
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"
  --   "BufReadPre path/to/my-vault/**.md",
  --   "BufNewFile path/to/my-vault/**.md",
  -- },
  dependencies = {
    -- Required.
    "nvim-lua/plenary.nvim",
  },
  opts = {
    workspaces = {
      {
        name = "personal",
        path = "~/obsidian-vault",
      },
    },
 
  },
  keys = {
    { "<leader>sO", ":ObsidianSearch<CR>", desc = "Search in Obsidian" },
  },
}

Usage

This plugins add markdown syntax highlighting to Obsidian files and, managing the frontmatter of the notes. It also adds a :ObsidianSearch command alongside multiple other commands.

So now enjoy 🥳 making your second brain with the power of Neovim.