-
Notifications
You must be signed in to change notification settings - Fork 24
Description
When you have a folder structure like:
.
├── models
│ └── foo.smithy
└── smithy-build.json
adding a new Smithy file to models should trigger the didChangeWatchedFiles notification. We register for this notification using SmithyLanguageServer::registerSmithyFileWatchers, which basically sends a list of glob Patterns of the files we want to watch.
Assuming the root dir of the above example is /foo, the registration glob pattern (right now) would look like:
/foo/models/**.{smithy,json}
Java's PathMatcher would match a /foo/models/bar.smithy using that pattern, which is what our tests in FileWatcherRegistrationsTest verify. However, in VSCode, we don't get a didChangeWatchedFiles notification if you added /foo/models/bar.smithy. I confirmed that the registrations were sent properly, so its not an issue there.
If I change the pattern we register for to:
/foo/models/**/*.{smithy,json}
then VSCode does send didChangeWatchedFiles if you added /foo/models/bar.smithy, but our test fails.
I also checked Neovim, and it seems either file pattern works.