GithubHelp home page GithubHelp logo

russell / jsonnet-mode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tminor/jsonnet-mode

0.0 1.0 0.0 130 KB

Emacs major mode for editing Jsonnet files.

License: GNU General Public License v3.0

Emacs Lisp 100.00%

jsonnet-mode's Introduction

License: GPL v3

jsonnet-mode

Provides Emacs font-lock, indentation, and some useful functions for the Jsonnet templating language.

Table of Contents

Dependencies

The jsonnet-eval method depends on the jsonnet binary, which should be available on your exec-path. Install this on OSX with Homebrew by running brew install jsonnet.

Features

Indentation

The indentation rules are a set of rules which I put together based on my experience with Jsonnet. You can see them by looking at the implementation of jsonnet-calculate-indent.

Formatting

Closely related to indentation is formatting. By running jsonnet-reformat-buffer (bound to C-c C-r), the jsonnet fmt utility will reformat your buffer and make it pretty.

Rendering

To get a snapshot of what your Jsonnet file will render to, run jsonnet-eval (bound to C-c C-e). This will popup another window and show the result of running jsonnet-command on the current buffer.

Navigation

jsonnet-mode also provides some methods to make navigation easier. In particular, jsonnet-jump (bound to C-c C-f) allows you to jump to the definition of a given identifier.

Configuration

There are three customizable parameters that you may configure in this mode:

  • jsonnet-command allows you to indicate which Jsonnet binary should be used to render a JSON document.
  • jsonnet-library-search-directories specifies the sequence of Jsonnet library search directories use during evaluation.
    Relative paths in this sequence must resolve from the directory of the buffer being evaluated.
  • jsonnet-enable-debug-print will cause methods in jsonnet-mode to write messages to the status bar if enabled.

jsonnet-mode's People

Contributors

adamwg avatar benley avatar mgyucht avatar seh 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.