Coder Social home page Coder Social logo

divi255 / tla.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from susliko/tla.nvim

0.0 1.0 0.0 2.13 MB

TLA+/PlusCal support for Neovim (fork)

License: GNU General Public License v3.0

Lua 86.65% Makefile 0.65% TLA 5.29% Vim Script 1.85% Python 5.56%

tla.nvim's Introduction

TLA+/PlusCal support for NeoVim

tla.nvim is a Lua plugin built to provide IDE-like experience while developing TLA+ and PlusCal specifications. Powered by official TLA tooling.

Features

  • TLA tools installation
  • PlusCal to TLA+ translation
  • TLC model-checking
  • TLC output parsing and displaying
  • state graph dump to dot-formatted file
  • code snippets
  • diagnostics via LSP mechanisms
  • worksheets and REPL
  • PDF generation

Prerequisites

  • Neovim >= v0.5.0. While tla.nvim will aim to always work with the latest stable version of Neovim, there is no guarantee of compatibility with older versions.
  • Java >= 8. If you have the JAVA_HOME environment variable, plugin will work from the start. Otherwise you should specify the location of Java installation.
  • plenary.nvim. Make sure to have this installed

Installation

  1. Include the plugin to your config. For example, using packer:
use({"susliko/tla.nvim", requires = { "nvim-lua/plenary.nvim" }})
  1. Setup the plugin in your init.lua:
require("tla").setup()

This is equivalent to:

require("tla").setup{
  -- Path to java binary directory. $JAVA_HOME by default
  java_executable = "path/to/java/bin",

  -- Options passed to the jvm when running tla2tools
  java_opts = { '-XX:+UseParallelGC' },

  -- Only needed if you don't wont automatic tla2tools installation
  tla2tools = "path/to/tla2tools.jar", 
}

Commands

Command Lua API Description
TlaInstall require"tla.install".install_tla2tools() Downloads latest tla2tools release. Rewrites existing
TlaTranslate require"tla".translate() Translates PlusCal code in the current buffer into TLA+ code
TlaCheck require"tla".check() Model-checks TLA+ code in the current buffer and displays results

Demo

TODO gifs

Integrations

Syntax Highlighting

tree-sitter usage for syntax highlighting is encouraged; a tree-sitter grammar exists for TLA+ and PlusCal.

tla.nvim's People

Contributors

susliko avatar antosha417 avatar divi255 avatar ahelwer avatar

Watchers

 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.