holistics / dbml

Database Markup Language (DBML), designed to define and document database structures
https://dbml.org
Apache License 2.0
2.81k stars 166 forks source link

DBML tree-sitter grammar #119

Open saskenuba opened 4 years ago

saskenuba commented 4 years ago

Hello! I am translating the grammar of dbml to be used by the tree-sitter parser.

You can check its development here: https://github.com/saskenuba/tree-sitter-dbml

For those who don't know, tree-sitter is a parser generation tool and an incremental parsing library. Once it's ready, we can effectively create bindings for any text editor that supports tree-sitter, such as Atom, Emacs with emacs-tree-sitter, allowing us to have syntax highlighting and semantic auto-completion.

Editing dbml schemas on text editors will surely help popularize dbml outside the web creator! Thanks.

saskenuba commented 4 years ago

I am also working on a language server that adheres to the Microsoft LSP Protocol. I started working on it because I prefer to write stuff offline, but online visualization is great!

For those who don't know, LSP is a tool that aims to provide coding assist tools, such as renaming, code completion, goto definitions to any editor or IDE that are compatible with LSP (generally through bindings).

Currently, the DBML server only provides semantic completion, but hopefully, renaming and definitions are to come soon.

Repo for those who are interested: https://github.com/saskenuba/dbml-language-server