Skip to content
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

Fix format even if workspace folder cannot be obtained #36

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

tanzaku
Copy link
Collaborator

@tanzaku tanzaku commented Oct 30, 2023

workspace folderが取得できない場合でも、デフォルト設定でフォーマットするよう変更しました。
workspace folderが取得できた場合の挙動は変更前後で変わらないようにしています。

また、スネークケースの変数があったのでついでに直しています。

@tanzaku tanzaku requested a review from ota-meshi October 30, 2023 07:13
@tanzaku tanzaku self-assigned this Oct 30, 2023
@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2023

🦋 Changeset detected

Latest commit: 76a82a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
uroborosql-fmt Patch

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

@tanzaku tanzaku removed their assignment Oct 30, 2023
selections: Range[],
): Promise<TextEdit[]> {
// version check
if (version !== textDocument.version) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バージョンのチェックはawait determineConfigPath(uri, textDocument)よりも後である必要があると思います。非同期中にバージョンが変更される可能性があるためです。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます、見落としてました。
バージョンのチェックをdetermineConfigPathの後に行うよう直しました。

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ota-meshi ota-meshi merged commit 804f9d7 into main Oct 31, 2023
2 checks passed
@ota-meshi ota-meshi deleted the fix_format_even_if_workspaceFolder_cannot_be_obtained branch October 31, 2023 01:03
@tanzaku tanzaku linked an issue Nov 1, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow formatting even if the workspace folder cannot be obtained
3 participants