-
Notifications
You must be signed in to change notification settings - Fork 298
Add default configuration for Haskell LSP #1918
Conversation
@Tehnix, thanks for the PR 👍, Although i'm wondering whether this would go better in the documentation wiki re LSPs we have tended to put information re how to integrate new LSPs |
That would also make sense, yeah :) I'll add it to the wiki page instead, and close this PR then. |
Codecov Report
@@ Coverage Diff @@
## master #1918 +/- ##
=======================================
Coverage 35.17% 35.17%
=======================================
Files 262 262
Lines 10347 10347
Branches 1322 1322
=======================================
Hits 3640 3640
Misses 6522 6522
Partials 185 185
Continue to review full report at Codecov.
|
Perhaps a bit too quick on that one. I saw that Perhaps a mix of adding the configuration here, and then install instructions in the wiki entry? Let me know what you think. |
We've got If we were bundling the executables that would be a bit different, but I think just including the config pre-entered seems fine to me. |
tbh atm its a few lines and having it means a haskell user who has the lsp downloaded will have everything work automagically which is great. Not sure what the long term plan is though, aka going forward will we have defaults for most user languages in which case if it isn't clear that were setting specific defaults then it could raise issues if our defaults clash with what a user ends up setting e.g. a user sets 2/4 of the lsp config opts since they want to use a (different) lsp for a language than our default then don't realise we've set another two defaults to something that's incompatible with their choice 🤷♂️. I'm happy with this merged into the default config or as documentation will defer to whatever the prevailing preference is. |
💯 , thanks for putting this together @Tehnix , and thanks for merging it in @Akin909 ! I didn't realize there is a haskell language server... I just read a book on haskell, I'll have to try this out 👍 Very cool!
Long-term, once our plugin story is more mature, it'd be cool if we had language-specific plugins. It'd be great if they could bundle the language servers as well (like VSCode's plugins). It's a nice experience if you just add one plugin with minimal configuration and you're all set 👍 Shorter-term, I think this approach is great - especially for cases like this where there is one primary language server. One thing I'd like to add to make this a bit nicer is to have some sort of message / URL that we can point a user to if the language server fails to start (for example, if the user doesn't have it installed). It'd be cool if we could put up a notification like "I see you're opening a Haskell file - Oni works great with the haskell language server. Click here to learn more.". Potentially we could add configuration settings like They don't necessarily have to be mutually exclusive strategies either, I think we can grow into the plugin based approach once the infrastructure is there 👍 |
I'm fairly certain HIE won't work without a project file, i.e. a .cabal file (and possibly a stack.yaml). Are you able to get HIE working with other editors (e.g. VSCode) in the same project? |
@Tehnix thanks for fielding that I dont know HIE at all, @Preconf what I can say real quick re the |
@Akin909 No worries, it's a pretty HIE specific question :) @Preconf Heh, I feel a bit bad that we don't have any "setup" or "getting started" in the HIE repository. For the best experience, I recommend the following:
Should get you going in the right direction :) The reason for me recommending |
This adds a default configuration for the Haskell LSP, HIE.