Use with the Atom editor - possible? #62

Closed
opened 2017-10-10 12:45:13 +02:00 by ThomasLocke · 8 comments
ThomasLocke commented 2017-10-10 12:45:13 +02:00 (Migrated from github.com)

I'm currently using hindent, which integrates very well with Atom (as does stylish-haskell). Is there a similar story for brittany? Anybody here using it with Atom to prettify on save?

I'm currently using hindent, which integrates very well with Atom (as does stylish-haskell). Is there a similar story for brittany? Anybody here using it with Atom to prettify on save?
lspitzner commented 2017-10-23 23:11:11 +02:00 (Migrated from github.com)

I think I have mentioned this to you in chat already, but for completeness/others interested:
I don't use Atom and I don't plan to spend time on trying to integrate brittany into various editors. However, brittany is included in haskell-ide-engine so if your editor has some plugin to work with the language server protocol that might be a promising route to get better integration.

That said, if anyone has a setup for integrating brittany properly into Atom, please do tell. I would put something in the README.

I think I have mentioned this to you in chat already, but for completeness/others interested: I don't use Atom and I don't plan to spend time on trying to integrate `brittany` into various editors. However, `brittany` is included in [haskell-ide-engine](https://github.com/haskell/haskell-ide-engine) so if your editor has some plugin to work with the language server protocol that might be a promising route to get better integration. That said, if anyone has a setup for integrating `brittany` properly into Atom, please do tell. I would put something in the README.
ThomasLocke commented 2017-10-24 07:56:02 +02:00 (Migrated from github.com)

@lspitzner I don't remember ever having chatted with you, and I only just discovered Brittany the day I posted the question.

I do though fully understand your position, and was simply hoping that one or more users out there maybe had some experience getting Atom and Brittany to function in perfect harmony. :o)

@lspitzner I don't remember ever having chatted with you, and I only just discovered Brittany the day I posted the question. I do though fully understand your position, and was simply hoping that one or more users out there maybe had some experience getting Atom and Brittany to function in perfect harmony. :o)
lspitzner commented 2017-10-24 12:16:01 +02:00 (Migrated from github.com)

@ThomasLocke And i share that hope. i have left this ticket open so other atom users can connect. I merely felt obliged to give some kind of response, even if it is "i cannot help currently with this".

@ThomasLocke And i share that hope. i have left this ticket open so other atom users can connect. I merely felt obliged to give some kind of response, even if it is "i cannot help currently with this".
lspitzner commented 2017-10-27 14:30:54 +02:00 (Migrated from github.com)
fyi https://github.com/haskell/haskell-ide-engine/pull/311
Tehnix commented 2017-10-28 11:32:11 +02:00 (Migrated from github.com)

It should already be supported the same way hindent is in the ide-haskell package. You can read a bit in https://github.com/atom-haskell/ide-haskell/issues/20#issuecomment-242122031, but basically just plug in the brittany binary in place of stylish-haskell.

screenshot 2017-10-28 18 31 06

I'll look into support for https://github.com/Glavin001/atom-beautify which doesn't seem like that much work :)

It should already be supported the same way `hindent` is in the ide-haskell package. You can read a bit in https://github.com/atom-haskell/ide-haskell/issues/20#issuecomment-242122031, but basically just plug in the brittany binary in place of stylish-haskell. ![screenshot 2017-10-28 18 31 06](https://user-images.githubusercontent.com/1189998/32133202-3431ceb8-bc0e-11e7-95b8-7d2797251845.png) I'll look into support for https://github.com/Glavin001/atom-beautify which doesn't seem like that much work :)
Tehnix commented 2017-10-28 12:54:37 +02:00 (Migrated from github.com)

You can track the progress of atom-beautify PR in https://github.com/Glavin001/atom-beautify/pull/1911, which adds support for brittany and hindent.

You can track the progress of atom-beautify PR in https://github.com/Glavin001/atom-beautify/pull/1911, which adds support for brittany and hindent.
lspitzner commented 2018-07-05 23:22:40 +02:00 (Migrated from github.com)

@Tehnix I noticed the referenced PR is merged. Can you provide specific setup instructions? Or is a plain reference to atom-beautify sufficient? PR to readme welcome!

@Tehnix I noticed the referenced PR is merged. Can you provide specific setup instructions? Or is a plain reference to atom-beautify sufficient? PR to readme welcome!
Tehnix commented 2018-07-09 14:23:09 +02:00 (Migrated from github.com)

@lspitzner I completely forgot that PR because it lingered for so long. Although it's not the default formatter (IIRC), a reference to atom-beautify and mention that you need to specifically set the formatter for Haskell, should suffice.

@lspitzner I completely forgot that PR because it lingered for so long. Although it's not the default formatter (IIRC), a reference to atom-beautify and mention that you need to specifically set the formatter for Haskell, should suffice.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#62
There is no content yet.