Provides syntax highlighting and inline error reporting for the Ott semantics tool.
The emphasis is on visually distinguishing the meta-language from the language being modeled. As a result, the files end up quite colorful.
I've optimized this for the One Dark Pro theme, but it should look okay with any theme. Some classes might not get distinguished if your theme doesn't define colors for enough scopes, though.
I'm no expert when it comes to visual design, so pull-requests are welcome with regards to the color choices.
Build-on-Save and Inline Error Reporting
When you save your file, it will be run with
ott and any errors will be reported inline.
ott is run with no arguments. However, if your file contains a magic comment of the form:
% !Ott output file.ext
Then, Ott will be run with with the option
Other magic comments are avaliable:
% !Ott flag NAMEpasses
% !Ott option NAME VALUEpasses
-name valueto ott
% !Ott binary /some/pathuses
/some/pathas the command to invoke Ott
% !Ott noCheckOutputsdisables checking the Coq outputs
% !Ott noOutputSourceLocdisables source locations in output (and checking the Coq outputs)
Checking generated code
If Coq is specified as an output, then the plugin will attempt to compile the generated Coq code, tracing any errors or warnings back to their origin in the Ott file.
This can be disabled with the
noCheckOutputs magic comment above.
Must have the Ott binary installed.
Syntax highlighting recognizes some languages within the
if you have a language pack installed for that language.
Recommended packages to allow this are:
ott.ott_command: the command used to invoke the Ott compiler. Defaults to
- Check-on-save always on, should be optional
- Source-code formatting
- Inline unicode replacement, something like prettify-symbols-mode.
Contributions are welcome and encouraged! Feel free to leave any issues or submit pull requests. Alternately, if you would like to collaborate, I will happily add collaborators to the repo.
[ 0.0.7 ]
- Updated for Ott 0.29 error message format (see #41)
- Remove buggy postprocessing command
- Revamp magic comments system
- Support for showing Coq errors in generated code
- Much more configurable
[ 0.0.6 ]
- Fix regression in parse "no parse" errors
- Add parsing for "no conclusion" errors
- Internal warnings are now marked as Information, not Warning
[ 0.0.5 ]
- postprocess uses exec, not spawn
[ 0.0.4 ]
- Error parsing for bad contextrules
- Add "postprocess" option for magic comments
[ 0.0.3 ]
- Remove ansi-strip dependency
- Add output from Ott binary to "Output" pane
[ 0.0.2 ]
- Improved and cleaner error parsing
- Add back brackets to surrounding pairs, remove single quotes (messes up with prime variables)
- Logo and screenshot added
[ 0.0.1 ]
- Initial release