Add Python, org-babel languages, recentf max items, rustic-comp popper

This commit is contained in:
Joseph Ferano 2023-01-04 23:54:20 +07:00
parent 98276c52f8
commit 0fda5213de

View File

@ -129,9 +129,9 @@ need to benchmark slow init times later.
(require 'recentf) (require 'recentf)
(recentf-mode t) (recentf-mode t)
(setq recentf-auto-cleanup 'never) (setq recentf-auto-cleanup 10)
(setq recentf-keep '(file-remote-p file-readable-p)) (setq recentf-keep '(file-remote-p file-readable-p))
(setq recentf-max-saved-items 1000)
#+end_src #+end_src
This avoids those annoying *#backup#* files that get added and eventually slow down loading the file again. This avoids those annoying *#backup#* files that get added and eventually slow down loading the file again.
@ -694,6 +694,7 @@ The theme of `C-x 4` bindings is that they operate on other windows, so this fun
"^\\*lsp-help\\*" lsp-help-mode "^\\*lsp-help\\*" lsp-help-mode
"^\\*ert\\*" ert-results-mode "^\\*ert\\*" ert-results-mode
"^\\*cargo-test\\*" cargo-test-mode "^\\*cargo-test\\*" cargo-test-mode
"^\\*rustic-compilation\\*" rustic-compilation-mode
;; "^\\*ansi-term\\*$" term-mode ;; "^\\*ansi-term\\*$" term-mode
("^\\*Warnings\\*$" . hide) ("^\\*Warnings\\*$" . hide)
help-mode help-mode
@ -977,6 +978,7 @@ targets."
("D" "~/Documents/" "Documents") ("D" "~/Documents/" "Documents")
("b" "~/Documents/Books/" "Books") ("b" "~/Documents/Books/" "Books")
("p" "~/Development/" "Dev") ("p" "~/Development/" "Dev")
("t" "~/TYCS/" "Teachyourselfcs")
("r" "~/Repositories" "Repos") ("r" "~/Repositories" "Repos")
("B" "~/pCloudDrive/" "pCloud"))) ("B" "~/pCloudDrive/" "pCloud")))
@ -1029,10 +1031,15 @@ targets."
'org-babel-load-languages 'org-babel-load-languages
'((emacs-lisp . t) '((emacs-lisp . t)
(makefile . t) (makefile . t)
(ocaml . t)
(C . t)
(rust . t)
(shell . t))) (shell . t)))
(require 'org-tempo) (require 'org-tempo)
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(add-to-list 'org-structure-template-alist '("ml" . "src ocaml"))
(add-to-list 'org-structure-template-alist '("rs" . "src rust"))
(setq org-edit-src-content-indentation 0)) (setq org-edit-src-content-indentation 0))
(with-eval-after-load 'org (joe/org-init)) (with-eval-after-load 'org (joe/org-init))
@ -1157,7 +1164,10 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i
#+begin_src emacs-lisp #+begin_src emacs-lisp
(global-set-key [remap dabbrev-expand] 'hippie-expand) ;; (global-set-key [remap dabbrev-expand] 'hippie-expand)
;; (global-set-key [remap hippie-expand] 'dabbrev-expand)
;; (global-set-key (kbd "M-/") 'dabbrev-expand)
;; (straight-use-package 'kind-icon) ;; (straight-use-package 'kind-icon)
;; (require 'kind-icon) ;; (require 'kind-icon)
@ -1305,9 +1315,15 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i
:dap-compilation-dir "${workspaceFolder}")) :dap-compilation-dir "${workspaceFolder}"))
#+end_src #+end_src
** Languages ** Languages
*** Python
#+begin_src emacs-lisp
(straight-use-package 'elpy)
#+end_src>
*** Rust *** Rust
#+begin_src emacs-lisp #+begin_src emacs-lisp
(straight-use-package 'rustic) (straight-use-package 'rustic)
(straight-use-package 'ob-rust) ;; Org-Babel
;; Disabling until we figure out how to get it working ;; Disabling until we figure out how to get it working
;; (straight-use-package 'parsec) ;; Required by evcxr-mode ;; (straight-use-package 'parsec) ;; Required by evcxr-mode
@ -1345,10 +1361,10 @@ whether the point hasn't been moved. This way, if I switched to another popper b
it doesn't close it. it doesn't close it.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(straight-use-package 'disaster)
(defun joe/c-mode-hook () (defun joe/c-mode-hook ()
(local-set-key (kbd "C-x c r") (defun joe/make-run () (interactive) (compile "make run"))) (local-set-key (kbd "C-x c r") (defun joe/make-run () (interactive) (compile "make run")))
(local-set-key (kbd "C-x c c") (defun joe/make () (interactive) (compile "make"))) (local-set-key (kbd "C-x c c") (defun joe/make () (interactive) (compile "make")))
(straight-use-package 'disaster)
(electric-pair-local-mode t)) (electric-pair-local-mode t))
(add-hook 'c-mode-hook #'joe/c-mode-hook) (add-hook 'c-mode-hook #'joe/c-mode-hook)
@ -1367,18 +1383,6 @@ it doesn't close it.
(popper-close-latest)))))) (popper-close-latest))))))
(add-hook 'compilation-finish-functions 'joe/close-compilation-if-no-warn-err) (add-hook 'compilation-finish-functions 'joe/close-compilation-if-no-warn-err)
#+end_src
*** Go
#+begin_src emacs-lisp
(straight-use-package 'go-mode)
;; (straight-use-package 'go-imports)
#+end_src
*** FSharp
#+begin_src emacs-lisp
(straight-use-package 'fsharp-mode)
;; (straight-use-package 'eglot-fsharp)
#+end_src #+end_src
*** OCaml *** OCaml
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1425,6 +1429,18 @@ and there's no need for a middle-man when it's already been implemented.
;; Use opam switch to lookup ocamlmerlin binary ;; Use opam switch to lookup ocamlmerlin binary
(setq merlin-command 'opam))) (setq merlin-command 'opam)))
#+end_src #+end_src
*** FSharp
#+begin_src emacs-lisp
(straight-use-package 'fsharp-mode)
;; (straight-use-package 'eglot-fsharp)
#+end_src
*** Go
#+begin_src emacs-lisp
(straight-use-package 'go-mode)
;; (straight-use-package 'go-imports)
#+end_src
*** Other *** Other
#+begin_src emacs-lisp #+begin_src emacs-lisp
(straight-use-package 'json) (straight-use-package 'json)