Defining how to autoIdent language


#1

I’m writing language pack for language that does not use fixed suffix. Can I implement rule for auto identification that some text is written in my language? Rule can be based on specific keyword inside a file or it’s name.

Examples:

  • name - THIS.FILENAME.SHOULD.MATCH
  • specific text inside - <Rating>4168</Rating> or SUBROUTINE {filename}

#2

The grammar system can identify files by the first line of text in the file as well. This is how it identifies shell scripts for things like Ruby. See: