Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/euro20179/treesitter-mmfml
dont like the name, then too bad
https://github.com/euro20179/treesitter-mmfml
Last synced: 7 days ago
JSON representation
dont like the name, then too bad
- Host: GitHub
- URL: https://github.com/euro20179/treesitter-mmfml
- Owner: Euro20179
- Created: 2024-11-20T23:11:32.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-20T16:27:01.000Z (17 days ago)
- Last Synced: 2024-12-20T17:33:15.265Z (17 days ago)
- Language: JavaScript
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mmfml
Awesome Lists containing this project
README
= mmfml
`mmfml` stands for:
my markup format markup languageIf you dont like the name then uh, too bad.
===============================================================================
= But what's the point
I like a hodgepodge of random markup format syntax.
So i decided to make a simple grammar for the syntax i like,
that's what this ~disasterous~ *absolutely wonderful* markup language is for.-------------------------------------------------------------------------------
== A rant about markdown
In my personal opinion,
markdown can get quite awful to read when there's nothing to render it nicely.
I want this format to be readable when there's no renderer.This is also why I'm using this language for the readme file.
It should look fine even though github won't have a renderer for it== The flaw with mmfml
As a side note, this format pretty heavily relies on monospace font, so uh yeah
But the user can just set their font if it's not monospace :)
===============================================================================
= Building
== Requirements
- [tree-sitter-cli]
|https://tree-sitter.github.io/tree-sitter/creating-parsers#dependencies|== Downloading + Building
>sh
git clone https://github.com/euro20179/treesitter-mmfml
cd treesitter-mmfml
make
tree-sitter generate
<== Using in neovim
I just use something like
>lua
-- see: https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#adding-parsers
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()parser_config.mmfml = {
install_info = {
url = "/path/to/cloned-directory",
files = { "src/parser.c", "src/scanner.c" },
branch = "master",
generate_requires_npm = false,
requires_generate_from_grammar = false
},
filetype = "mmfml"
}--i dont have this in my config, but the above docs say to use it
vim.treesitter.language.register('mmfml', 'mmfml')
<Don't forget to also add
>lua
--see `:help vim.filetype.add()`
vim.filetype.add({
extention = {
mmfml = "mmfml"
}
})
<I also have an [ftplugin]
|https://github.com/Euro20179/.files/blob/master/.config/nvim/after/ftplugin/mmfml.lua|
that adds a couple of commands and shortcuts.===============================================================================
= Future plans
- It might be nice to have a fallback `.vim` syntax highlighting file.
In case I end up in vim or something idk.- I don't plan on supporting tables until i find a table syntax i like.
At the moment i dont like any table syntax,
they are all too clunky to work with in a simple way- Math notation of some kind (though using `>bc` might be plenty fine)
- Maybe when i find math notation i like
i'll also make a hodgepodge math markup language- If there's anything else I feel I can't represent, i'll probably add it