Postgres Language Server: JS + TS Template Literal Support #16286
Unanswered
karlhorky
asked this question in
Feature Requests
Replies: 1 comment 2 replies
-
sounds great @karlhorky - the support for this will largely depend on the code editor you're using. For example, here are the docs for VSCode: https://code.visualstudio.com/api/references/vscode-api#languages. It's up to the code editor to "guess" which language is defined, and then choose the appropriate Language Editor. So this should be solved once we make progress on the language server. FYI - the language server is here in case you want to discuss in a more relevant location :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there 👋 First of all, thanks for all of the effort that Supabase is putting into the PostgreSQL community, including tooling, really amazing 🙌
I recently encountered Postgres Language Server via the recent tweet from @kiwicopple and it looks amazing!
I have been chasing the "holy grail" of tooling for SQL template literals in JavaScript + TypeScript for a while now:
prettier-plugin-embed
andprettier-plugin-sql
- usessql-formatter
eslint-plugin-sql
andeslint-plugin-unicorn
, but very opinionated / not so configurable - usespg-formatter
@potygen/prettier-plugin-pgsql
by @ivank - uses custom Prettier AST formatterWasn't even looking for inline documentation yet, but that's a great addition too!
It seems that the plan will be for Postgres Language Server to support all of these use cases, which is amazing!
I would love to have everything handled by one highly-battle-tested tool, which could maybe also deal with some of the shortcomings from the tools listed above.
However, for Postgres Language Server to work for any of our projects, it would need a feature which I'm not sure it currently has (can't tell, from a quick glance at the docs and the code):
There is precedent for SQL tagged template literals in JS+TS, some of the more popular ones being:
@vercel/postgres
Eg. I would love for all of the features of Postgres Language Server to be available in the following code block:
Or this code block:
Beta Was this translation helpful? Give feedback.
All reactions