Add :lang json module

Removes json-mode from :lang data and adds LSP support (#2502).
This commit is contained in:
Henrik Lissner 2020-04-23 17:38:45 -04:00
parent 2d766cfa0c
commit b151abfd34
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 61 additions and 6 deletions

View 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))