Home

Neopolitan Tree-Sitter Parser, Syntax Highlighter, And Inline Code Runner

Warning

Head's up that this is still very much a "works on my machine" level project.

Introduciton

Neopolitan is the plain-text format I designed to manage website content. This page is the documentation for an accompaning tree-sitter plugin.

The plugin offers two features:

  1. syntax highlighting

  2. inline code block execution

Syntax Highlighting

Highlighting for the primary sections is in place. I don't use much highlighting for the core of the docs, but I've got code blocks set up to highlight properly for whatever language they are. Here's a sample:

My apologies. Alt text is currently offline. I'm working on an update to fix it.

Inline Code Block Execution

I've got a prototype Neovim plugin working that executes code blocks inside files and drops the output back into the file (similar to emacs org-mode). Here's what that looks like:

Usage

This code is still under initial development and I havent' looked up yet how to put things in place properly.

For now, I put the parser in place on my mac by editing:

~/Library/Application Support/tree-sitter/config.json

and add a "parsers-directories" array item that point to the local src tree (e.g.

/Users/alan/workshop/tree-sitter-neopolitan/src

For the plugin, I created a symbolic link in [TODO: Code shorthand span ] that points to the repos [TODO: Code shorthand span ]

The Repo

The repo is here if you're interested:

tree-sitter-neopolitan

Progress Report

This is the list of Neopolitan sections and which ones have been implement in the parser

Next Phase

~ fin ~