emacs-fsharp-mode icon indicating copy to clipboard operation
emacs-fsharp-mode copied to clipboard

Linting and Colorization

Open nosami opened this issue 8 years ago • 15 comments

I noticed that linting and colorization are supported by fsautocomplete. Do you want PRs for these?

nosami avatar Feb 02 '16 14:02 nosami

That would be great :-).

  1. Linting. I would probably leave this off by default so as not to surprise people.
  2. Colorization. It is only the very basic extended information about new computation expressions, as far as I know. You can see what it gives in the corresponding FSAC test. I think the easiest place to hook it in, if you think it is worthwhile, would be to make this function aware of some variable https://github.com/fsharp/emacs-fsharp-mode/blob/master/fsharp-mode-font.el#L216. You can see from the string case that you can do arbitrary processing, so checking a pre-populated variable should be easy.

rneatherway avatar Feb 02 '16 15:02 rneatherway

For linting, I was thinking it might be a good idea to integrate it with flycheck.

Could do the same for compiler errors too.

nosami avatar Feb 02 '16 18:02 nosami

For linting, I was thinking it might be a good idea to integrate it with flycheck.

I'm not intrinsically against it, but what are the benefits compared to the current approach?

rneatherway avatar Feb 02 '16 23:02 rneatherway

The error list can be useful and it has plugins for most languages. It's very widely used.

Also, using that would probably cut down the amount of code in emacs-fsharp-mode.

nosami avatar Feb 03 '16 12:02 nosami

Also, using that would probably cut down the amount of code in emacs-fsharp-mode.

That's reason enough :-)

Sure I would accept a PR on that basis.

rneatherway avatar Feb 03 '16 12:02 rneatherway

If possible flycheck is definitely the way to go here.

delexi avatar Mar 18 '16 06:03 delexi

Just wanted to say that I've not forgotten about this. I got linting working pretty quickly but hit a bug where it was linting continuously (even while not typing) and just not had chance to go back and fix it yet.

screen shot 2016-02-09 at 14 14 31

nosami avatar Mar 18 '16 14:03 nosami

Cool that's looking really nice!

rneatherway avatar Mar 18 '16 14:03 rneatherway

@nosami Which theme is this?

delexi avatar Mar 18 '16 19:03 delexi

@delexi it's gruvbox

nosami avatar Mar 18 '16 19:03 nosami

:+1: for flycheck @nosami Do you have an up2date branch of your work I can try?

juergenhoetzel avatar Jun 21 '16 19:06 juergenhoetzel

@juergenhoetzel Not up to date, but it's here https://github.com/nosami/emacs-fsharp-mode. Sorry, not had any time!

nosami avatar Jun 21 '16 19:06 nosami

Thanks. I will give it a try.

juergenhoetzel avatar Jun 21 '16 19:06 juergenhoetzel

Since flycheck support is implemented, I suspect this issue can be closed :question:

juergenhoetzel avatar Jun 03 '17 11:06 juergenhoetzel

We don't have colorization, but it isn't a big deal.

rneatherway avatar Jun 06 '17 16:06 rneatherway