mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
feat(editor): Listen to config file changes and trigger a didChangeConfiguration update (#6964)
Watch eslint and oxlint config files for changes. When these files change, a `didChangeConfiguration` event will be sent to the language server. Ref https://github.com/oxc-project/backlog/issues/132.
This commit is contained in:
parent
ebf37539c0
commit
6b619da23a
1 changed files with 6 additions and 2 deletions
|
|
@ -150,8 +150,12 @@ export async function activate(context: ExtensionContext) {
|
|||
scheme: 'file',
|
||||
})),
|
||||
synchronize: {
|
||||
// Notify the server about file changes to '.clientrc files contained in the workspace
|
||||
fileEvents: workspace.createFileSystemWatcher('**/.clientrc'),
|
||||
// Notify the server about file config changes in the workspace
|
||||
fileEvents: [
|
||||
workspace.createFileSystemWatcher('**/.eslintr{c,c.json}'),
|
||||
workspace.createFileSystemWatcher('**/.oxlint{.json,rc.json,rc}'),
|
||||
workspace.createFileSystemWatcher('**/oxlint{.json,rc.json}'),
|
||||
],
|
||||
},
|
||||
initializationOptions: {
|
||||
settings: config.toLanguageServerConfig(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue