Skip to content
/ patto Public

🪽 A simple plain-text format for quick note-taking, outlining, and task management, powered by language server. Alternative to Workflowy with your favorite text editor.

Notifications You must be signed in to change notification settings

ompugao/patto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patto Note 🪽

A simple plain-text format for note-taking, outlining, and task management. Inspired by Cosense/Scrapbox, powered by LSP.

patto_logo

demo.gif

What is Patto?

A line-oriented text format where newlines create lines and tabs create nesting. Perfect for:

  • 📝 Quick outlining and note-taking
  • ✅ Task management with deadlines
  • 🔗 Zettelkasten-style linked notes

Features

  • Wiki-style links [note name] with backlinks and 2-hop visualization
  • Tasks with deadlines: !2024-12-31 or {@task due=2024-12-31} (sorted by Overdue, Today, This Week)
  • Real-time preview and LSP-powered autocomplete
  • Works with Vim, Neovim, VS Code

Syntax

Basic

Plain text
	Tab to nest
		Tab twice for deeper nesting

[* bold]  [/ italic]  [` code `]

Links & Tasks

[other note]                     Link to note
[note#anchor]                    Link to section
[https://example.com Title]     External link

!2024-12-31    Todo with deadline
*2024-12-31    In progress
-2024-12-31    Done

Blocks

[@code python]
	print("hello")

[@quote]
	Quoted text

[@table]
	header	col1	col2
	row1	a	b

[@math]
    \sum_{n=0}^{10} = 55
See full rendered example rendered-example

Installation

Install with cargo:

cargo install patto

Or download from: GitHub Releases

Editor Setup

Neovim (nvim-lspconfig)
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/nvim-cmp'
Plug 'ompugao/patto'

lua << EOF
  require('patto')
  vim.lsp.config('patto_lsp', {})
  vim.lsp.config('patto_preview', {})
  vim.lsp.enable({'patto_lsp', 'patto_preview'})
EOF
Vim (vim-lsp)
Plug 'prabirshrestha/vim-lsp'
Plug 'ompugao/patto', {'for': 'patto'}
VS Code

Install from VS Marketplace

Usage

  1. Create a .pn file
  2. Type [ for link completion, @ for blocks
  3. Use :LspPattoTasks to view all tasks (Vim/Neovim)

Advanced

Task Management

tasks

Commands: :LspPattoTasks or :Trouble patto_tasks (trouble.nvim)

Markdown Import

$ patto-markdown-importer -f note.md -o note.pn
$ patto-markdown-importer -d path/to/markdown_dir -o path/to/patto_dir  # batch mode

Markdown Export

$ patto-markdown-renderer -f note.pn -o note.md
$ patto-markdown-renderer -f note.pn --flavor obsidian  # autodetect [[wikilinks]]
$ patto-markdown-renderer -f note.pn --flavor github

Zotero Integration

Build with --features zotero (enabled by default) and configure ~/.config/patto/patto-lsp.toml:

[zotero]
user_id = "1234567"
api_key = "your_key"
endpoint = "http://127.0.0.1:23119/api/" # for communication with zotero on localhost
FAQ & Tips

Why not Markdown? Different parsers behave inconsistently (e.g., code fences in lists work in GitHub but not Obsidian).

  • item
  • print('hello')
  • item3

Templates? Use your editor's snippet engine (LuaSnip, vim-vsnip, etc.)

CLI task search:

rg --vimgrep '.*@task.*todo' . | \
  awk '{match($0, /due=([0-9:\-T]+)/, m); print (RLENGTH>0 ? m[1] : "9999-99-99"), $0}' | \
  sort | cut -d' ' -f2-

Recent Updates

v0.3.0 - Complete Markdown export overhaul with 72 new tests
v0.2.10 - Bump nextjs v0.2.9 - Minor fix v0.2.8 - Zotero integration
v0.2.7 - Real-time preview without saving
v0.2.6 - Enhanced diagnostic messages, Improved neovim integration

v0.2.5 - Comprehensive tests for lsp server added

v0.2.4 - Lsp Renaming Support v0.2.3 - Minor fix of vscode extension v0.2.2 - VS Code extension, semantic highlighting
v0.2.0 - Repository system, LSP scanning, trouble.nvim integration

Remaining Todos

About

🪽 A simple plain-text format for quick note-taking, outlining, and task management, powered by language server. Alternative to Workflowy with your favorite text editor.

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •