This commit is contained in:
ry
2022-01-11 18:05:13 -08:00
parent 2046befee2
commit 8e7b654716
846 changed files with 71287 additions and 4 deletions

View File

@@ -0,0 +1,40 @@
#+TITLE: lang/json
#+DATE: April 23, 2020
#+SINCE: v3.0.0
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
This module provides JSON support.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
+ =+lsp= Enable integration with LSP servers, if one is available. Requires the
=:tools lsp= module to be enabled.
** Plugins
+ [[https://github.com/joshwnj/json-mode][json-mode]]
+ [[https://github.com/Sterlingg/json-snatcher][json-snatcher]]
* Prerequisites
This module has no prerequisites.
* TODO Features
# An in-depth list of features, how to use them, and their dependencies.
* TODO Configuration
# How to configure this module, including common problems and how to address them.
* TODO Troubleshooting
# Common issues and their solution, or places to look for help.

View File

@@ -0,0 +1,31 @@
;;; lang/json/config.el -*- lexical-binding: t; -*-
(use-package! json-mode
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'"
:init
(when (featurep! +lsp)
(add-hook 'json-mode-local-vars-hook #'lsp!))
:config
(set-electric! 'json-mode :chars '(?\n ?: ?{ ?}))
(map! :after json-mode
:map json-mode-map
:localleader
:desc "Copy path" "p" #'json-mode-show-path
"t" #'json-toggle-boolean
"d" #'json-mode-kill-path
"x" #'json-nullify-sexp
"+" #'json-increment-number-at-point
"-" #'json-decrement-number-at-point
"f" #'json-mode-beautify))
(use-package! counsel-jq
:when (featurep! :completion ivy)
:defer t
:init
(map! :after json-mode
:map json-mode-map
:localleader
"s" #'counsel-jq))

View File

@@ -0,0 +1,5 @@
;;; lang/json/doctor.el -*- lexical-binding: t; -*-
(when (and (featurep! :completion ivy)
(not (executable-find "jq")))
(warn! "Couldn't find jq. counsel-jq won't work." ))

View File

@@ -0,0 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/json/packages.el
(package! json-mode :pin "0e819e519ae17a2686e0881c4ca51fa873fa9b83")
(package! json-snatcher :pin "b28d1c0670636da6db508d03872d96ffddbc10f2")
(when (featurep! :completion ivy)
(package! counsel-jq :pin "8cadd2e96470402ede4881b4e955872976443689"))