Giter Club home page Giter Club logo

sublime-fsharp's Introduction

F# Syntax Definitions for Sublime Text 2

F# syntax definitions for Sublime Text 2. When installed, these provide syntax highlighting to make it easier to work with F# source code.


Supports

  • F# source files and scripts (.fs, .fsi, .fsx)
  • fslex (.fsl) and fsyacc (.fsy)
    • These are modified versions of the ocamllex and ocamlyacc definitions which ship with Sublime Text.

TODO

  • Bugfixes

    • Some keywords and compiler directives aren't highlighted.

    • Verbatim strings are not yet supported (i.e., they're not highlighted correctly).

    • In the fslex and fsyacc definitions:

      • Some text elements are highlighted correctly (i.e., they're recognized and the correct color/style is applied), but the last character in the token isn't highlighted.

      • If the single-line comment token // occurs on the same line as and before the closing token of a multi-line comment *), the // eats the rest of the line -- including the *). This causes the multi-line comment not to be closed, so the rest of the file will be highlighted as if it were commented-out. For example:

        (* Some comment text, with a link below it:
           http://foobar.com/baz *)
    • The following code isn't highlighted correctly when the record instantiation is moved above the List.foldBack and the forward pipeline |> operator is used to apply the record to List.foldBack. It's likely a scoping-related issue, since TextMate / Sublime Text 2 syntax definitions only allow patterns to be matched within a single line. Scoping constructs must be used to identify multi-line patterns.

      { Header = $1;
        Tokens = [];
        Types = [];
        Associativities = [];
        StartSymbols = [];
        Rules = $4; }
      |> List.foldBack (fun f x -> f x) $2
  • Future

    • Syntax highlighting for F# Interactive when used through SublimeREPL.
    • Once the bugs are fixed, I'll create a package and for this and submit it to Package Control so it can be installed from within Sublime Text.

License

sublime-fsharp is released under the Simplified BSD License. See the LICENSE.md file for full license text.

sublime-fsharp's People

Contributors

jack-pappas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.