3 ms·
The SQL editor is a really cool open source library called AvalonEdit. It has it's own lexer (for syntax highlighting) and you just describe the terminals via r
by anakic 12y ago
The SQL editor is a really cool open source library called AvalonEdit. It has it's own lexer (for syntax highlighting) and you just describe the terminals via regex and tell it what formatting to apply to each terminal.
As for code completion, it's quite rudimentary currently, it doesn't know anything about SQL, it just offers all schemas/tables/columns and filters them as you type. The SQLite dialect of SQL is really well documented and I'm currently working on implementing an LL(*) parser for it's grammar, so I can improve autocomplete and the editor with support for:
- keywords
- aliases (while handing alias scopes)
- sub-query columns
- only applicable columns in the select list, only tables in the from list, etc...
- error squigglies
Also, the parser would make it easy to implement auto-formatting.
It's quite a fun feature to implement, but alas it's currently low priority so I don't expect to have it working in the next month or two.
Antonio