#lsp #markdown #visual-studio-code #language-server #language #server

bin+lib zeta-note

Markdown LSP server for easy note-taking with cross-references and diagnostics

1 unstable release

0.1.8 Mar 26, 2022

#10 in #vscode

Custom license

1MB
2K SLoC

Zeta Note

Delightful note taking in markdown...

Build & Test

OBLIGATORY DISCLAIMER: Zeta Note is a work-in-progress. For me it works fine, but there wasn't much testing and stability in general isn't guaranteed.


Zeta Note is a language server that helps you write and manage notes. The primary focus is to support Zettelkasten-like1, 2 note taking by providing an easy way to cross-reference notes (see more about features below).

But you don't have to go all-in on Zettelkasten method to benefit from Zeta Note:

  1. Write your notes that way you like.

  2. Cross-reference notes using reference links:

    • [:another-note] - a reference to another note.
    • [:another-note@##Subsection] - a reference to a subsection of a note.
    • [:@##Inner subsection] - a reference to a subsection of the current note.

    Auto-completion provided by Zeta Note makes this process quick and easy.

  3. Go To Definition, Hover preview, Code Lenses, and Diagnostics simplify navigating and maintaining notes.

Existing editor integrations3:

How to install

Option 1: use pre-built binary

  1. Go to Releases page: each release has pre-built binaries for Linux, MacOS, and Windows. Download the binary for your OS.
  2. Rename the binary and make it executable:
    • MacOS: mv zeta-note-macos zeta-note && chmod +x zeta-note
    • Linux: mv zeta-note-linux zeta-note && chmod +x zeta-note
    • Windows: rename zeta-note-windows.exe to zeta-note.exe.
  3. Place the binary somewhere in your PATH.
    • XDG recommends using $HOME/.local/bin/ (make sure this folder is in your PATH).

Option 2: build from source

  1. Install Rust and Cargo via rustup.
  2. Clone the repository: git clone https://github.com/artempyanykh/zeta-note.git
  3. Inside zeta-note folder run cargo install --path .
  4. The binary will be installed under $HOME/.cargo/bin (make sure this folder is in your PATH).

Screenshots

  • Hover preview: Hover
  • Completion (note): Completion for note
  • Completion (heading): Completion for heading
  • "Show References" Code Lens: Show references code lens
  • Project-wide diagnostics for broken references: Diagnostics

Features and plans

✅ - done; 🗓 - planned.

  • ✅ Completion for references.
  • ✅ Go to Definition for references.
  • ✅ Hover prevew for references.
  • ✅ Diagnostics about broken references.
  • ✅ Code Lens with "# references" on headings.
  • ✅ Support references in titles.
  • ✅ Support multi-folder workspaces.
  • 🗓 Rename refactor.
  • 🗓 Support for Jupyter notebooks.
  • 🗓 Custom parser for more fine-grained note structure.
  • 🗓 Support heading slugs.
  • 🗓 Add "check" command for standalone workspace checking.
  • 🗓 Add "build" command that rewrites all cross-references into proper relative markdown links for further embedding into a static site generator such as Jekyll or Hakyll.
  • 🗓 Add support for regular links (diagnostics, completion, goto).
  • 🗓 Add support for images (diagnostics, completion, goto).

[1]: You may have heard about Roam Research. This is a commercial implementation of the Zettelkasten method and another point of reference for what Zeta Note is about. However, unlike a proprietary Roam Research, Zeta Note is free, open-source and integrated into your favourite editor (albeit for not not as feature rich as Roam Research).

[2]: There is an excellent VSCode extension called Markdown Memo. You definitely need to check it out if you're primarily using VSCode as it has some features that are missing in Zeta Note and Zeta Note VSCode extension. However, Markdown Memo is VSCode specific while Zeta Note is a generic language server, so can be used with any editor that has LSP support: Emacs, Vim, Neovim, etc.

[3]: Since Zeta Note is a regular Language Server most of the functionality works out of the box with any LSP client. The only thing that requires custom handling is "Code Lenses" due to how these are defined in LSP spec.

[4]: rust-analyzer was a huge source of inspiration for how to implement various parts of an LSP server in Rust. Thank you!

Dependencies

~15–24MB
~326K SLoC