8000 GitHub - andreabedini/vscode-ott · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ott for VS Code

Support for Ott specifications (.ott) in VS Code, through haskott's language server:

  • every problem of a specification, as you type;
  • go to definition, find references and highlight for metavariables, index variables and grammar rules, across the files of a specification;
  • an outline of each file;
  • rename, checked before it is applied;
  • highlighting that knows what the specification's grammar makes of each identifier: terminals, nonterminals, metavariables and index variables, in productions, rule lines and quotations.

A TextMate grammar highlights the metalanguage (keywords, comments, homs, productions, rule names) until the language server's semantic tokens arrive, and wherever they don't reach.

Requirements

The extension starts haskott lsp, so haskott must be installed. From a checkout of haskott:

$ cabal install exe:haskott

If haskott is not on your PATH, set ott.server.path to the executable.

A specification made of several files is listed in a haskott.json at or above them, in the order Ott reads them; see haskott's README. A file that no haskott.json lists is checked on its own.

Settings

  • ott.server.path: the haskott executable (default haskott).
  • ott.server.args: the arguments that start the server (default ["lsp"]).
  • ott.trace.server: log the messages between VS Code and the server (off, messages or verbose).

The Ott: Restart Language Server command restarts the server, as does changing ott.server.*.

Building

$ npm install
$ npm test          # type check and grammar tests
$ npm run build     # out/extension.js
$ npm run package   # ott-<version>.vsix

To try it, open this directory in VS Code and run the Run Extension launch configuration, or install the .vsix with Extensions: Install from VSIX….

test/grammar holds the grammar tests, in the format of vscode-tmgrammar-test.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0