diff --git a/CHANGELOG.md b/CHANGELOG.md index 212628f..ebb8853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. diff --git a/package.json b/package.json index c6743f9..beb8c63 100644 --- a/package.json +++ b/package.json @@ -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", @@ -37,8 +37,7 @@ "commands": [ { "command": "sqlfluff.debug", - "title": "SQLFluff Debug Extension", - "enablement": "editorLangId in sqlfluff.formatLanguages" + "title": "SQLFluff Debug Extension" }, { "command": "sqlfluff.fix", @@ -294,7 +293,7 @@ }, "contextMenuFormatOptions": { "type": "boolean", - "default": false, + "default": true, "markdownDescription": "Show a SQLFluff option in the context menu." }, "preserveLeadingWhitespace": { diff --git a/src/features/helper/configuration.ts b/src/features/helper/configuration.ts index d61c092..a3e83d0 100644 --- a/src/features/helper/configuration.ts +++ b/src/features/helper/configuration.ts @@ -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); } })