Recent

Author Topic: SynEdit Implementing New languages  (Read 705 times)

Saylo_49

  • New Member
  • *
  • Posts: 34
SynEdit Implementing New languages
« on: March 15, 2019, 08:34:09 pm »
Hello everyone  :)  :) :)
I have a few questions about SynEdit component

1/ The code folding feature for each language
Is it implemented in the SynEdit main component (The editor) OR it is implemented in the Language highlighting units (The highlighters)

2/ Does anyone trying or working actually on adding highlighters for new languages, like Go, Groovy, Elixir, Swift, F#, ...
Lazarus 2.0.2 - FPC 3.0.4 - Win32

john horst

  • Jr. Member
  • **
  • Posts: 52
Re: SynEdit Implementing New languages
« Reply #1 on: March 16, 2019, 12:33:53 am »
http://wiki.lazarus.freepascal.org/SynEdit_Highlighter

I don't know about if anyone is working on newer ones.

Edson

  • Hero Member
  • *****
  • Posts: 1041
Re: SynEdit Implementing New languages
« Reply #2 on: March 16, 2019, 04:22:57 am »
1/ The code folding feature for each language
Is it implemented in the SynEdit main component (The editor) OR it is implemented in the Language highlighting units (The highlighters)

2/ Does anyone trying or working actually on adding highlighters for new languages, like Go, Groovy, Elixir, Swift, F#, ...

1) Code folding is implemented in highlighters.
2) Yes. I remember some people have implemented new custom highlighters. I did too.

If you want to create highlighters for new languages, you can use my scriptable highlighter https://github.com/t-edson/SynFacilSyn
It includes blocks definition and code folding.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5575
    • wiki
Re: SynEdit Implementing New languages
« Reply #3 on: March 16, 2019, 05:21:53 am »
The link John posted is a tutorial.
The sample sources are in the lazarus install folder, in the subfolder examples.