Skip to content

Commit 520ff0a

Browse files
committed
config: Restrict .JETLSConfig.toml to workspace root only
Use RelativePattern for file watching to ensure .JETLSConfig.toml is only recognized in the workspace root directory. Previously, config files in subdirectories were also loaded due to the "**/" glob pattern, which was inconsistent with the documentation.
1 parent 86fa843 commit 520ff0a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1616
- Commit: [`HEAD`](https://github.com/aviatesk/JETLS.jl/commit/HEAD)
1717
- Diff: [`aae52f5...HEAD`](https://github.com/aviatesk/JETLS.jl/compare/aae52f5...HEAD)
1818

19+
### Fixed
20+
21+
- `.JETLSConfig.toml` is now only recognized at the workspace root.
22+
Previously, config files in subdirectories were also loaded, which was
23+
inconsistent with [the documentation](https://aviatesk.github.io/JETLS.jl/release/configuration/#config/file-based-config).
24+
1925
### Internal
2026

2127
- Added heap snapshot profiling support. Create a `.JETLSProfile` file in the

src/did-change-watched-files.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function did_change_watched_files_registration(server::Server)
1212
registerOptions = DidChangeWatchedFilesRegistrationOptions(;
1313
watchers = FileSystemWatcher[
1414
FileSystemWatcher(;
15-
globPattern = "**/$CONFIG_FILE",
15+
globPattern = RelativePattern(;
16+
baseUri = root_uri,
17+
pattern = CONFIG_FILE),
1618
kind = WatchKind.Create | WatchKind.Change | WatchKind.Delete),
1719
FileSystemWatcher(;
1820
globPattern = RelativePattern(;

0 commit comments

Comments
 (0)