10.12.24
This commit is contained in:
parent
607bb9b3b1
commit
0eb291ba55
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -11,3 +11,6 @@
|
|||
/recentf
|
||||
/transient/
|
||||
/early-init.el
|
||||
/.cache/
|
||||
/straight/
|
||||
/auto-save-list/
|
||||
|
|
37
init.org
37
init.org
|
@ -97,8 +97,10 @@ Remove visual elements:
|
|||
Warnings crop up every so often and they are usually unimportant.
|
||||
I disable this buffer when actively working on my config.
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq native-comp-async-report-warnings-errors 'silent) ;; native-comp warning
|
||||
(setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local))
|
||||
(setq native-comp-async-report-warnings-errors 'silent) ;; native-comp warning
|
||||
(setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local))
|
||||
(setq warning-minimum-level :emergency)
|
||||
(setq inhibit-message t)
|
||||
#+end_src
|
||||
|
||||
Backups / Auto-saves
|
||||
|
@ -159,7 +161,7 @@ Then, install =use-package= and tell it to always assume =:straight=:
|
|||
load org early to work around version mismatches:
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:straight t)
|
||||
:straight (:type built-in))
|
||||
#+end_src
|
||||
|
||||
Add package repositories and rank them by priority
|
||||
|
@ -726,7 +728,7 @@ PDF tools for latex previewing:
|
|||
Taken from [[https://sophiebos.io/posts/prettifying-emacs-org-mode/][ here]].
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:straight t
|
||||
:straight (:type built-in)
|
||||
:defer t
|
||||
:hook (org-mode . variable-pitch-mode)
|
||||
;; I basically always want to be running =visual-line-mode= anyway, but certainly in org-mode.
|
||||
|
@ -1312,6 +1314,7 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
lsp-rust-analyzer-binding-mode-hints t
|
||||
lsp-rust-analyzer-display-closure-return-type-hints t
|
||||
lsp-rust-analyzer-server-format-inlay-hints t)
|
||||
(add-to-list 'lsp-language-id-configuration '("CMakeLists.txt" . "cmake"))
|
||||
)
|
||||
|
||||
(use-package lsp-treemacs
|
||||
|
@ -1434,6 +1437,11 @@ clang-format
|
|||
:defer t)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package cmake-mode
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
** Zig
|
||||
Use =zls= automatically with lsp, and =zig-mode=:
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1468,6 +1476,27 @@ Shortcut for opening this file:
|
|||
)
|
||||
#+end_src
|
||||
|
||||
Open the current file with a =sudo= tramp:
|
||||
#+begin_src emacs-lisp
|
||||
(set-default 'tramp-default-proxies-alist (quote ((".*" "\\`root\\'" "/ssh:%h:"))))
|
||||
(require 'tramp)
|
||||
|
||||
(defun sudo-edit-current-file ()
|
||||
(interactive)
|
||||
(let ((position (point)))
|
||||
(find-alternate-file
|
||||
(if (file-remote-p (buffer-file-name))
|
||||
(let ((vec (tramp-dissect-file-name (buffer-file-name))))
|
||||
(tramp-make-tramp-file-name
|
||||
"sudo"
|
||||
(tramp-file-name-user vec)
|
||||
(tramp-file-name-host vec)
|
||||
(tramp-file-name-localname vec)))
|
||||
(concat "/sudo:root@localhost:" (buffer-file-name))))
|
||||
(goto-char position)))
|
||||
(evil-define-key 'normal 'global (kbd "<SPC>fe") 'sudo-edit-current-file)
|
||||
#+end_src
|
||||
|
||||
* Keybinds
|
||||
#+begin_src emacs-lisp
|
||||
(define-key custom-bindings-map (kbd "C-c l") 'org-store-link)
|
||||
|
|
Loading…
Reference in a new issue