Explain that .csp files are HTML files.

They are “C++ Server Pages” from Drogon.
This commit is contained in:
tastytea 2021-08-19 14:52:09 +02:00
parent eb6fe2521b
commit 2fd22076e9
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,7 @@
(add-to-list 'lsp-clients-clangd-args "--background-index" t))
;; Mark lsp-clients-clangd-args as safe to override.
(put 'lsp-clients-clangd-args 'safe-local-variable #'consp)
(add-to-list 'lsp-language-id-configuration '(".*\\.csp$" . "html"))
(defun my/lsp-init ()
"Change some settings after entering lsp-mode."

View File

@ -38,7 +38,8 @@
(replace-match "<p>\\1</p>"))))
:mode (("\\.[ps]?html?$" . web-mode)
("\\.tmpl$" . web-mode) ; Gitea templates.
("\\.php$" . web-mode))
("\\.php$" . web-mode)
("\\.csp$" . web-mode)) ; Drogon templates (C++ Server Pages).
:hook (web-mode . (lambda () (set-fill-column 120)))
:bind ("C-c C-M-h" . my/html-surround-with-tag))