Comments (7)
Nice! That seems to be working again 🙌
from prettier-plugin-embed.
I'm not sure but maybe this is related?
from prettier-plugin-embed.
Can you provide a repro setup?
VS Code Prettier extension warnings/errors are logged by its own logging service which is not exposed to the plugins so I cannot log errors or warnings in the output panel. If you open the devtools of VS Code, the errors may appear in that window (if there're errors).
The breaking changes are the behaviors of the ruby plugin and I reduced the amount of default identifiers to only the common ones. And I've also added this line of note in the README file. Some new languages are added in v0.4.x compared to v0.3.2, but I don't see them as breaking changes. But maybe I broke something in the process.
This project is still in early stage, lacking tests, and I'm still trying to learn and find the appropriate process to maintain this repo. Any kind of contribution to help me organize this repo in a more maintainable way is welcome.
from prettier-plugin-embed.
The prettier.config.mjs
contains:
// @ts-check
// ignore unused exports default
// The Prettier plugin config types are temporarily avoided due to this issue:
// https://github.com/Sec-ant/prettier-plugin-embed/issues/52
// @type {import("prettier-plugin-embed").PrettierPluginEmbedOptions}
/** Prettier config for the plugin `prettier-plugin-embed`. */
const prettierConfigPluginEmbed = {
embeddedSqlIdentifiers: ["sql", "redactedSql"],
};
// @type {import("prettier-plugin-sql").SqlBaseOptions}
/** Prettier config for the plugin `prettier-plugin-sql`. */
const prettierConfigPluginSql = {
language: "postgresql",
};
/**
* Prettier config.
* @type {import("prettier").Config}
*/
const prettierConfig = {
plugins: ["prettier-plugin-embed", "prettier-plugin-sql"],
...prettierConfigPluginEmbed,
...prettierConfigPluginSql,
};
export default prettierConfig;
from prettier-plugin-embed.
This is indeed a regression, sorry for the trouble. Can you test v0.4.3 to confirm whether it is fixed for your use case?
from prettier-plugin-embed.
Hmm, something else that seems to have changed, is now the default behavior is not to format the keyword capitalization. You have to explicitly add keywordCase: "upper"
in the SQL plugin config.
from prettier-plugin-embed.
Actually, maybe that stopped working before the v0.4 update, because now I have updated the Prettier config to enforce SQL keyword case, I'm finding Prettier formatting errors for some of the SQL committed in the last week. Maybe that default changed due to an earlier update of either prettier-plugin-embed
or prettier-plugin-sql
.
from prettier-plugin-embed.
Related Issues (20)
- Ability to map `sql` to `postgresql` HOT 10
- sql-formatter crash on `$$` SQL delimiter HOT 3
- sql-formatter crash on SQL casts, tilde, square brackets, `$$` delimiter HOT 10
- Tests
- Enhancement: SQL in SQL prettification HOT 5
- Unstable formatting on multi-line dollar-quoted strings with `sql-formatter` `dialect` option HOT 16
- Export separate type declarations for each supported language HOT 15
- [docs] It's not clear what languages or identifiers are supported on first look on README HOT 4
- [meta] use tools like `changesets` for better maintainance HOT 12
- Add an online playground
- ESM support? HOT 7
- literal tags with type annotations, sql<Revenue>`...` HOT 2
- Support for object properties as identifiers HOT 12
- Deprecate the name `identifier` in favor of `tag` and `comment`
- Version 0.4.11 and 0.4.12 prevent typescript from formatting. HOT 3
- Formatting error on Windows machines HOT 6
- Enabling plugin changes formatting of embedded CSS, even with embeddedCssTags: [] HOT 9
- Support for CommonJS HOT 1
- SQL: Indentation of interpolated expression missing an indent level HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-plugin-embed.