-
Notifications
You must be signed in to change notification settings - Fork 31
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
Easy workspace-wide Regal toggle #113
Comments
Agreed, this would be great when working with code you can't modify and fix. I would love to have a little Regal viking next to the GitHub co-pilot whateverthatis to bring up a context menu with some options related to Regal 😍 But just being able to set it via the usual context menu is fine, and I guess less intrusive for people not as obsessed by Regal (if such people exist). Disabling Regal for the current workspace would be a good first option to add. |
As more features are added to the Regal language server, it's likely just the diagnostics feature (i.e. linting) that one might want to disable. There should be little need to disable something like tooltips for built-in functions even when working with code you can't modify. I know that's what you meant @johanfylling, just noting it down for when we get to this. |
If you generally want a language server (such as regal), but then don't want it in one workspace you can create a file at
Screen.Recording.2024-04-04.at.10.05.10.movClearly there are more high tech options here too. But this might be good enough for someone searching and finding this issue before we do anything nicer. |
I think the right way to look at this now is, how can I disable Regal's linting for a workspace since it's unlikely that you'd want to disable the other functions of the language server in the same way (i.e. they'd be managed in the client settings rather than Regal). Anders has suggested a command or similar that splats out a disable regal linting config file like this:
I think this is the right end goal, but I'm not sure how we can offer such a command. One idea is to have a e.g. Screen.Recording.2024-04-22.at.18.35.56.mov |
Love the status bar! :) Adding a |
One issue that I see with this is that I don't think we have a good way to 'save' the setting for the next start up in that workspace.
Yeah, I don't know how to disable diagnostics only. That see to me to be worth looking into. It seems we set this in the Regal client settings: diagnosticPullOptions: {
onChange: true,
onSave: true
} This means that the client will request diagnostics when the file is changed and saved. If we set these to false, then this doesn't happen. However, our server will also send diagnostics when the contents of the file change anyway. I think this is something that we'd need to change in the behaviour of the server to address. I've not been able to see how |
Solid research! Yeah, could be that we'll need to add a button or menu item for that somewhere in the VS Code UI ourselves. But let's start by supporting it properly in Regal. |
Interestingly, it doesn't seem to be possible to stop the client from sending It also doesn't seem to be featured in the client initialisation options. I think the way to do this would be to have a setting, much like this one: https://github.com/bmewburn/vscode-intelephense/blob/master/package.json#L508-L513 and have a client-side middleware to drop diagnostics if the feature was off.
|
Sometimes, you're working in a workspace where you, for various reasons, don't want to change the source code to comply with Regal, or disable it through inline comments or introducing a regal config file. For these situations, it'd be great to have a boolean extension config param to turn off Regal, which could be applied on the workspace. The workspace's
.vscode
directory, where the config is stored, is likely to be captured by any existing.gitignore
.The text was updated successfully, but these errors were encountered: