Skip to content

ompugao/patto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

523 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
    Anchored text  #anchor

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

Links & Tasks

[other note]                     Link to note
[note#anchor]                    Link to the anchored line in note
[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

Content embeddings

[@img http://example.com/img "image alt"]    Remote image
[@img ./local-image.png "image alt"]         Local image (must use ./ prefix)
[@embed https://www.youtube.com/watch?v=dQw4w9WgXcQ Youtube Alt]
[@embed https://twitter.com/... Tweet]
[@embed https://speakerdeck.com/... Slide]
[@embed ./document.pdf PDF Title]            Local PDF embedding (must use ./ prefix)
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', {})        -- browser preview (optional)
  vim.lsp.config('patto_preview_tui', {})    -- terminal preview live sync (optional)
  vim.lsp.enable({'patto_lsp', 'patto_preview', 'patto_preview_tui'})
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

See docs/advanced-usage.md for detailed documentation on:

  • Task management
  • Markdown import / export
  • Zotero integration
  • Terminal preview (patto-preview-tui) — keybindings, editor integration, image protocols
  • Google Calendar sync

Recent Updates

v0.4.2 - patto-preview-tui enhancements: math rendering via typst, text wrapping, TCP LSP backend, extensible editor integration with Neovim viewport sync, tui-widget-list for backlinks panel; PDF embedding via @embed ./file.pdf; @embed/@img syntax unification with LSP diagnostics (local paths now require ./ prefix) v0.4.1 - Add TUI previewer v0.4.0 - Rewrite the previewer, improving its latency and stability of real-time previewing v0.3.1 - Add markdown import support, nested quotes, anchor renaming, and fix tab indentation handling 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