Skip to content

Add a way to include "extra settings" #648

Open
@michaelpj

Description

@michaelpj

When working on a new HLS feature, it is common to want to add some settings. Ideally, these eventually are exposed as proper settings in the extension, but when hacking on it it would be nice to have a way to toggle your new settings without having to edit the extension.

I suggest we could have something like an unstructured "extra-settings" bag, which will just get added in before sending to the server. I'm not sure whether there's an appropriate way to do this in vscode, though.

Activity

July541

July541 commented on Jul 10, 2023

@July541
Collaborator

If I remember correctly, while working on hls-class-plugin, I can add extra settings directly as normal settings in settings.json.

fendor

fendor commented on Jul 10, 2023

@fendor
Collaborator

Right, but there is no general way to specify arguments that are sent to HLS directly.

The suggestion is basically to have a haskell.genericConfig field which takes a json object. These options are sent as part of the initialisation request.

For example, imagine hls-cabal-plugin has some config that we haven't specified in vscode-haskell

"haskell.plugin.cabal.globalOn": {
. There is currently no way to specify any options the vscode extension doesn't know about, right?

July541

July541 commented on Jul 10, 2023

@July541
Collaborator

Sorry for confusing you, I mean I can(not entirely certain) add this to settings.json before the package.json has this field.

"haskell.plugin.class.codeLensOn": {

fendor

fendor commented on Jul 10, 2023

@fendor
Collaborator

Really? That's great, we should advertise it then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementAn enhancement to an already existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add a way to include "extra settings" · Issue #648 · haskell/vscode-haskell