mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add :lang json module
Removes json-mode from :lang data and adds LSP support (#2502).
This commit is contained in:
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))
|
Reference in New Issue
Block a user