elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[Console Monaco migration] Add highlighting for SQL #180214

Open yuliacech opened 3 months ago

yuliacech commented 3 months ago

After implementing lexer rules and input theme for console language in the monaco editor https://github.com/elastic/kibana/pull/178757, there is still missing highlighting for SQL that is working in Ace. To see the highlighting using following input

GET _sql
{
  "query": """
  SELECT "field" FROM "index-*" WHERE "column" = "value"
  """
}

There is already support for SQL in packages/kbn-monaco/src/sql but it's currently not possible to "share" lexer rules and themes between separate languages in Monaco. We could import the rules and theme colors similar to how we handle json support in the console language (see xjson rules in packages/kbn-monaco/src/console/lexer_rules).

elasticmachine commented 3 months ago

Pinging @elastic/kibana-management (Team:Kibana Management)