Coder Social home page Coder Social logo

emacsmirror / vale-mode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaybosamiya/vale-mode.el

0.0 2.0 0.0 38 KB

Major mode for writing Vale vaf files

Home Page: https://github.com/jaybosamiya/vale-mode.el

License: Apache License 2.0

Emacs Lisp 100.00%

vale-mode's Introduction

Use Vale in Emacs!

Adds support for editing Vale (Verified Assembly Language for Everest) files, and interacting with the prover.

Setup

Vale Mode requires Emacs 25 or newer.

It is distributed through MELPA.

  1. Add the following to your init file (usually .emacs) if it is not already there:

    (require 'package)
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
    (package-initialize)
  2. Restart Emacs, then run M-x package-refresh-contents and M-x package-install RET vale-mode RET. Future updates can be downloaded using M-x list-packages U x y.

  3. To be able to use the interactive portions of Vale, make sure to have python3 on your path, and to set the vale-interact-path to point to interact.py from vale.

    (setq-default vale-interact-path "/PATH/TO/interact.py")
  4. To be able to quickly jump around between procedures, make sure to have etags on your path.

Alternate setup using use-package

use-package makes your init file configuration extremely tidy, and also makes it easy to ensure that all the packages you want are automatically installed when on a new machine.

Use the following code in your init file to ensure that you've got use-package (after the (package-initialize)):

(eval-when-compile
  (or (require 'use-package nil t)
      (progn
	(package-refresh-contents)
	(package-install 'use-package)
        (message "On a new system. Just installed use-package!"))))

Now, you can install vale-mode simply by using the following declaration in your init file:

(use-package vale-mode
  :ensure t
  :custom
  (vale-interact-path "/PATH/TO/interact.py")
  :mode ("\\.vaf\\'" . vale-mode))

Keybindings

Key Action
C-c C-c Use Vale interactively
C-c C-t Create a TAGS file for quickly jumping between procedures
C-c C-a Switch to corresponding generated .fst file. Repeat with the .fst to jump to the .fsti.
C-. Jump to definition of procedure under the cursor
C-' Jump to definition of procedure under the cursor (in another window)
C-, Pop back to previous location

LICENSE

Apache License 2.0

Copyright 2019 Jay Bosamiya

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

vale-mode's People

Contributors

jaybosamiya avatar

Watchers

 avatar  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.