vimerl icon indicating copy to clipboard operation
vimerl copied to clipboard

erlangFun not used?

Open djui opened this issue 13 years ago • 13 comments

Hej,

I can't see where erlangFun for syntax highlighting is used. In fact, all my fun declarations are as normal text. Is this intended?

djui avatar Mar 14 '11 16:03 djui

I don't think that is intended, but I can't really remember.

What do you propose?

oscarh avatar Mar 14 '11 17:03 oscarh

Well, if is the regexp was deleted by accident, you might be able to restore from git history. Otherwise writing a regexp should be rather straightforward as I saw it exists already foe the folding functionality.

djui avatar Mar 14 '11 17:03 djui

I think I found the commit when erlangFun (erlangFunction?) was removed. Maybe by accident? 885c4114475d6690f648034bd7a5f661e57d993f

djui avatar Mar 14 '11 22:03 djui

Ok, I guess I have a pattern now. It looks like this:

syn match erlangFun /^\%([a-z]\w*\|'\w\+'\)/
:
hi link erlangFun Function

djui avatar Mar 14 '11 22:03 djui

Hmm, since it was on the rewrite branch, maybe I didn't care much about keeping it. Maybe the pattern was to permitting....

oscarh avatar Mar 15 '11 10:03 oscarh

At least in my usage, having erlangFun is needed, otherwise I don't get any syntax highlighting for fun definitions. If you want, I can create a pull request and you can have a look at it and then merge it. Maybe I am overlooking something here, because it strikes me that nobody else complaints about this obvious missing highlighting. I have to say, I just started to use it... so "noob alert".

djui avatar Mar 15 '11 10:03 djui

Yes please do that. If you can base your fork on my master it would be good. The integration branch isn't going nowhere fast :(

oscarh avatar Mar 15 '11 11:03 oscarh

Ok, I hope I can do it tonight. Btw: Are use using something corresponding to Distel for Emacs?

djui avatar Mar 15 '11 11:03 djui

No not really. What are you using Distel for?

oscarh avatar Mar 15 '11 12:03 oscarh

Distel can do various things, among others:

  • a "better" way for looking up functions than ctags/etags
  • list all modules that call a function under the cursor
  • debug remote processes
  • open a module by just giving the module name (it will look up the location)
  • ...

In general Distel communicates with a specified erlang node that has a given code tree loaded and uses then beam information for lookups, debug, finding things.

It shouldn't be too hard to write a prototype of Distel for Vim, as a lot of functionality is actually in erlang, rather than emacs (/vim).

Are you using ctags?

djui avatar Mar 15 '11 12:03 djui

Maybe this chat shouldn't be in the issue about erlang funs not highlighted... I'll send you a message instead :)

oscarh avatar Mar 15 '11 13:03 oscarh

Hi Any news on this pull request?

geraud avatar Aug 22 '11 15:08 geraud

Hmm, maybe I'm wrong, but I recall this being merged... Maybe it never happened though...

oscarh avatar Aug 26 '11 10:08 oscarh