Fix tangling
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
__init__.py
|
__init__.py
|
||||||
/fonts/.uuid
|
/fonts/.uuid
|
||||||
|
init.el
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ All changes to the configuration should be done in =init.org=, *not* in
|
|||||||
is replaced the first time Emacs is started (assuming it has been renamed
|
is replaced the first time Emacs is started (assuming it has been renamed
|
||||||
to =~/.emacs.d=).
|
to =~/.emacs.d=).
|
||||||
|
|
||||||
|
To use the tangled =init.el=, you should link it to =~/.emacs.d/init.el=:
|
||||||
|
#+begin_src sh :tangle no
|
||||||
|
ln -s ~/dots/files/init.el ~/.emacs.d/init.el
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Tangle
|
** Tangle
|
||||||
The =init.el= should (after the first run) mirror the source blocks in
|
The =init.el= should (after the first run) mirror the source blocks in
|
||||||
@@ -25,7 +29,7 @@ the =after-save-hook= ensuring to always tangle and byte-compile the
|
|||||||
"If the current buffer is 'init.org' the code-blocks are
|
"If the current buffer is 'init.org' the code-blocks are
|
||||||
tangled, and the tangled file is compiled."
|
tangled, and the tangled file is compiled."
|
||||||
(when (equal (buffer-file-name)
|
(when (equal (buffer-file-name)
|
||||||
(expand-file-name (concat user-emacs-directory "init.org")))
|
(expand-file-name "/home/marc/dots/files/init.org"))
|
||||||
;; Avoid running hooks when tangling.
|
;; Avoid running hooks when tangling.
|
||||||
(let ((prog-mode-hook nil))
|
(let ((prog-mode-hook nil))
|
||||||
(org-babel-tangle))))
|
(org-babel-tangle))))
|
||||||
@@ -596,43 +600,7 @@ Sometimes, a big red TODO is more intimidating than one with normal text color.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** LSP, completion, projects
|
** Code completion
|
||||||
*** lsp-mode
|
|
||||||
=lsp-mode= is feature-richer than =eglot=, so I'm using this one.
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
|
||||||
(use-package lsp-mode :straight t
|
|
||||||
:commands (lsp lsp-deferred)
|
|
||||||
:init
|
|
||||||
(setq lsp-keymap-prefix "C-l")
|
|
||||||
:config
|
|
||||||
(lsp-enable-which-key-integration t)
|
|
||||||
(setq lsp-rust-server 'rust-analyzer
|
|
||||||
lsp-auto-guess-root t
|
|
||||||
lsp-idle-delay 1
|
|
||||||
lsp-enable-file-watchers nil)
|
|
||||||
:hook
|
|
||||||
(rust-mode . lsp)
|
|
||||||
(python-mode . lsp)
|
|
||||||
(haskell-mode . lsp)
|
|
||||||
(c++-mode . lsp))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
In order for =lsp-mode= to work, it needs to compile code on the =fly=.
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
|
||||||
(use-package flycheck
|
|
||||||
:straight t
|
|
||||||
:after lsp)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** tags
|
|
||||||
=tags= can be used to search for =tagged= entities, such as =structs= etc.
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
|
||||||
(use-package lsp-ivy
|
|
||||||
:straight t
|
|
||||||
:after lsp-mode
|
|
||||||
:bind(:map lsp-mode-map ("C-l g a" . lsp-ivy-workspace-symbol)))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** completion
|
*** completion
|
||||||
First of all, we need a backend for our completion and analysis.
|
First of all, we need a backend for our completion and analysis.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp :tangle yes
|
||||||
@@ -698,6 +666,44 @@ We also need the actual snippets.
|
|||||||
:after yasnippet)
|
:after yasnippet)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** LSP and projects
|
||||||
|
*** lsp-mode
|
||||||
|
=lsp-mode= is feature-richer than =eglot=, so I'm using this one.
|
||||||
|
#+begin_src emacs-lisp :tangle yes
|
||||||
|
(use-package lsp-mode :straight t
|
||||||
|
:commands (lsp lsp-deferred)
|
||||||
|
:init
|
||||||
|
(setq lsp-keymap-prefix "C-l")
|
||||||
|
:config
|
||||||
|
(lsp-enable-which-key-integration t)
|
||||||
|
(setq lsp-rust-server 'rust-analyzer
|
||||||
|
lsp-auto-guess-root t
|
||||||
|
lsp-idle-delay 1
|
||||||
|
lsp-enable-file-watchers nil)
|
||||||
|
:hook
|
||||||
|
(rust-mode . lsp)
|
||||||
|
(python-mode . lsp)
|
||||||
|
(haskell-mode . lsp)
|
||||||
|
(c++-mode . lsp))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
In order for =lsp-mode= to work, it needs to compile code on the =fly=.
|
||||||
|
#+begin_src emacs-lisp :tangle yes
|
||||||
|
(use-package flycheck
|
||||||
|
:straight t
|
||||||
|
:after lsp)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** tags
|
||||||
|
=tags= can be used to search for =tagged= entities, such as =structs= etc.
|
||||||
|
#+begin_src emacs-lisp :tangle yes
|
||||||
|
(use-package lsp-ivy
|
||||||
|
:straight t
|
||||||
|
:after lsp-mode
|
||||||
|
:bind(:map lsp-mode-map ("C-l g a" . lsp-ivy-workspace-symbol)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** projects
|
*** projects
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp :tangle yes
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
|
|||||||
Reference in New Issue
Block a user