Add web stuff
This commit is contained in:
parent
532ab5bbba
commit
b9852d2942
52
init.el
52
init.el
@ -436,9 +436,7 @@ visual states."
|
|||||||
;; eglot
|
;; eglot
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:demand t
|
:demand t
|
||||||
:hook (((c-ts-mode c++-ts-mode java-ts-mode rust-ts-mode python-ts-mode
|
:hook (eglot-managed-mode . my/-eglot-setup)
|
||||||
latex-mode markdown-mode blueprint-ts-mode) . eglot-ensure)
|
|
||||||
(eglot-managed-mode . my/-eglot-setup))
|
|
||||||
:init
|
:init
|
||||||
(defvar my/-eglot-documentation-buffer nil
|
(defvar my/-eglot-documentation-buffer nil
|
||||||
"Buffer for showing documentation for `my/eglot-documentation-at-point'.")
|
"Buffer for showing documentation for `my/eglot-documentation-at-point'.")
|
||||||
@ -590,13 +588,28 @@ COMMAND and COMINT are like `compile'."
|
|||||||
`(,(concat
|
`(,(concat
|
||||||
(regexp-opt '("gschema" "gresource" "ui")) "\\'") . nxml-mode)))
|
(regexp-opt '("gschema" "gresource" "ui")) "\\'") . nxml-mode)))
|
||||||
|
|
||||||
|
;; (La)TeX
|
||||||
|
(use-package tex-mode
|
||||||
|
:hook (latex-mode . eglot-ensure))
|
||||||
|
|
||||||
;; blueprint
|
;; blueprint
|
||||||
(use-package blueprint-ts-mode
|
(use-package blueprint-ts-mode
|
||||||
|
:hook (blueprint-ts-mode . eglot-ensure)
|
||||||
:after eglot)
|
:after eglot)
|
||||||
|
|
||||||
|
;; python-ts-mode
|
||||||
|
(use-package python-ts-mode
|
||||||
|
:ensure nil
|
||||||
|
:hook (python-ts-mode . eglot-ensure))
|
||||||
|
|
||||||
|
;; java-ts-mode
|
||||||
|
(use-package java-ts-mode
|
||||||
|
:hook (java-ts-mode . eglot-ensure))
|
||||||
|
|
||||||
;; c-ts-mode
|
;; c-ts-mode
|
||||||
(use-package c-ts-mode
|
(use-package c-ts-mode
|
||||||
:after evil
|
:after evil
|
||||||
|
:hook ((c-ts-mode c++-ts-mode) . eglot-ensure)
|
||||||
:bind (:map c-ts-mode-map
|
:bind (:map c-ts-mode-map
|
||||||
("C-c d" . realgud:gdb)
|
("C-c d" . realgud:gdb)
|
||||||
:map c++-ts-mode-map
|
:map c++-ts-mode-map
|
||||||
@ -616,12 +629,43 @@ COMMAND and COMINT are like `compile'."
|
|||||||
"go" #'ff-find-other-file
|
"go" #'ff-find-other-file
|
||||||
"gO" #'ff-find-other-file-other-window))
|
"gO" #'ff-find-other-file-other-window))
|
||||||
|
|
||||||
|
;; php-mode
|
||||||
|
(use-package php-mode
|
||||||
|
:hook (php-mode . eglot-ensure))
|
||||||
|
|
||||||
|
;; web-mode
|
||||||
|
(use-package web-mode
|
||||||
|
:hook (web-mode . eglot-ensure)
|
||||||
|
:init
|
||||||
|
(add-to-list 'eglot-server-programs
|
||||||
|
'(web-mode . ("vscode-html-language-server" "--stdio"))))
|
||||||
|
|
||||||
|
;; Polymode
|
||||||
|
(use-package polymode
|
||||||
|
:config
|
||||||
|
(define-hostmode my/poly-web-hostmode
|
||||||
|
:mode 'web-mode)
|
||||||
|
(define-innermode my/poly-php-innermode
|
||||||
|
:mode 'php-mode
|
||||||
|
:head-matcher "\<\?php"
|
||||||
|
:tail-matcher "\?\>"
|
||||||
|
:head-mode 'body
|
||||||
|
:tail-mode 'body)
|
||||||
|
(define-polymode my/poly-web-mode
|
||||||
|
:hostmode 'my/poly-web-hostmode
|
||||||
|
:innermodes '(my/poly-php-innermode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.php\\|\\.phtml\\'" . my/poly-web-mode)))
|
||||||
|
|
||||||
;; rust
|
;; rust
|
||||||
(use-package rust-mode)
|
(use-package rust-mode)
|
||||||
|
(use-package rust-ts-mode
|
||||||
|
:ensure nil
|
||||||
|
:hook (rust-ts-mode . eglot-ensure))
|
||||||
|
|
||||||
;; markdown
|
;; markdown
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:hook (markdown-mode . auto-fill-mode))
|
:hook ((markdown-mode . auto-fill-mode)
|
||||||
|
(markdown-mode . eglot-ensure)))
|
||||||
|
|
||||||
;; groovy
|
;; groovy
|
||||||
(use-package groovy-mode)
|
(use-package groovy-mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user