haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.65k stars 354 forks source link

Package plugin (adding dependencies into .cabal and package.yaml files) #155

Open jneira opened 4 years ago

jneira commented 4 years ago

Add a package to your project with a handy code-action!

lukel97 commented 4 years ago

I don't think the plugin should be ported directly, as it was pretty hairy in HIE. I remember when writing it it was really destructive to .cabal files' formatting as there doesn't exist a round-trip parser. Which made it pretty useless in practice. The package.yaml part though I think could be rewritten with a roundtrip yaml parser, thanks to a GSoC project on HsYAML: https://hackage.haskell.org/package/HsYAML

domenkozar commented 3 years ago

I don't think the plugin should be ported directly, as it was pretty hairy in HIE. I remember when writing it it was really destructive to .cabal files' formatting as there doesn't exist a round-trip parser. Which made it pretty useless in practice. The package.yaml part though I think could be rewritten with a roundtrip yaml parser, thanks to a GSoC project on HsYAML: https://hackage.haskell.org/package/HsYAML

I'd still prefer that over nothing :)

jneira commented 3 years ago

This could be related with #183 (the cabal part), as both would be interface with cabal