adding yuck and rust
This commit is contained in:
parent
199936d7d5
commit
88b47875d7
28
README.org
28
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++")
|
(setenv "CXX" "/run/current-system/sw/bin/g++")
|
||||||
#+end_src
|
#+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:
|
#+RESULTS:
|
||||||
: /nix/var/nix/profiles/per-user/%u
|
: /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)
|
(add-hook 'prog-mode-hook 'hs-minor-mode)
|
||||||
#+END_SRC
|
#+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
|
*** Tree Sitter
|
||||||
I'm gonna try this to speed up emacs and make it nicer
|
I'm gonna try this to speed up emacs and make it nicer
|
||||||
#+begin_src emacs-lisp
|
#+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)))
|
(add-hook 'c-mode-common-hook (lambda () (add-hook 'before-save-hook 'astyle-before-save)))
|
||||||
#+END_SRC
|
#+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
|
*** Web
|
||||||
For developing websites, I like to use web-mode
|
For developing websites, I like to use web-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -2131,11 +2151,15 @@ Let's give eglot a try.
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:commands eglot
|
:commands eglot
|
||||||
:hook
|
:hook
|
||||||
(c++-mode . eglot-ensure))
|
(c++-mode . eglot-ensure)
|
||||||
|
(rust-mode . eglot-ensure))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+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
|
#+end_src
|
||||||
|
|
||||||
*** CMAKE
|
*** CMAKE
|
||||||
|
|
35
init.el
35
init.el
|
@ -148,6 +148,8 @@
|
||||||
(which-key-mode)
|
(which-key-mode)
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
|
(setenv "WAYLAND_DISPLAY" "wayland-1")
|
||||||
|
|
||||||
(executable-find "ssh")
|
(executable-find "ssh")
|
||||||
(setq ispell-program-name "hunspell"
|
(setq ispell-program-name "hunspell"
|
||||||
ispell-local-dictionary "en_US"
|
ispell-local-dictionary "en_US"
|
||||||
|
@ -1376,6 +1378,8 @@ targets."
|
||||||
(add-hook 'prog-mode-hook 'hl-line-mode)
|
(add-hook 'prog-mode-hook 'hl-line-mode)
|
||||||
(add-hook 'prog-mode-hook 'hs-minor-mode)
|
(add-hook 'prog-mode-hook 'hs-minor-mode)
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode))
|
||||||
|
|
||||||
(use-package tree-sitter
|
(use-package tree-sitter
|
||||||
:config
|
:config
|
||||||
(global-tree-sitter-mode +1)
|
(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)))
|
(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
|
(use-package web-mode
|
||||||
:config
|
:config
|
||||||
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||||
|
@ -1445,9 +1455,13 @@ targets."
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:commands eglot
|
:commands eglot
|
||||||
:hook
|
: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
|
(use-package cmake-mode
|
||||||
:mode ("\\CMakeLists.txt\\'" . cmake-mode))
|
:mode ("\\CMakeLists.txt\\'" . cmake-mode))
|
||||||
|
@ -2441,3 +2455,20 @@ interfere with the default `bongo-playlist-buffer'."
|
||||||
gcmh-verbose nil))
|
gcmh-verbose nil))
|
||||||
|
|
||||||
(setq warning-suppress-types '((comp)))
|
(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"))))
|
||||||
|
|
Loading…
Reference in a new issue