-
Hi,
const exist = this.preferenceService.get('clangd.path'); always return undefine, even I have set value for 'clangd.path' from the UI setting. It is strange, Does I use correct method to get? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @wss29, I'm not sure waiting until the preference service is ready is enough - the backend registers the extension preferences with a bit of delay in the frontend. You probably need to wait until the @inject(HostedPluginSupport)
private readonly hostedPluginSupport: HostedPluginSupport;
...
await this.preferenceService.ready;
await this.hostedPluginSupport.didStart;
const exist = this.preferenceService.get('clangd.path'); |
Beta Was this translation helpful? Give feedback.
Hey @wss29,
I'm not sure waiting until the preference service is ready is enough - the backend registers the extension preferences with a bit of delay in the frontend. You probably need to wait until the
HostedPluginSupport#didStart
promise is ready: