Giter Club home page Giter Club logo

jq-ts-mode's Introduction

Jq Major Mode using tree-sitter

License: GPL v3

This package provides a major-mode for jq using the tree-sitter grammar for Jq from tree-sitter-jq.

Features:

  • indentation
  • font-locking
  • imenu
  • structural navigation with treesitter objects

example

For a major-mode without tree-sitter see jq-mode.

Installing

Emacs 29.1 or above with tree-sitter support is required.

Tree-sitter starter guide: https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/notes/tree-sitter/starter-guide?h=emacs-29

Install tree-sitter parser for jq

Add the source to treesit-language-source-alist.

(add-to-list
 'treesit-language-source-alist
 '(jq "https://github.com/nverno/tree-sitter-jq"))

Then run M-x treesit-install-language-grammar and select jq to install the shared library.

Install jq-ts-mode from melpa

M-x package-install jq-ts-mode

Install jq-ts-mode.el from source

  • Clone this repository
  • Add the following to your emacs config
(require "[cloned nverno/jq-ts-mode]/jq-ts-mode.el")

Troubleshooting

If you get the following warning:

⛔ Warning (treesit): Cannot activate tree-sitter, because tree-sitter
library is not compiled with Emacs [2 times]

Then you do not have tree-sitter support for your emacs installation.

If you get the following warnings:

⛔ Warning (treesit): Cannot activate tree-sitter, because language grammar for jq is unavailable (not-found): (libtree-sitter-jq libtree-sitter-jq.so) No such file or directory

then the jq grammar file is not properly installed on your system.

jq-ts-mode's People

Contributors

nverno avatar

Stargazers

9glenda avatar Arialdo Martini avatar Daniel Mahler avatar

Watchers

 avatar  avatar

Forkers

emacsmirror

jq-ts-mode's Issues

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.