fsharp / emacs-fsharp-mode

F# Emacs mode
Apache License 2.0
208 stars 61 forks source link

Linting and Colorization #55

Open nosami opened 8 years ago

nosami commented 8 years ago

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

rneatherway commented 8 years ago

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.
nosami commented 8 years ago

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

Could do the same for compiler errors too.

rneatherway commented 8 years ago

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?

nosami commented 8 years ago

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.

rneatherway commented 8 years ago

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.

delexi commented 8 years ago

If possible flycheck is definitely the way to go here.

nosami commented 8 years ago

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
rneatherway commented 8 years ago

Cool that's looking really nice!

delexi commented 8 years ago

@nosami Which theme is this?

nosami commented 8 years ago

@delexi it's gruvbox

juergenhoetzel commented 8 years ago

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

nosami commented 8 years ago

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

juergenhoetzel commented 8 years ago

Thanks. I will give it a try.

juergenhoetzel commented 7 years ago

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

rneatherway commented 7 years ago

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