mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +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',
|
scheme: 'file',
|
||||||
})),
|
})),
|
||||||
synchronize: {
|
synchronize: {
|
||||||
// Notify the server about file changes to '.clientrc files contained in the workspace
|
// Notify the server about file config changes in the workspace
|
||||||
fileEvents: workspace.createFileSystemWatcher('**/.clientrc'),
|
fileEvents: [
|
||||||
|
workspace.createFileSystemWatcher('**/.eslintr{c,c.json}'),
|
||||||
|
workspace.createFileSystemWatcher('**/.oxlint{.json,rc.json,rc}'),
|
||||||
|
workspace.createFileSystemWatcher('**/oxlint{.json,rc.json}'),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
initializationOptions: {
|
initializationOptions: {
|
||||||
settings: config.toLanguageServerConfig(),
|
settings: config.toLanguageServerConfig(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue