-
Notifications
You must be signed in to change notification settings - Fork 98
JS + TS Template Literal Support #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ended up creating a discussion over here instead, I guess that's where feature requests go: |
Reopened this issue because of the comment from @kiwicopple - if this is unwanted, feel free to transform this into a discussion under |
Oh, exciting, so this should "just work" out of the box and shouldn't need specific code in Postgres Language Server? That sounds great 🙌 I guess we can leave this open until it's far enough along for this! Excited to give this a shot as soon as it's ready (and then recommend to our students at upleveled.io) |
yup, this should "just work" depending on your code editor.
Let's close this one for now, until we find any actual bugs (Discussions are a better place for these long-running issues) |
Ok, opened a non-organization discussion in this repo here: |
Bug report
Describe the bug
Edit: Even though this may not be a bug, I reopened from the comment from @kiwicopple - if this is unwanted, feel free to transform this into a discussion under
supabase/postgres_lsp
discussionsNot sure if this is actually a bug, but it would be great to have support for all features in SQL inside JavaScript and TypeScript template literals
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:
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
SQL inside JavaScript and TypeScript template literals should also have all features of the language server
Screenshots
--
System information
Additional context
--
The text was updated successfully, but these errors were encountered: