move theme to package manager and try to setup rust + lsp mode

This commit is contained in:
Anthony Rodriguez 2023-06-07 09:25:40 +02:00
parent ecca0f2c74
commit 60f37d2528
No known key found for this signature in database
GPG key ID: 838541960B42C340
3 changed files with 37 additions and 1177 deletions

View file

@ -1,18 +1,3 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(elcord company company-mode pdf-tools org-roam magit expand-region doom-modeline all-the-icons vertico use-package))
'(warning-suppress-log-types '((use-package))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(setq user-full-name "Anthony Rodriguez") (setq user-full-name "Anthony Rodriguez")
(setq inhibit-startup-message t) (setq inhibit-startup-message t)
@ -30,12 +15,6 @@
(setq auto-save-default nil) (setq auto-save-default nil)
(add-to-list 'default-frame-alist '(font . "Monospace 14")) (add-to-list 'default-frame-alist '(font . "Monospace 14"))
;; Set theme
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'catppuccin t)
(setq catppuccin-flavor 'frappe)
(catppuccin-reload)
(add-hook 'text-mode-hook 'visual-line-mode) (add-hook 'text-mode-hook 'visual-line-mode)
;; Initialize package sources ;; Initialize package sources
@ -55,6 +34,14 @@
(require 'use-package) (require 'use-package)
(setq use-package-always-ensure t) (setq use-package-always-ensure t)
;; Set theme
(use-package catppuccin-theme
:custom
(catppuccin-flavor 'mocha)
:config
(load-theme 'catppuccin t))
;; ensures environment variables are available in GUI and daemon ;; ensures environment variables are available in GUI and daemon
(use-package exec-path-from-shell (use-package exec-path-from-shell
:config :config
@ -70,7 +57,8 @@
(use-package vertico (use-package vertico
:init :init
(vertico-mode)) (vertico-mode))
(use-package all-the-icons)
(use-package nerd-icons)
(use-package doom-modeline (use-package doom-modeline
:ensure t :ensure t
:init (doom-modeline-mode 1) :init (doom-modeline-mode 1)
@ -84,7 +72,6 @@
;; org setup ;; org setup
;; export to a4 ;; export to a4
(with-eval-after-load 'ox-latex (add-to-list 'org-latex-classes (with-eval-after-load 'ox-latex (add-to-list 'org-latex-classes
'("article" "\\documentclass[11pt,a4paper]{article}" '("article" "\\documentclass[11pt,a4paper]{article}"
("\\section{%s}" . "\\section*{%s}") ("\\section{%s}" . "\\section*{%s}")
@ -103,6 +90,7 @@
(:map org-mode-map (:map org-mode-map
(("C-c n i" . org-roam-node-insert) (("C-c n i" . org-roam-node-insert)
("C-c n l" . org-roam-buffer-toggle))))) ("C-c n l" . org-roam-buffer-toggle)))))
(setq org-publish-project-alist (setq org-publish-project-alist
(list (list
'("notes" '("notes"
@ -162,41 +150,33 @@
(pdf-tools-install) (pdf-tools-install)
(setq-default pdf-view-display-size 'fit-width)) (setq-default pdf-view-display-size 'fit-width))
;; make language settings work with latex exports (use-package rustic
(add-to-list 'org-latex-packages-alist :custom
'("AUTO" "babel" t ("pdflatex" "xelatex" "lualatex"))) (rustic-format-on-save t))
(add-to-list 'org-latex-packages-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
;; lsp configuration ;; lsp configuration
(use-package eglot) (use-package lsp-mode
(add-hook 'prog-mode-hook 'eglot-ensure) :init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "C-c l")
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
(prog-mode . lsp)
;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp)
;; in buffer auto completion (use-package company)
(use-package company
:hook (prog-mode . emacs-lisp-mode))
;; discord integration (custom-set-variables
(use-package elcord ;; custom-set-variables was added by Custom.
:config ;; If you edit it by hand, you could mess it up, so be careful.
(elcord-mode)) ;; Your init file should contain only one such instance.
;; Makes sure elcord doesn't run on empty frames (for daemonized setups) - https://github.com/Mstrodl/elcord/issues/17#issuecomment-571383324 ;; If there is more than one, they won't work right.
(defun elcord--disable-elcord-if-no-frames (f) '(package-selected-packages
(declare (ignore f)) '(lsp-mode which-key vertico use-package rustic pdf-tools org-roam magit guess-language expand-region exec-path-from-shell elcord eglot doom-modeline company catppuccin-theme all-the-icons)))
(when (let ((frames (delete f (visible-frame-list)))) (custom-set-faces
(or (null frames) ;; custom-set-faces was added by Custom.
(and (null (cdr frames)) ;; If you edit it by hand, you could mess it up, so be careful.
(eq (car frames) terminal-frame)))) ;; Your init file should contain only one such instance.
(elcord-mode -1) ;; If there is more than one, they won't work right.
(add-hook 'after-make-frame-functions 'elcord--enable-on-frame-created))) )
(defun elcord--enable-on-frame-created (f)
(declare (ignore f))
(elcord-mode +1))
(defun my/elcord-mode-hook ()
(if elcord-mode
(add-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)
(remove-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)))
(add-hook 'elcord-mode-hook 'my/elcord-mode-hook)

File diff suppressed because it is too large Load diff