diff --git a/changelog.md b/changelog.md index da0137d..891ebd5 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,9 @@ ## Unreleased +* `FIX` Improve type narrow with **literal alias type** during completion and signature help +* `NEW` Setting: `Lua.type.inferTableSize`: A Small Table array can be infered +* `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repositoryBranch` and `Lua.addonManager.repositoryPath` ## 3.12.0 `2024-10-30` diff --git a/client/src/addon_manager/commands/enable.ts b/client/src/addon_manager/commands/enable.ts index dbee316..f4f2a59 100644 --- a/client/src/addon_manager/commands/enable.ts +++ b/client/src/addon_manager/commands/enable.ts @@ -4,7 +4,7 @@ import { createChildLogger } from "../services/logging.service"; import { setConfig } from "../../languageserver"; import { WebVue } from "../panels/WebVue"; import { NotificationLevels } from "../types/webvue"; -import { ADDONS_DIRECTORY } from "../config"; +import { ADDONS_DIRECTORY, getStorageUri } from "../config"; type Message = { data: { @@ -51,7 +51,7 @@ export default async (context: vscode.ExtensionContext, message: Message) => { for (const folder of selectedFolders) { try { const installLocation = vscode.Uri.joinPath( - context.globalStorageUri, + getStorageUri(context), "addonManager", ADDONS_DIRECTORY ); diff --git a/client/src/addon_manager/commands/getAddons.ts b/client/src/addon_manager/commands/getAddons.ts index d6bb3c6..3313b10 100644 --- a/client/src/addon_manager/commands/getAddons.ts +++ b/client/src/addon_manager/commands/getAddons.ts @@ -2,7 +2,7 @@ import * as vscode from "vscode"; import { createChildLogger } from "../services/logging.service"; import addonManager from "../services/addonManager.service"; import { WebVue } from "../panels/WebVue"; -import { ADDONS_DIRECTORY } from "../config"; +import { ADDONS_DIRECTORY, getStorageUri } from "../config"; const localLogger = createChildLogger("Get Remote Addons"); @@ -10,7 +10,7 @@ export default async (context: vscode.ExtensionContext) => { WebVue.setLoadingState(true); const installLocation = vscode.Uri.joinPath( - context.globalStorageUri, + getStorageUri(context), "addonManager", ADDONS_DIRECTORY ); diff --git a/client/src/addon_manager/commands/open.ts b/client/src/addon_manager/commands/open.ts index f693316..0321c6e 100644 --- a/client/src/addon_manager/commands/open.ts +++ b/client/src/addon_manager/commands/open.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode"; import { createChildLogger } from "../services/logging.service"; -import { ADDONS_DIRECTORY } from "../config"; +import { ADDONS_DIRECTORY, getStorageUri } from "../config"; const localLogger = createChildLogger("Open Addon"); @@ -8,7 +8,7 @@ export default async ( context: vscode.ExtensionContext, message: { data: { name: string } } ) => { - const extensionStorageURI = context.globalStorageUri; + const extensionStorageURI = getStorageUri(context); const uri = vscode.Uri.joinPath( extensionStorageURI, "addonManager", diff --git a/client/src/addon_manager/commands/refreshAddons.ts b/client/src/addon_manager/commands/refreshAddons.ts index 71bd660..e09dd19 100644 --- a/client/src/addon_manager/commands/refreshAddons.ts +++ b/client/src/addon_manager/commands/refreshAddons.ts @@ -2,12 +2,13 @@ import * as vscode from "vscode"; import addonManager from "../services/addonManager.service"; import { ADDONS_DIRECTORY } from "../config"; import { WebVue } from "../panels/WebVue"; +import { getStorageUri } from "../config" export default async (context: vscode.ExtensionContext) => { WebVue.setLoadingState(true); const installLocation = vscode.Uri.joinPath( - context.globalStorageUri, + getStorageUri(context), "addonManager", ADDONS_DIRECTORY ); diff --git a/client/src/addon_manager/config.ts b/client/src/addon_manager/config.ts index ab0afe1..c61bd51 100644 --- a/client/src/addon_manager/config.ts +++ b/client/src/addon_manager/config.ts @@ -1,11 +1,16 @@ +import * as vscode from "vscode"; + // Development export const DEVELOPMENT_IFRAME_URL = "http://127.0.0.1:5173"; // GitHub Repository Info -export const REPOSITORY_PATH = "https://github.com/LuaLS/LLS-Addons.git"; +export const REPOSITORY = { + PATH: "https://github.com/LuaLS/LLS-Addons.git", + DEFAULT_BRANCH: "main", +} + export const REPOSITORY_OWNER = "carsakiller"; export const REPOSITORY_NAME = "LLS-Addons"; -export const REPOSITORY_DEFAULT_BRANCH = "main"; export const REPOSITORY_ISSUES_URL = "https://github.com/LuaLS/vscode-lua/issues/new?template=bug_report.yml"; export const ADDONS_DIRECTORY = "addons"; @@ -18,3 +23,12 @@ export const LIBRARY_SETTING = "Lua.workspace.library"; export const PLUGIN_FILENAME = "plugin.lua"; export const CONFIG_FILENAME = "config.json"; export const INFO_FILENAME = "info.json"; + +let useGlobal = true +export function getStorageUri(context: vscode.ExtensionContext) { + return useGlobal ? context.globalStorageUri : (context.storageUri ?? context.globalStorageUri) +} + +export function setGlobalStorageUri(use: boolean) { + useGlobal = use +} diff --git a/client/src/addon_manager/registration.ts b/client/src/addon_manager/registration.ts index 1de1c13..1f87430 100644 --- a/client/src/addon_manager/registration.ts +++ b/client/src/addon_manager/registration.ts @@ -6,7 +6,7 @@ import { createChildLogger, logger } from "./services/logging.service"; import dayjs from "dayjs"; import RelativeTime from "dayjs/plugin/relativeTime"; import { git, setupGit } from "./services/git.service"; -import { GIT_DOWNLOAD_URL } from "./config"; +import { GIT_DOWNLOAD_URL, REPOSITORY, setGlobalStorageUri } from "./config"; import { NotificationLevels } from "./types/webvue"; import * as languageServer from "../languageserver"; @@ -28,6 +28,16 @@ export async function activate(context: vscode.ExtensionContext) { const fileLogger = new VSCodeLogFileTransport(context.logUri, { level: "debug", }); + + // update config + const repositoryPath = globalConfig.get("repositoryPath") as string + const repositoryBranch = globalConfig.get("repositoryBranch") as string + if ((repositoryPath || repositoryBranch) && context.storageUri) { + REPOSITORY.PATH = !!repositoryPath ? repositoryPath : REPOSITORY.PATH + REPOSITORY.DEFAULT_BRANCH = !!repositoryBranch ? repositoryBranch : REPOSITORY.DEFAULT_BRANCH + setGlobalStorageUri(false) + } + // Register command to open addon manager context.subscriptions.push( diff --git a/client/src/addon_manager/services/git.service.ts b/client/src/addon_manager/services/git.service.ts index 58856fb..3a56993 100644 --- a/client/src/addon_manager/services/git.service.ts +++ b/client/src/addon_manager/services/git.service.ts @@ -2,7 +2,7 @@ import * as vscode from "vscode"; import simpleGit from "simple-git"; import filesystem from "./filesystem.service"; import { createChildLogger } from "./logging.service"; -import { REPOSITORY_NAME, REPOSITORY_PATH } from "../config"; +import { REPOSITORY_NAME, REPOSITORY, getStorageUri } from "../config"; const localLogger = createChildLogger("Git"); @@ -10,7 +10,7 @@ export const git = simpleGit({ trimmed: true }); export const setupGit = async (context: vscode.ExtensionContext) => { const storageURI = vscode.Uri.joinPath( - context.globalStorageUri, + getStorageUri(context), "addonManager" ); await filesystem.createDirectory(storageURI); @@ -24,8 +24,7 @@ export const setupGit = async (context: vscode.ExtensionContext) => { localLogger.debug( `Attempting to clone ${REPOSITORY_NAME} to ${storageURI.fsPath}` ); - const options = { "--depth": 1 }; - await git.clone(REPOSITORY_PATH, storageURI.fsPath, options); + await git.clone(REPOSITORY.PATH, storageURI.fsPath); localLogger.debug( `Cloned ${REPOSITORY_NAME} to ${storageURI.fsPath}` ); @@ -41,7 +40,7 @@ export const setupGit = async (context: vscode.ExtensionContext) => { try { await git.fetch(); await git.pull(); - await git.checkout("main"); + await git.checkout(REPOSITORY.DEFAULT_BRANCH); } catch (e) { localLogger.warn(`Failed to pull ${REPOSITORY_NAME}!`); throw e; diff --git a/package.json b/package.json index 48ef6d4..2793af5 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,18 @@ "scope": "resource", "type": "boolean" }, + "Lua.addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "%config.addonManager.repositoryBranch%", + "scope": "resource", + "type": "string" + }, + "Lua.addonManager.repositoryPath": { + "default": "", + "markdownDescription": "%config.addonManager.repositoryPath%", + "scope": "resource", + "type": "string" + }, "Lua.codeLens.enable": { "default": false, "markdownDescription": "%config.codeLens.enable%", diff --git a/package.nls.ja-jp.json b/package.nls.ja-jp.json index 1f48a53..81eab73 100644 --- a/package.nls.ja-jp.json +++ b/package.nls.ja-jp.json @@ -5,6 +5,8 @@ "command.startServer": "Lua: (debug) Start Language Server", "command.stopServer": "Lua: (debug) Stop Language Server", "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.", + "config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", "config.color.mode.Grammar": "Grammar color.", @@ -222,6 +224,7 @@ "config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.", "config.type.checkTableShape": "Strictly check the shape of the table.\n", "config.type.inferParamType": "When a parameter type is not annotated, it is inferred from the function's call sites.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n", + "config.type.inferTableSize": "TODO: Needs documentation", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.typeFormat.config": "Configures the formatting behavior while typing Lua code.", diff --git a/package.nls.json b/package.nls.json index 1f48a53..81eab73 100644 --- a/package.nls.json +++ b/package.nls.json @@ -5,6 +5,8 @@ "command.startServer": "Lua: (debug) Start Language Server", "command.stopServer": "Lua: (debug) Stop Language Server", "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.", + "config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", "config.color.mode.Grammar": "Grammar color.", @@ -222,6 +224,7 @@ "config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.", "config.type.checkTableShape": "Strictly check the shape of the table.\n", "config.type.inferParamType": "When a parameter type is not annotated, it is inferred from the function's call sites.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n", + "config.type.inferTableSize": "TODO: Needs documentation", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.typeFormat.config": "Configures the formatting behavior while typing Lua code.", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index 7f79361..e0bf9a5 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -5,6 +5,8 @@ "command.startServer": "Lua: (debug) Start Language Server", "command.stopServer": "Lua: (debug) Stop Language Server", "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.", + "config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", "config.color.mode.Grammar": "Grammar color.", @@ -222,6 +224,7 @@ "config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.", "config.type.checkTableShape": "对表的形状进行严格检查。\n", "config.type.inferParamType": "When the parameter type is not annotated, the parameter type is inferred from the function's incoming parameters.\n\nWhen this setting is `false`, the type of the parameter is `any` when it is not annotated.\n", + "config.type.inferTableSize": "TODO: Needs documentation", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.typeFormat.config": "Configures the formatting behavior while typing Lua code.", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 8665c71..dfadaae 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -5,6 +5,8 @@ "command.startServer": "Lua: (debug) 启动服务器", "command.stopServer": "Lua: (debug) 停止服务器", "config.addonManager.enable": "是否启用扩展的附加插件管理器(Addon Manager)", + "config.addonManager.repositoryBranch": "指定插件管理器(Addon Manager)使用的git仓库分支", + "config.addonManager.repositoryPath": "指定插件管理器(Addon Manager)使用的git仓库路径", "config.codeLens.enable": "启用代码度量。", "config.color.mode": "着色模式。", "config.color.mode.Grammar": "语法着色。", @@ -222,6 +224,7 @@ "config.type.castNumberToInteger": "允许将 `number` 类型赋给 `integer` 类型。", "config.type.checkTableShape": "对表的形状进行严格检查。\n", "config.type.inferParamType": "未注释参数类型时,参数类型由函数传入参数推断。\n\n如果设置为 \"false\",则在未注释时,参数类型为 \"any\"。\n", + "config.type.inferTableSize": "TODO: Needs documentation", "config.type.weakNilCheck": "对联合类型进行类型检查时,忽略其中的 `nil`。\n\n此设置为 `false` 时,`numer|nil` 类型无法赋给 `number` 类型;为 `true` 是则可以。\n", "config.type.weakUnionCheck": "联合类型中只要有一个子类型满足条件,则联合类型也满足条件。\n\n此设置为 `false` 时,`number|boolean` 类型无法赋给 `number` 类型;为 `true` 时则可以。\n", "config.typeFormat.config": "配置输入Lua代码时的格式化行为", diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index ce1b87d..87a40f2 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -5,6 +5,8 @@ "command.startServer": "Lua: (debug) Start Language Server", "command.stopServer": "Lua: (debug) Stop Language Server", "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.", + "config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "著色模式。", "config.color.mode.Grammar": "語法著色。", @@ -222,6 +224,7 @@ "config.type.castNumberToInteger": "允許將 `number` 類型賦值給 `integer` 類型。", "config.type.checkTableShape": "对表的形状进行严格检查。\n", "config.type.inferParamType": "未注释参数类型时,参数类型由函数传入参数推断。\n\n如果设置为 \"false\",则在未注释时,参数类型为 \"any\"。\n", + "config.type.inferTableSize": "TODO: Needs documentation", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。\n\n此設定為 `false` 時,`number|boolean` 類型無法賦給 `number` 類型;為 `true` 時則可以。\n", "config.typeFormat.config": "Configures the formatting behavior while typing Lua code.", diff --git a/server b/server index 3894968..dec586e 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 389496827f20bb6d75a2fb2826099f13e9c18730 +Subproject commit dec586e8c5a7db3b443054c978e136b82ce5ecdf diff --git a/setting/schema-ja-jp.json b/setting/schema-ja-jp.json index a653954..bbb6465 100644 --- a/setting/schema-ja-jp.json +++ b/setting/schema-ja-jp.json @@ -5,6 +5,12 @@ "properties": { "enable": { "$ref": "#/properties/addonManager.enable" + }, + "repositoryBranch": { + "$ref": "#/properties/addonManager.repositoryBranch" + }, + "repositoryPath": { + "$ref": "#/properties/addonManager.repositoryPath" } } }, @@ -14,6 +20,18 @@ "scope": "resource", "type": "boolean" }, + "addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "Specifies the git branch used by the addon manager.", + "scope": "resource", + "type": "string" + }, + "addonManager.repositoryPath": { + "default": "", + "markdownDescription": "Specifies the git path used by the addon manager.", + "scope": "resource", + "type": "string" + }, "codeLens": { "properties": { "enable": { @@ -3313,6 +3331,9 @@ "inferParamType": { "$ref": "#/properties/type.inferParamType" }, + "inferTableSize": { + "$ref": "#/properties/type.inferTableSize" + }, "weakNilCheck": { "$ref": "#/properties/type.weakNilCheck" }, @@ -3339,6 +3360,12 @@ "scope": "resource", "type": "boolean" }, + "type.inferTableSize": { + "default": 10, + "markdownDescription": "TODO: Needs documentation", + "scope": "resource", + "type": "integer" + }, "type.weakNilCheck": { "default": false, "markdownDescription": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", diff --git a/setting/schema-pt-br.json b/setting/schema-pt-br.json index 3a33bd8..a61ce17 100644 --- a/setting/schema-pt-br.json +++ b/setting/schema-pt-br.json @@ -5,6 +5,12 @@ "properties": { "enable": { "$ref": "#/properties/addonManager.enable" + }, + "repositoryBranch": { + "$ref": "#/properties/addonManager.repositoryBranch" + }, + "repositoryPath": { + "$ref": "#/properties/addonManager.repositoryPath" } } }, @@ -14,6 +20,18 @@ "scope": "resource", "type": "boolean" }, + "addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "Specifies the git branch used by the addon manager.", + "scope": "resource", + "type": "string" + }, + "addonManager.repositoryPath": { + "default": "", + "markdownDescription": "Specifies the git path used by the addon manager.", + "scope": "resource", + "type": "string" + }, "codeLens": { "properties": { "enable": { @@ -3313,6 +3331,9 @@ "inferParamType": { "$ref": "#/properties/type.inferParamType" }, + "inferTableSize": { + "$ref": "#/properties/type.inferTableSize" + }, "weakNilCheck": { "$ref": "#/properties/type.weakNilCheck" }, @@ -3339,6 +3360,12 @@ "scope": "resource", "type": "boolean" }, + "type.inferTableSize": { + "default": 10, + "markdownDescription": "TODO: Needs documentation", + "scope": "resource", + "type": "integer" + }, "type.weakNilCheck": { "default": false, "markdownDescription": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index 89fe33c..4f2cd38 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -5,6 +5,12 @@ "properties": { "enable": { "$ref": "#/properties/addonManager.enable" + }, + "repositoryBranch": { + "$ref": "#/properties/addonManager.repositoryBranch" + }, + "repositoryPath": { + "$ref": "#/properties/addonManager.repositoryPath" } } }, @@ -14,6 +20,18 @@ "scope": "resource", "type": "boolean" }, + "addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "指定插件管理器(Addon Manager)使用的git仓库分支", + "scope": "resource", + "type": "string" + }, + "addonManager.repositoryPath": { + "default": "", + "markdownDescription": "指定插件管理器(Addon Manager)使用的git仓库路径", + "scope": "resource", + "type": "string" + }, "codeLens": { "properties": { "enable": { @@ -3313,6 +3331,9 @@ "inferParamType": { "$ref": "#/properties/type.inferParamType" }, + "inferTableSize": { + "$ref": "#/properties/type.inferTableSize" + }, "weakNilCheck": { "$ref": "#/properties/type.weakNilCheck" }, @@ -3339,6 +3360,12 @@ "scope": "resource", "type": "boolean" }, + "type.inferTableSize": { + "default": 10, + "markdownDescription": "TODO: Needs documentation", + "scope": "resource", + "type": "integer" + }, "type.weakNilCheck": { "default": false, "markdownDescription": "对联合类型进行类型检查时,忽略其中的 `nil`。\n\n此设置为 `false` 时,`numer|nil` 类型无法赋给 `number` 类型;为 `true` 是则可以。\n", diff --git a/setting/schema-zh-tw.json b/setting/schema-zh-tw.json index b8d6d50..4350d59 100644 --- a/setting/schema-zh-tw.json +++ b/setting/schema-zh-tw.json @@ -5,6 +5,12 @@ "properties": { "enable": { "$ref": "#/properties/addonManager.enable" + }, + "repositoryBranch": { + "$ref": "#/properties/addonManager.repositoryBranch" + }, + "repositoryPath": { + "$ref": "#/properties/addonManager.repositoryPath" } } }, @@ -14,6 +20,18 @@ "scope": "resource", "type": "boolean" }, + "addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "Specifies the git branch used by the addon manager.", + "scope": "resource", + "type": "string" + }, + "addonManager.repositoryPath": { + "default": "", + "markdownDescription": "Specifies the git path used by the addon manager.", + "scope": "resource", + "type": "string" + }, "codeLens": { "properties": { "enable": { @@ -3313,6 +3331,9 @@ "inferParamType": { "$ref": "#/properties/type.inferParamType" }, + "inferTableSize": { + "$ref": "#/properties/type.inferTableSize" + }, "weakNilCheck": { "$ref": "#/properties/type.weakNilCheck" }, @@ -3339,6 +3360,12 @@ "scope": "resource", "type": "boolean" }, + "type.inferTableSize": { + "default": 10, + "markdownDescription": "TODO: Needs documentation", + "scope": "resource", + "type": "integer" + }, "type.weakNilCheck": { "default": false, "markdownDescription": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", diff --git a/setting/schema.json b/setting/schema.json index a653954..bbb6465 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -5,6 +5,12 @@ "properties": { "enable": { "$ref": "#/properties/addonManager.enable" + }, + "repositoryBranch": { + "$ref": "#/properties/addonManager.repositoryBranch" + }, + "repositoryPath": { + "$ref": "#/properties/addonManager.repositoryPath" } } }, @@ -14,6 +20,18 @@ "scope": "resource", "type": "boolean" }, + "addonManager.repositoryBranch": { + "default": "", + "markdownDescription": "Specifies the git branch used by the addon manager.", + "scope": "resource", + "type": "string" + }, + "addonManager.repositoryPath": { + "default": "", + "markdownDescription": "Specifies the git path used by the addon manager.", + "scope": "resource", + "type": "string" + }, "codeLens": { "properties": { "enable": { @@ -3313,6 +3331,9 @@ "inferParamType": { "$ref": "#/properties/type.inferParamType" }, + "inferTableSize": { + "$ref": "#/properties/type.inferTableSize" + }, "weakNilCheck": { "$ref": "#/properties/type.weakNilCheck" }, @@ -3339,6 +3360,12 @@ "scope": "resource", "type": "boolean" }, + "type.inferTableSize": { + "default": 10, + "markdownDescription": "TODO: Needs documentation", + "scope": "resource", + "type": "integer" + }, "type.weakNilCheck": { "default": false, "markdownDescription": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n",