Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#36 Missing JavaScript / CSS file types

closed
None
4
2007-01-13
2006-11-05
Anonymous
No

File types for JavaScript and CSS are missing.
Biggest deficiency is the lack of syntax highlighting.

Discussion

  • Nick Treleaven
    Nick Treleaven
    2006-11-06

    Logged In: YES
    user_id=1268692

    There is already a filetype for CSS.

    JavaScript is supported with the HTML filetype. If you
    suggest some file extensions for JavaScript then these can
    be recognised with the HTML filetype so they are highlighted
    correctly. Alternatively if you have a pure JS file this
    could be associated with the Java filetype (yes I know JS !=
    Java, but that way you'd get functions in the symbol list).

     
  • Nick Treleaven
    Nick Treleaven
    2006-11-06

    • priority: 5 --> 2
     
  • Skateinmars
    Skateinmars
    2006-11-30

    Logged In: YES
    user_id=1487598
    Originator: NO

    I would like to support this request for javascript files support.

    The .js extension is commonly used for pure javascript file wich are currently not recognized at all.
    When we put the filetype to html, this gets better only if you put <script> tags at the top and the bottom of the file, and such tags should not be present in a pure .js file.

    Also, the java filetype does not work either.

    I think a js filetype would not be complicated to implement as the syntax highlighting is already here.

    PS : Anyway, thanks for your work and apologize for my bad english.

     
  • Nick Treleaven
    Nick Treleaven
    2006-12-01

    Logged In: YES
    user_id=1268692
    Originator: NO

    You're right, .js files would need a separate filetype. We would accept a javascript filetype patch, this would be good.

    The HTML syntax colouring including scripting support is setup in styleset_markup_init() and styleset_markup() of src/highlighting.c. SciTE has a separate filetype for JS, which may be helpful.

    You can also contact us via email or the mailing list.

     
  • Skateinmars
    Skateinmars
    2006-12-01

    Logged In: YES
    user_id=1487598
    Originator: NO

    Thanks for accepting this feature request.
    Although I would like to help including js filetype support, I have no C programming skills at all, so it seems I'll have to wait for someone to send the patch.

     
  • Nick Treleaven
    Nick Treleaven
    2006-12-01

    Logged In: YES
    user_id=1268692
    Originator: NO

    OK, I misinterpreted your other comment. We may implement this sometime.

     
  • Nick Treleaven
    Nick Treleaven
    2006-12-01

    • priority: 2 --> 4
     
  • Enrico Tröger
    Enrico Tröger
    2007-01-13

    • assigned_to: nobody --> eht16
    • status: open --> closed
     
  • Enrico Tröger
    Enrico Tröger
    2007-01-13

    Logged In: YES
    user_id=1117045
    Originator: NO

    Filetype javascript added in SVN r1181. Check it out. It might be that the symbol list is a bit buggy.