Skip to content

Commit

Permalink
v2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertOstermann committed Aug 17, 2023
1 parent 7e1ff7d commit c107805
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the "sqlfluff" extension will be documented in this file.

## [2.4.2] - 2023-08-17

- Show context menu items by default.

## [2.4.1] - 2023-07-27

- Fix bugs with `SQLFluff Format Selection`.
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vscode-sqlfluff",
"displayName": "sqlfluff",
"version": "2.4.1",
"version": "2.4.2",
"description": "A linter and auto-formatter for SQLfluff, a popular linting tool for SQL and dbt.",
"publisher": "dorzey",
"icon": "images/icon.png",
Expand Down Expand Up @@ -37,8 +37,7 @@
"commands": [
{
"command": "sqlfluff.debug",
"title": "SQLFluff Debug Extension",
"enablement": "editorLangId in sqlfluff.formatLanguages"
"title": "SQLFluff Debug Extension"
},
{
"command": "sqlfluff.fix",
Expand Down Expand Up @@ -294,7 +293,7 @@
},
"contextMenuFormatOptions": {
"type": "boolean",
"default": false,
"default": true,
"markdownDescription": "Show a SQLFluff option in the context menu."
},
"preserveLeadingWhitespace": {
Expand Down
5 changes: 3 additions & 2 deletions src/features/helper/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ export default class Configuration {
.getConfiguration("sqlfluff.format")
.get("languages");


const languages: string[] = [];
languageSettings?.forEach((languageSetting: FormatLanguageSettings | string) => {
if (typeof languageSetting !== "string" && languageSetting.contextMenuFormatOptions) {
if (typeof languageSetting === "string") {
languages.push(languageSetting);
} else if (languageSetting.contextMenuFormatOptions) {
languages.push(languageSetting.language);
}
})
Expand Down

0 comments on commit c107805

Please sign in to comment.