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

Allow HLS plugins to declare cli commands #1999

Merged
merged 7 commits into from
Jul 6, 2021
Merged

Conversation

pepeiborra
Copy link
Collaborator

I want to add a command line retrie subcommand provided by hls-retrie-plugin. Generally, this PR enables any PluginDescriptor to declare new cli commands.

For consistency, I moved --vscode-extension-schema and --generate-default-config to be subcommands as well. Let me know if anything else needs changing; where are these commands called from?

How it looks like:

Available commands:
  typecheck                Used as a test bed to check your IDE will work
  hiedb                    Query .hie files
  lsp                      Start talking to an LSP client
  vscode-extension-schema  Print generic config schema for plugins (used in the
                           package.json of haskell vscode extension)
  generate-default-config  Print config supported by the server with default
                           values
  retrie                   Retrie commands

@pepeiborra
Copy link
Collaborator Author

/cc @xich

@pepeiborra pepeiborra requested a review from berberman July 6, 2021 08:16
Copy link
Collaborator

@berberman berberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As far as I know we use --vscode-extension-schema and --generate-default-config manually to update the package.json of our vscode extension when needed. I think we could create a command config and let these two commands be subcommands, grouping them together.

@pepeiborra pepeiborra merged commit 5471382 into master Jul 6, 2021
jneira pushed a commit to jneira/haskell-language-server that referenced this pull request Jul 6, 2021
* turn into subcommands and move to Default.Main

* remove redundant logger

* fixup subcommands

* HLS plugin cli commands

* Add an example

* print -> putStrLn
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

Successfully merging this pull request may close these issues.

2 participants