Add :lang json module
Removes json-mode from :lang data and adds LSP support (#2502).
This commit is contained in:
parent
2d766cfa0c
commit
b151abfd34
7 changed files with 61 additions and 6 deletions
|
@ -111,6 +111,7 @@ Modules that bring support for a language or group of languages to Emacs.
|
|||
+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +ghcide +lsp= - TODO
|
||||
+ hy - TODO
|
||||
+ [[file:../modules/lang/idris/README.org][idris]] - TODO
|
||||
+ [[file:../modules/lang/json/README.org][json]] =+lsp= - TODO
|
||||
+ java =+meghanada +lsp= - TODO
|
||||
+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support
|
||||
+ julia =+lsp= - TODO
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
;;(haskell +dante) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ;
|
||||
;;json ; At least it ain't XML
|
||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
|
|
|
@ -34,11 +34,6 @@
|
|||
:mode "\\.gql\\'"
|
||||
:config (setq-hook! 'graphql-mode-hook tab-width graphql-indent-level))
|
||||
|
||||
(use-package! json-mode
|
||||
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'"
|
||||
:config
|
||||
(set-electric! 'json-mode :chars '(?\n ?: ?{ ?})))
|
||||
|
||||
(after! jsonnet-mode
|
||||
(set-electric! 'jsonnet-mode :chars '(?\n ?: ?{ ?})))
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
;;; lang/data/packages.el
|
||||
|
||||
(package! graphql-mode :pin "7c37aee28b")
|
||||
(package! json-mode :pin "0e819e519a")
|
||||
(package! jsonnet-mode :pin "d8b486c837")
|
||||
(package! yaml-mode :pin "cecf4b106b")
|
||||
(package! csv-mode :pin "635337407c")
|
||||
|
|
40
modules/lang/json/README.org
Normal file
40
modules/lang/json/README.org
Normal 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 prereqisites.
|
||||
|
||||
* 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.
|
14
modules/lang/json/config.el
Normal file
14
modules/lang/json/config.el
Normal file
|
@ -0,0 +1,14 @@
|
|||
;;; 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
|
||||
"s" #'jsons-print-path))
|
5
modules/lang/json/packages.el
Normal file
5
modules/lang/json/packages.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/json/packages.el
|
||||
|
||||
(package! json-mode :pin "0e819e519a")
|
||||
(package! json-snatcher :pin "c4cecc0a50")
|
Loading…
Add table
Add a link
Reference in a new issue