Skip to content

feat: improve fypp syntax highlighting #617

Open
@gnikit

Description

@gnikit

Is there an existing request for this?

  • I have searched the existing issues

Feature Request

We don't handle very well the fypp syntax when it comes to syntax-highlighting. e.g.

#:set data_names = [ 'eg1', 'eg2' ]
module min_eg
  implicit none
  private

#:for dname in data_names

  public :: eg_${dname}$_t
  type :: eg_${dname}$_t
  contains
    procedure :: do_something => do_something_${dname}$
  end type eg_${dname}$_t

#:endfor

contains

#:for dname in data_names
  subroutine do_something_${dname}$ (this)
    implicit none
    class(eg_${dname}$_t) :: this
    print*, "this subroutine has no syntax highlighting with either extension"
  end subroutine do_something_${dname}$
#:endfor

end module min_eg

We will have to add a textmate file that inherits the default FreeForm syntax and then extends it when certain patterns are encountered. Link to fypp syntax: https://fypp.readthedocs.io/en/stable/fypp.html#preprocessor-language

CC @aradi

Metadata

Metadata

Assignees

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions