Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding User Settings #950

Open
avneeshn opened this issue Jul 5, 2023 · 8 comments
Open

Overriding User Settings #950

avneeshn opened this issue Jul 5, 2023 · 8 comments

Comments

@avneeshn
Copy link

avneeshn commented Jul 5, 2023

Hi
I am using jupyterlab-lsp as a dependency in my extension. I want to change the default behaviour of following user settings (under completion.jupyterlab-settings) when the user installs my extension.

//Default behaviour currently by jupyterlab-lsp
"continuousHinting": false,

//Default behaviour when user installs my extension
"continuousHinting": true,

Is there a way I can do it in my extension?

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jul 5, 2023 via email

@avneeshn
Copy link
Author

avneeshn commented Jul 5, 2023

Thanks a lot. Another follow-up question: once I change the default to true, would that automatically enable "continuousHinting" once my extension is installed?

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jul 5, 2023 via email

@avneeshn
Copy link
Author

Hi bollwyvl,
I am having a hard time understanding the overrides.d/ way. As I understand, I will have to put the overriding json file in {application_dir}/overrides.d/ dir. But how do I do that? Do you have any idea?

@krassowski
Copy link
Member

Oh, this is for overrides.d/ I guess this needs to be copied over during installation. This then depends whether you are developing a source or pre-built extension. If it is the latter, you can copy it in the install/scripts. Details depend on what tool you use for installation, but the current extension template uses hatch with some files being copied over here.

@krassowski
Copy link
Member

Alternatively, you can just flick the setting using SettingsRegistry. FYI, in JupyterLab 4.0 and corresponding version of the extension enabling continuousHinting got a bit weird, see jupyterlab/jupyterlab#15022

@avneeshn
Copy link
Author

avneeshn commented Sep 5, 2023

Alternatively, you can just flick the setting using SettingsRegistry.

Can you please provide any references on how to implement this? I cannot find anything in lsp docs or jupyter docs

@avneeshn
Copy link
Author

avneeshn commented Sep 5, 2023

More context -> #976 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants