The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

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

TODO: Pull subtitle into page object

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:

A screenshot of a text document with the title Neopolitan Syntax Highlighting at the top. The background is a dark gray. The majority of the text is white with difference sections showing computer code that's highlighted in multiple colors

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 `~/.config/nvim/after/plugin`` that points to the repos `plugin/after/plugin/execute_code_block.lua

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

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

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. 



-- h2

Introduciton

<<link|Neopolitan|/neopolitan/>> is the plain-text format I 
designed to manage website content. This page is the documentation 
for an accompaning <<link|tree-sitter|https://tree-sitter.github.io/tree-sitter/>>
plugin. 

The plugin offers two features:

-- olist

- syntax highlighting

- inline code block execution

-- h2

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:

-- image
-- neopolitan-treesitter-highlighting

A screenshot of a text document with the title 
Neopolitan Syntax Highlighting at the top. The background 
is a dark gray. The majority of the text is white with
difference sections showing computer code that's
highlighted in multiple colors 

-- p

-- h2

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:

-- youtube
-- fWsoSG0Q2-8


-- h2

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 
`~/.config/nvim/after/plugin`` that points to
the repos `plugin/after/plugin/execute_code_block.lua


-- h2

The Repo

The repo is here if you're interested:

<<link|tree-sitter-neopolitan|https://github.com/alanwsmith/tree-sitter-neopolitan>>



-- h3

Progress Report

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

-- todo

[] Add scriptsrc

[] <<link|aside|/pages/neo-sections-aside--2sicsw5n/index.html>> 

[] <<link|blockquote|/pages/neo-sections-blockquote--2rzx0ncy/index.html>> 

[] <<link|bookmark|/pages/neo-sections-bookmark--2tsbpmdz/index.html>>

[x] <<link|categories|/pages/neo-sections-categories--2tsgeqiy/index.html>>

[] <<link|checklist|/pages/neo-sections-checklist--2tr5lyeh/index.html>>

[x] <<link|code|/pages/neo-sections-code--2trnbldk/index.html>>

[] comment

[] <<link|endarticle|/pages/neo-sections-endarticle--2tr3drgp/index.html>>

[x] <<link|endcode|/pages/neo-sections-endcode--2tn5kwz9/index.html>>

[] <<link|enddiv|/pages/neo-sections-enddiv--2tpqrbsp/index.html>>

[] <<link|endhtml|/pages/neo-sections-endhtml--2tr5llpd/index.html>>

[] <<link|endpre|/pages/neo-sections-endpre--2tr664ap/index.html>>

[] <<link|endresults|/pages/neo-sections-endresults--2tprkzhl/index.html>>

[] <<link|endscript|/pages/neo-sections-endscript--2tr8b9h8/index.html>>

[] <<link|endsection|/pages/neo-sections-endsection--2tr6uxfs/index.html>>

[] <<link|endtldr|/pages/neo-sections-endtldr--2tr72dq3/index.html>>

[] <<link|footnote|/pages/neo-sections-footnote--2virnqft/index.html>>

[x] <<link|h1|/pages/neo-sections-h1--2sz6vak9/index.html>>

[x] <<link|h2|/pages/neo-sections-h2--2tp5urmb/index.html>>

[x] <<link|h3|/pages/neo-sections-h3--2tp7w6hz/index.html>>

[x] <<link|h4|/pages/neo-sections-h4--2tp7gpkz/index.html>>

[x] <<link|h5|/pages/neo-sections-h5--2tp7mhex/index.html>>

[x] <<link|h6|/pages/neo-sections-h6--2tp7sfd3/index.html>>

[x] <<link|html|/pages/neo-sections-html--2trp8m8x/index.html>>

[] <<link|hr|/pages/neo-sections-hr--2twvjkjl/index.html>>

[] <<link|image|/pages/neo-sections-image--2syvoutz/index.html>>

[x] <<link|list|/pages/neo-sections-list--2sze3ncf/index.html>>

[x] <<link|metadata|/pages/neo-sections-metadata--2tsmqaax/index.html>>

[] <<link|nav|/pages/neo-sections-nav--2tsdz44g/index.html>>

[] <<link|note|/pages/neo-sections-note--2trdttvb/index.html>>

[x] <<link|notes|/pages/neo-sections-notes--2trihs8p/index.html>>

[] <<link|olist|/pages/neo-sections-olist--2trivoq5/index.html>>

[x] <<link|p|/pages/neo-sections-p--2rzk16vp/index.html>>

[] <<link|pre|/pages/neo-sections-pre--2trq5wcf/index.html>>

[] <<link|startarticle|/pages/neo-sections-startarticle--2ts5mvue/index.html>>

[x] <<link|startcode|/pages/neo-sections-startcode--2tpdkwoy/index.html>>

[] <<link|startcss|/pages/neo-sections-startcss--2tgglxrh/index.html>>

[] <<link|startdiv|/pages/neo-sections-startdiv--2tprnuuo/index.html>>

[] <<link|starthtml|/pages/neo-sections-starthtml--2ts4spxy/index.html>>

[] <<link|startpre|/pages/neo-sections-startpre--2ts4lom6/index.html>>

[] <<link|startresults|/pages/neo-sections-startresults--2tpsbfwo/index.html>>

[] <<link|startscript|/pages/neo-sections-startscript--2ts3xkez/index.html>>

[] <<link|startsection|/pages/neo-sections-startsection--2ts6fb3r/index.html>>

[] <<link|starttldr|/pages/neo-sections-starttldr--2ts9mwb0/index.html>>

[] <<link|subtitle|/pages/neo-sections-subtitle--2tsbab2q/index.html>>

[x] <<link|title|/pages/neo-sections-title--2rzkdxwm/index.html>>

[x] <<link|todo|/pages/neo-sections-todo--2sjqce8e/index.html>>

[] <<link|vimeo|/pages/neo-sections-vimeo--2trgakh0/index.html>>

[] <<link|warning|/pages/neo-sections-warning--2trbuyrd/index.html>>

[] <<link|warnings|/pages/neo-sections-warnings--2trdbi6a/index.html>>

[] <<link|youtube|/pages/neo-sections-youtube--2tpwwvsz/index.html>>


-- h2

Next Phase

-- list 

- audio

- blurb

- canvas

- data

- details

- dlist

- ext (external process)

- groups

- head

- images

- include

- iref

- menu

- object

- ref

- table

- tabs

- textarea

- widget


-- categories
-- Neopolitan 
-- Tree-Sitter


-- metadata
-- date: 2023-10-15 04:12:29
-- id: 2wn9begs
-- site: aws
-- type: post
-- status: published
-- path: /tree-sitter-neopolitan