sql-editor.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @ts-nocheck
  2. import { RegistryDefinations } from '../types'
  3. export const SQL_EDITOR_SHORTCUT_IDS = {
  4. SQL_EDITOR_BLUR_EDITOR: 'sql-editor.blur-editor',
  5. SQL_EDITOR_FOCUS_EDITOR: 'sql-editor.focus-editor',
  6. SQL_EDITOR_FORMAT: 'sql-editor.format',
  7. SQL_EDITOR_EXPLAIN: 'sql-editor.explain',
  8. SQL_EDITOR_NEW_SNIPPET: 'sql-editor.new-snippet',
  9. }
  10. export type SqlEditorShortcutId =
  11. (typeof SQL_EDITOR_SHORTCUT_IDS)[keyof typeof SQL_EDITOR_SHORTCUT_IDS]
  12. export const sqlEditorRegistry: RegistryDefinations<SqlEditorShortcutId> = {
  13. [SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_BLUR_EDITOR]: {
  14. id: SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_BLUR_EDITOR,
  15. label: 'Blur SQL editor',
  16. sequence: ['Escape'],
  17. showInSettings: false,
  18. },
  19. [SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_FOCUS_EDITOR]: {
  20. id: SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_FOCUS_EDITOR,
  21. label: 'Focus SQL editor',
  22. sequence: ['Shift+E'],
  23. showInSettings: false,
  24. },
  25. [SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_FORMAT]: {
  26. id: SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_FORMAT,
  27. label: 'Prettify SQL',
  28. sequence: ['Alt+Shift+F'],
  29. showInSettings: false,
  30. },
  31. [SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_EXPLAIN]: {
  32. id: SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_EXPLAIN,
  33. label: 'Run EXPLAIN ANALYZE',
  34. sequence: ['Mod+Shift+Enter'],
  35. showInSettings: false,
  36. },
  37. [SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_NEW_SNIPPET]: {
  38. id: SQL_EDITOR_SHORTCUT_IDS.SQL_EDITOR_NEW_SNIPPET,
  39. label: 'New SQL snippet',
  40. sequence: ['Shift+N'],
  41. showInSettings: false,
  42. },
  43. }