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
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))
|
Loading…
Add table
Add a link
Reference in a new issue