This commit is contained in:
Mars 2024-11-07 00:51:50 -05:00
parent 91715bbf93
commit 55a91359ab
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
2 changed files with 58 additions and 29 deletions

View file

@ -297,6 +297,17 @@
(dolist (mode '(prog-mode org-mode))
(ligature-set-ligatures mode common-ligatures)))
(global-ligature-mode t))
(defun my-c++-ligatures ()
"Display `-> void` as `◇` in C++ buffers."
(font-lock-add-keywords
nil
'(("-> void" ;; Match pattern
(0 (progn
(compose-region (match-beginning 0) (match-end 0) "◇")
nil))))))
(add-hook 'c++-mode-hook #'my-c++-ligatures)
#+end_src
** LSP
@ -316,6 +327,28 @@
:ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster")
:config (eglot-booster-mode))
(use-package php-mode
:ensure t)
(use-package web-mode
:ensure t
:mode
(("\\.phtml\\'" . web-mode)
("\\.php\\'" . web-mode)
("\\.tpl\\'" . web-mode)
("\\.[agj]sp\\'" . web-mode)
("\\.as[cp]x\\'" . web-mode)
("\\.erb\\'" . web-mode)
("\\.mustache\\'" . web-mode)
("\\.djhtml\\'" . web-mode))
:config
(setq web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2
web-mode-css-indent-offset 2)
web-mode-engines-alist
'(("php" . "\\.phtml\\'")
("blade" . "\\.blade\\.")))
(use-package eglot
:ensure nil
:config
@ -342,26 +375,23 @@
(setq eglot-server-programs
`(,@eglot-server-programs
'(nix-mode . ("nixd"))
'(php-mode . ("phpactor" "language-server"))
'(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))))
:hook
(rust-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure)
(sh-script-mode . eglot-ensure)
(python-mode . eglot-ensure)
(python-ts-mode . eglot-ensure)
(c++-mode . eglot-ensure)
(c-mode . eglot-ensure)
(c++-ts-mode . eglot-ensure)
(c-ts-mode . eglot-ensure)
(go-mode . eglot-ensure)
(go-ts-mode . eglot-ensure)
(json-mode . eglot-ensure)
(json-ts-mode . eglot-ensure)
(nix-mode . eglot-ensure)
(yaml-mode . eglot-ensure)
(yaml-ts-mode . eglot-ensure)
(c-mode . eglot-ensure)
(c-ts-mode . eglot-ensure)
(c++-mode . eglot-ensure)
(c++-ts-mode . eglot-ensure)
(c3-ts-mode . eglot-ensure)
(php-mode . eglot-ensure)
(rust-mode . eglot-ensure)
(go-mode . eglot-ensure)
(go-ts-mode . eglot-ensure))
(rust-ts-mode . eglot-ensure)
(yaml-mode . eglot-ensure)
(yaml-ts-mode . eglot-ensure))
(add-hook 'c-mode-hook 'hide-ifdef-mode)
(add-hook 'c++-mode-hook 'hide-ifdef-mode)

View file

@ -1,5 +1,5 @@
(setq elpaca-core-date '(20240911))
(defvar elpaca-installer-version 0.7)
(defvar elpaca-installer-version 0.8)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
@ -16,9 +16,9 @@
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let ((depth (plist-get order :depth)))
,@(when-let* ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout"
@ -47,4 +47,3 @@
(org-babel-load-file
(expand-file-name "config.org"
user-emacs-directory))