Skip to content

Commit a749dd9

Browse files
committed
Disable roblox types when luau-lsp.platform.type is changed
Fixes #668
1 parent 6140460 commit a749dd9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
99
### Fixed
1010

1111
- The binary on Windows now statically links to the MSVC Runtime to make it more portable ([#657](https://github.com/JohnnyMorganz/luau-lsp/issues/657))
12+
- Fixed Roblox types still showing when setting `luau-lsp.platform.type` to something other than `roblox`. ([#668](https://github.com/JohnnyMorganz/luau-lsp/issues/668))
1213

1314
## [1.31.0] - 2024-07-01
1415

editors/code/src/roblox.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,12 @@ export const preLanguageServerStart = async (
422422
// Load roblox type definitions
423423
const typesConfig = vscode.workspace.getConfiguration("luau-lsp.types");
424424
const platformConfig = vscode.workspace.getConfiguration("luau-lsp.platform");
425+
426+
// TODO: Cleanup when deprecated luau-lsp.types.roblox is deleted
427+
// We need to respect the new setting as well as the old setting. We check for "&&" since they are on by default
425428
if (
426-
typesConfig.get<boolean>("roblox") ||
427-
platformConfig.get<string>("type") === "roblox"
429+
platformConfig.get<string>("type") === "roblox" &&
430+
typesConfig.get<boolean>("roblox")
428431
) {
429432
const securityLevel =
430433
typesConfig.get<string>("robloxSecurityLevel") ?? "PluginSecurity";

0 commit comments

Comments
 (0)