Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

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

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 :

- syntax highlighting

- 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 :

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

[] Add scriptsrc

[] aside

[] blockquote

[] bookmark

[x] categories

[] checklist

[x] code

[] comment

[] endarticle

[x] endcode

[] enddiv

[] endhtml

[] endpre

[] endresults

[] endscript

[] endsection

[] endtldr

[] footnote

[x] h1

[x] h2

[x] h3

[x] h4

[x] h5

[x] h6

[x] html

[] hr

[] image

[x] list

[x] metadata

[] nav

[] note

[x] notes

[] olist

[x] p

[] pre

[] startarticle

[x] startcode

[] startcss

[] startdiv

[] starthtml

[] startpre

[] startresults

[] startscript

[] startsection

[] starttldr

[] subtitle

[x] title

[x] todo

[] vimeo

[] warning

[] warnings

[] youtube

Next Phase