-
Notifications
You must be signed in to change notification settings - Fork 0
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
VSCodeの設定UIからurborosql-fmtのオプションを指定できるようにする #52
Conversation
🦋 Changeset detectedLatest commit: cd43029 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@ota-meshi
追記
|
server/src/server.ts
Outdated
|
||
// translate null (that means unsupecified option) to undefined | ||
const removedNullSettings = Object.fromEntries( | ||
Object.entries(restConfiguration).map(([key, value]) => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined
に置き換えてもkey自体は除外されないので、filter使う方が良さそうです。
Object.entries(restConfiguration).map(([key, value]) => [ | |
Object.entries(restConfiguration).filter(([, value]) => value !== null) |
コマンドはPRを別にしたほうが、PR一つがシンプルになるので良いことだと思います 😄 |
ここらへん詳しく無いのですが、 |
試しましたがダメそうですね 😓 "uroborosql-fmt.complementAlias": {
"enum": [
"on",
"off",
"default"
],
"default": "default",
}, |
変換が不要な方法だとこうすることもできることに気がつきました。 "enum": [
true,
false,
null
],
"default": null, |
package.json
Outdated
}, | ||
"uroborosql-fmt.tabSize": { | ||
"type": [ | ||
"number", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここって"integer"
って使えませんでしたっけ?あとminimumも指定があるとより良いと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。以下対応しました
- booleanのオプションについて、enumを使ってUI上で選択できるよう修正しました
- tabSizeについて、 typeを
integer
に変更し、最小値を0に設定しました
8e65a0c
to
9a2c02b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変更ありがとうございます!
package.json
Outdated
"number", | ||
"null" | ||
], | ||
"enum": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここはnumberなのでenumいらない気がします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
見落としていました、ありがとうございます。修正しておきました。
また、ここも整数でよさそうなので、numberからintegerに変更しました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Close #19
概要
.uroborosqlfmtrc.json
) のオプションが競合した場合は、settings.jsonの値が優先されます (Add an api that gives higher priority options uroborosql-fmt#34)できていないこと
settings.jsonの内容を設定ファイルに同期するコマンドは未実装です