Hi everyone, I am new to the community, want to write a PostgreSQL syntax highlighting package, but was wondering if Atom allows multi line highlighting…Sublime 3 has this but I wasn’t able to figure out how to do it, hopefully I have better luck with Atom
Naive as the question may be, but isn’t the SQL syntax highlighting enough?
Hi there, umm it could be, but the current SQL syntax is not highlighting words like CREATE TEMP TABLE, DISTRIBUTED BY, and I want to highlight table names in the future as well, so the SQL package currently does not do these things…
Sounds like maybe this would be a good candidate for a PR or feature request on the language-sql repository, actually.
I could imagine this being helpful for other SQL variants, and adding their specific reserved words?
Sometimes the differences in SQL can be big enough that you can’t realistically use one language file. I know that language-tsql was created recently and I contributed a fix to it for string syntax highlighting. T-SQL doesn’t use \ as an escape character. It also doesn’t use # for comments. language-sql is a good basic SQL package, but trying to handle advanced highlighting for specific versions of SQL under one project would easily become unmanageable.
That makes sense.
The last time I wrote any functional SQL was many years ago in Oracle, since then I am happy just writing queries.
Hi Nalin, do you know if we could do multi line highlighting?
I do not know enough about .tmLanguage files to answer that, sorry. Maybe once .sublime-syntax is finished Atom could add support for it.
@kevinzzz007 I might be able to answer your question if you can be a little more description in what you mean by “multi-line syntax highlighting”? If you mean a single rule that stretches across multiple lines, yes, the Atom grammar system (like the Sublime and TextMate grammar systems it mimics) supports creating some kinds of multi-line rules. Syntax highlighting of multi-line comments is just one example.