thebearingedge / vscode-sql-lit Goto Github PK
View Code? Open in Web Editor NEW๐จ Syntax highlighting for SQL template literals.
Home Page: https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit
License: MIT License
๐จ Syntax highlighting for SQL template literals.
Home Page: https://marketplace.visualstudio.com/items?itemName=thebearingedge.vscode-sql-lit
License: MIT License
We connect to multiple databases, and so sometimes import multiple database objects under different names:
import db from 'src/db'
import herokuDB from 'src/herokuDB'
await db.sql`SELECT 1`
await herokuDB.sql`SELECT 1`
...
This extension works fine with db.sql
, but with any other module name, such as herokuDB.sql
, JS syntax highlighting breaks after end of the template literal.
How do I import the sql
command is it from another package or what. I'm a bit lost on how to use it and how it can return back the typed value.
It would be nice to provide support for deno-postgres.
Not sure how, but it would be dope.
Hey, I've found a small issue when highlighting sql with multiline generic types:
as you can see, in testFailing
the query is not highlighted (colored as string). This is because the begin
span spans multiple lines.
code:
export function testWorking() {
return sql<{ value: number }>`SELECT 1 AS "value"`;
}
export function testFailing() {
return sql<{ value: number }
>`SELECT 1 AS "value"`;
}
Hi! Awesome plugin. I was setting up slonik
on a project and noticed that the highlighting doesn't work when I use slonik
's sql.type
with a custom inline zod
schema.
Highlights:
const schema = z.object({ num: z.number() });
sql.type(schema)`
SELECT 1 as num
`;
Doesn't highlight:
sql.type(z.object({ num: z.number() }))`
SELECT 1 as num
`;
Just wanted to come and say thanks for this extension, very cool!
I was using https://github.com/ForbesLindesay/vscode-sql-template-literal up until now, but because of ForbesLindesay/vscode-sql-template-literal#13, moving over here now!
Closing :)
Hey, this extension looks very interesting!
Would you be open to publishing this extension on Open VSX , so that it can be used e.g. via gitpod?
More information: https://www.gitpod.io/docs/references/ides-and-editors/vscode-extensions#where-do-i-find-extensions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.