diff --git a/README.org b/README.org index 61c0e026..8d2727b5 100644 --- a/README.org +++ b/README.org @@ -341,6 +341,11 @@ I am currently using NixOS. In order for emacs to have access to certain program (setenv "CXX" "/run/current-system/sw/bin/g++") #+end_src +Also due to using greetd, emacs isn't started with the environment from the system, so let's make sure it knows which wayland display we are using +#+begin_src emacs-lisp +(setenv "WAYLAND_DISPLAY" "wayland-1") +#+end_src + #+RESULTS: : /nix/var/nix/profiles/per-user/%u @@ -1997,6 +2002,11 @@ Let's also set =hl-line-mode= to be on for comint and prog modes (add-hook 'prog-mode-hook 'hs-minor-mode) #+END_SRC +Finally, here are some auto modes I'd like to setup +#+begin_src emacs-lisp +(add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) +#+end_src + *** Tree Sitter I'm gonna try this to speed up emacs and make it nicer #+begin_src emacs-lisp @@ -2042,6 +2052,16 @@ In c++ I just want to make sure lsp is called when enter c++-mode (add-hook 'c-mode-common-hook (lambda () (add-hook 'before-save-hook 'astyle-before-save))) #+END_SRC +*** Rust +I'd like to start learning and using rust if I can. +#+begin_src emacs-lisp +(use-package rustic + :config + ;; comment to disable rustfmt on save + (setq rustic-format-on-save t + rustic-lsp-client 'eglot)) +#+end_src + *** Web For developing websites, I like to use web-mode #+begin_src emacs-lisp @@ -2131,11 +2151,15 @@ Let's give eglot a try. (use-package eglot :commands eglot :hook - (c++-mode . eglot-ensure)) + (c++-mode . eglot-ensure) + (rust-mode . eglot-ensure)) #+end_src #+begin_src emacs-lisp -(use-package consult-eglot) +(use-package consult-eglot + :general + (general-def 'normal eglot-mode-map + "gs" 'consult-eglot-symbols)) #+end_src *** CMAKE diff --git a/init.el b/init.el index 68a5840c..1b0e9e6a 100644 --- a/init.el +++ b/init.el @@ -148,6 +148,8 @@ (which-key-mode) :defer 1) +(setenv "WAYLAND_DISPLAY" "wayland-1") + (executable-find "ssh") (setq ispell-program-name "hunspell" ispell-local-dictionary "en_US" @@ -1376,6 +1378,8 @@ targets." (add-hook 'prog-mode-hook 'hl-line-mode) (add-hook 'prog-mode-hook 'hs-minor-mode) +(add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) + (use-package tree-sitter :config (global-tree-sitter-mode +1) @@ -1413,6 +1417,12 @@ targets." (add-hook 'c-mode-common-hook (lambda () (add-hook 'before-save-hook 'astyle-before-save))) +(use-package rustic + :config + ;; comment to disable rustfmt on save + (setq rustic-format-on-save t + rustic-lsp-client 'eglot)) + (use-package web-mode :config (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) @@ -1445,9 +1455,13 @@ targets." (use-package eglot :commands eglot :hook - (c++-mode . eglot-ensure)) + (c++-mode . eglot-ensure) + (rust-mode . eglot-ensure)) -(use-package consult-eglot) +(use-package consult-eglot + :general + (general-def 'normal eglot-mode-map + "gs" 'consult-eglot-symbols)) (use-package cmake-mode :mode ("\\CMakeLists.txt\\'" . cmake-mode)) @@ -2441,3 +2455,20 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (setq warning-suppress-types '((comp))) +(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. + '(pdf-misc-print-program "/usr/bin/lpr") + '(pdf-misc-print-program-args '("-o media=Letter" "-o fitplot")) + '(safe-local-variable-values + '((aggressive-indent-mode) + (projectile-project-run-cmd . "./bld/bin/presenter") + (projectile-project-compilation-cmd . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -B bld/ . && make -j8 --dir bld/ && rm -rf ~/.cache/librepresenter/LibrePresenter/qmlcache/")))) +(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. + '(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36")))) diff --git a/recentf b/recentf index 57e9c006..bb9f67fa 100644 --- a/recentf +++ b/recentf @@ -1,4 +1,4 @@ -;;; Automatically generated by ‘recentf’ on Tue Dec 6 05:49:42 2022. +;;; Automatically generated by ‘recentf’ on Wed Dec 7 13:39:52 2022. (setq recentf-list 'nil)