obsidian-lsp

Crates.ioobsidian-lsp
lib.rsobsidian-lsp
version0.1.0
created_at2025-09-01 13:25:56.852321+00
updated_at2025-09-01 13:25:56.852321+00
descriptionLanguage Server Protocol (LSP) implementation for Obsidian markdown files
homepage
repositoryhttps://github.com/vincent-uden/obsidian-lsp
max_upload_size
id1819598
size200,406
Vincent Uden (vincent-uden)

documentation

README

Obsidian LSP

A Language Server Protocol (LSP) implementation for Obsidian markdown files, providing features like go-to-definition, references, completion, and more for enhanced editing experience in editors like Neovim.

Installation

Via Cargo (crates.io)

cargo install obsidian-lsp

From Source

git clone https://github.com/vincent-uden/obsidian-lsp
cd obsidian-lsp
cargo build --release

Features

Roadmap

  • Rename links -> rename files and all other links
  • Go to definition (or declaration)
    • Link -> Navigate to the file
  • References
    • Link -> Show all other links to the same file
    • Tag -> Show all other places where the tag is used
  • Completion
    • Links
    • Tags
    • Properties
  • Document symbols
  • Hover
  • Code actions?
    • Align table
    • More?
  • New daily notes
  • Create note from template

Development setup (neovim 0.11+)

Create a file for the lsp configuration at nvim/lsp/obsidian.lua. It should contain:

return {
  cmd = { 'path/to/repo/obsidian-lsp/target/debug/obsidian-lsp' },
  filetypes = { 'markdown', 'md' },
  root_markers = { '.obsidian-marker' },
}

Modify the path with backslahes on Windows.

Then, in init.lua add

vim.lsp.config('obsidian', {})

and optionally a keybinding to restart the lsp

vim.keymap.set('n', '<leader>m', function()
  vim.lsp.enable('obsidian', false)
  vim.lsp.enable('obsidian', true)
end, { desc = 'Restart obsidian lsp' })
Commit count: 0

cargo fmt