Skip to content

Commit 4b063ed

Browse files
committed
Strip flag kind from name in overrides
Closes #981
1 parent c07058c commit 4b063ed

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1818
- Sync to upstream Luau 0.670
1919
- Linux runners for GitHub actions are bumped from the deprecated `ubuntu-20.04` to `ubuntu-22.04`. This may mean that release artifacts no longer work on `ubuntu-20.04`.
2020
- Improved Studio plugin error message when attempting to connect to a server but it is not online ([#982](https://github.com/JohnnyMorganz/luau-lsp/issues/982))
21+
- VSCode extension will now strip the prefix `FFlag` / `DFFlag` / `FInt` / `DFInt` if they were included in the overrides name ([#981](https://github.com/JohnnyMorganz/luau-lsp/issues/981))
2122

2223
### Fixed
2324

editors/code/src/extension.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ const startLanguageServer = async (context: vscode.ExtensionContext) => {
194194

195195
name = name.trim();
196196
value = value.trim();
197+
198+
// Strip kind prefix if it was included
199+
for (const kind of FFLAG_KINDS) {
200+
if (name.startsWith(`${kind}`)) {
201+
name = name.substring(kind.length);
202+
}
203+
}
204+
197205
// Validate that the name and value is valid
198206
if (name.length > 0 && value.length > 0) {
199207
fflags[name] = value;

0 commit comments

Comments
 (0)