A community fork of the Neovim plugin for writing and navigating Obsidian vaults, written in Lua, created by epwalsh.
Built for people who love the concept of Obsidian -- a simple, markdown-based notes app -- but love Neovim too much to stand typing characters into anything else.
This plugin is not meant to replace Obsidian, but to complement it. The Obsidian app comes with a mobile app and has a lot of functionality that's not feasible to implement in Neovim, such as the graph explorer view. That said, this plugin stands on its own as well. You don't necessarily need to use it alongside the Obsidian app.
The original project has not been actively maintained for quite a while and with the ever-changing Neovim ecosystem, new widely used tools such as blink.cmp or snacks.picker were not supported.
With bugs, issues and pull requests piling up, people from the community decided to fork and maintain the project.
:Obsidian help or :Obsidian helpgrep, which is the most accurate and versioned documentation of your local install.▶️ Completion: Ultra-fast, asynchronous autocompletion for note references and tags via nvim-cmp or blink.cmp (triggered by typing [[ for wiki links, [ for markdown links, or # for tags)
🏃 Navigation: Navigate throughout your vault via links, backlinks, tags and etc.
📷 Images: Paste images into notes.
📈 Status: See note status in footer like obsidian app.
smart_action, bind to <CR> will:nav_link, bind to [o and ]o will navigate cursor to next valid link in the buffer.For other available actions and remapping default ones, see Keymaps
There's one entry point user command for this plugin: Obsidian
Obsidian<CR> (<enter>) to select sub commands.Obsidian <Tab> to get completion for sub commands.:Obsidian dailies [OFFSET ...] - open a picker list of daily notes:Obsidian dailies -2 1 to list daily notes from 2 days ago until tomorrow:Obsidian help - find files in the help wiki:Obsidian helpgrep - grep files in the help wiki:Obsidian new [TITLE] - create a new note:Obsidian open [QUERY] - open a note in the Obsidian app:Obsidian today [OFFSET] - open/create a new daily note:Obsidian today -1 to go to yesterday's note.:Obsidian yesterday and :Obsidian tomorrow this command does not differentiate between weekdays and weekends:Obsidian tomorrow - open/create the daily note for the next working day:Obsidian yesterday - open/create the daily note for the previous working day:Obsidian new_from_template [TITLE] [TEMPLATE] - create a new note with TITLE from a template with the name TEMPLATE:Obsidian quick_switch - switch to another note in your vault, searching by its name with a picker:Obsidian search [QUERY] - search for (or create) notes in your vault using ripgrep with your preferred picker:Obsidian tags [TAG ...] - get a picker list of all occurrences of the given tags:Obsidian workspace [NAME] - switch to another workspace:Obsidian backlinks - get a picker list of references to the current notegrr/vim.lsp.buf.references to see references in quickfix list:Obsidian follow_link [STRATEGY] - follow a note reference under the cursorvsplit, hsplit, vsplit_force, hsplit_force:Obsidian toc - get a picker list of table of contents for current note:Obsidian template [NAME] - insert a template from the templates folder, selecting from a list using your preferred picker
:Obsidian links - get a picker list of all links in current note:Obsidian paste_img [IMGNAME] - paste an image from the clipboard into the note at the cursor position by saving it to the vault and adding a markdown image link
:Obsidian rename [NEWNAME] - rename the note of the current buffer or reference under the cursor, updating all backlinks across the vault:wa before renaming, and loads every note with backlinks into your buffer-list:wa again for changes to take effectvim.lsp.buf.rename or use grn:Obsidian toggle_checkbox - cycle through checkbox options:Obsidian extract_note [TITLE] - extract the visually selected text into a new note and link to it:Obsidian link [QUERY] - link an inline visual selection of text to a note:Obsidian link_new [TITLE] - create a new note and link it to an inline visual selection of textripgrepThere's no required dependency, but there are a number of optional dependencies that enhance the obsidian.nvim experience.
Completion:
Pickers:
Image viewing:
Syntax highlighting:
See syntax highlighting for more details.
[!WARNING] For stability you may want to use latest release, be aware that the README on
mainmay reference features that haven't been released yet.So view the README on the tag for the latest release instead of
main.
[!TIP] To see your installation status, run
:checkhealth obsidianTo try out or debug this plugin, run
nvim -u minimal.luato try in a clean environment
lazy.nvimreturn {
"obsidian-nvim/obsidian.nvim",
version = "*", -- use latest release, remove to use latest commit
ft = "markdown",
---@module 'obsidian'
---@type obsidian.config
opts = {
legacy_commands = false, -- this will be removed in the next major release
workspaces = {
{
name = "personal",
path = "~/vaults/personal",
},
{
name = "work",
path = "~/vaults/work",
},
},
},
}
rocks.nvim:Rocks install obsidian.nvim
vim.pack (nvim-0.12+)vim.pack.add {
{
src = "https://github.com/obsidian-nvim/obsidian.nvim",
version = vim.version.range "*", -- use latest release, remove to use latest commit
},
}
To configure obsidian.nvim, pass your custom options that are different from default options to require"obsidian".setup().
Please read the CONTRIBUTING guide before submitting a pull request.
We would like to thank epwalsh for creating this beautiful plugin. If you're feeling especially generous, he still appreciates some coffee funds!.