sql_language_server.py 973 B

12345678910111213141516171819202122232425262728293031323334
  1. from .config import load_config_schema
  2. from .utils import NodeModuleSpec
  3. class SQLLanguageServer(NodeModuleSpec):
  4. """Supports mysql, postgres and sqlite3"""
  5. node_module = key = "sql-language-server"
  6. script = ["dist", "bin", "cli.js"]
  7. languages = [
  8. "sql",
  9. ]
  10. args = ["up", "--method", "stdio"]
  11. spec = dict(
  12. display_name=key,
  13. mime_types=[
  14. "application/sql",
  15. "text/sql",
  16. "text/x-sql",
  17. "text/x-mysql",
  18. "text/x-mariadb",
  19. "text/x-pgsql",
  20. ],
  21. urls=dict(
  22. home="https://github.com/joe-re/{}".format(key),
  23. issues="https://github.com/joe-re/{}/issues".format(key),
  24. ),
  25. install=dict(
  26. npm="npm install --save-dev {}".format(key),
  27. yarn="yarn add --dev {}".format(key),
  28. jlpm="jlpm add --dev {}".format(key),
  29. ),
  30. config_schema=load_config_schema(key),
  31. )