Skip to content

Commit 664f53b

Browse files
committed
Fix --base-luaurc not registering in LSP mode
1 parent 493c5a9 commit 664f53b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
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
- Fixed document symbol crash on incomplete functions
12+
- Fixed `--base-luaurc` not registering for an LSP server
1213

1314
## [1.16.1] - 2023-01-30
1415

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ static void displayHelp(const char* argv0)
8787
printf(" --sourcemap=PATH: path to a Rojo-style sourcemap\n");
8888
printf(" --definitions=PATH: path to definition file for global types\n");
8989
printf(" --ignore=GLOB: glob pattern to ignore error outputs\n");
90+
printf(" --base-luaurc=PATH: path to a .luaurc file which acts as the base default configuration\n");
9091
printf("LSP options:\n");
9192
printf(" --definitions=PATH: path to definition file for global types\n");
9293
printf(" --docs=PATH: path to documentation file to power Intellisense\n");
@@ -185,11 +186,12 @@ int startLanguageServer(int argc, char** argv)
185186
}
186187
}
187188

188-
std::optional<Luau::Config> defaultConfig;
189+
std::optional<Luau::Config> defaultConfig = std::nullopt;
189190
if (baseLuaurc)
190191
{
191192
if (std::optional<std::string> contents = readFile(*baseLuaurc))
192193
{
194+
defaultConfig = Luau::Config{};
193195
std::optional<std::string> error = Luau::parseConfig(*contents, *defaultConfig);
194196
if (error)
195197
{

0 commit comments

Comments
 (0)