Untabify config
This commit is contained in:
parent
a9265c931d
commit
a1fea5bc99
42
config.org
42
config.org
@ -700,7 +700,7 @@
|
|||||||
There's a lot of boilerplate in C, so I want YASnippet enabled.
|
There's a lot of boilerplate in C, so I want YASnippet enabled.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'c-mode-hook (lambda () (yas-minor-mode)))
|
(add-hook 'c-mode-hook (lambda () (yas-minor-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** C++
|
** C++
|
||||||
@ -1197,7 +1197,7 @@
|
|||||||
I want to indent with tabs (set to 4 characters wide):
|
I want to indent with tabs (set to 4 characters wide):
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq lua-indent-level 4)
|
(setq lua-indent-level 4)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
I also want to be able to run =lua-format= on files with =C-c f=
|
I also want to be able to run =lua-format= on files with =C-c f=
|
||||||
@ -1206,51 +1206,51 @@
|
|||||||
[[help:call-process-region][call-process-region]].
|
[[help:call-process-region][call-process-region]].
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defvar lua-format-binary "lua-format")
|
(defvar lua-format-binary "lua-format")
|
||||||
|
|
||||||
(defun lua-format ()
|
(defun lua-format ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (executable-find lua-format-binary)
|
(if (executable-find lua-format-binary)
|
||||||
(let ((start (if (region-active-p) (region-beginning) (point-min)))
|
(let ((start (if (region-active-p) (region-beginning) (point-min)))
|
||||||
(end (if (region-active-p) (region-end) (point-max))))
|
(end (if (region-active-p) (region-end) (point-max))))
|
||||||
(call-process-region start end lua-format-binary t '(t nil)))
|
(call-process-region start end lua-format-binary t '(t nil)))
|
||||||
(error "%s" (concat lua-format-binary " not found."))))
|
(error "%s" (concat lua-format-binary " not found."))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
This then needs to be assigned to the keybinding:
|
This then needs to be assigned to the keybinding:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook
|
(add-hook
|
||||||
'lua-mode-hook
|
'lua-mode-hook
|
||||||
(lambda () (define-key lua-mode-map (kbd "C-c f") 'lua-format)))
|
(lambda () (define-key lua-mode-map (kbd "C-c f") 'lua-format)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** BASIC
|
** BASIC
|
||||||
=basic-mode= provides syntax highlighting and a few nice features:
|
=basic-mode= provides syntax highlighting and a few nice features:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package basic-mode)
|
(use-package basic-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
As well as =.bas= files, I want to open all =.bbc= files in
|
As well as =.bas= files, I want to open all =.bbc= files in
|
||||||
=basic-mode=:
|
=basic-mode=:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-to-list 'auto-mode-alist '("\\.bbc\\'" . basic-mode))
|
(add-to-list 'auto-mode-alist '("\\.bbc\\'" . basic-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Nix
|
** Nix
|
||||||
Basic editing support comes from =nix-mode=:
|
Basic editing support comes from =nix-mode=:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package nix-mode)
|
(use-package nix-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
And =nix-update= provides a convenient way to update ~fetch~
|
And =nix-update= provides a convenient way to update ~fetch~
|
||||||
blocks:
|
blocks:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package nix-update)
|
(use-package nix-update)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** SCAD
|
** SCAD
|
||||||
@ -1258,7 +1258,7 @@
|
|||||||
stick to the basic mode:
|
stick to the basic mode:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package scad-mode)
|
(use-package scad-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Tool Integrations
|
* Tool Integrations
|
||||||
@ -1375,7 +1375,7 @@
|
|||||||
ChatGPT.
|
ChatGPT.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package chatgpt-shell)
|
(use-package chatgpt-shell)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
[[help:chatgpt-shell-openai-key][chatgpt-shell-openai-key]] must also be set to a function that
|
[[help:chatgpt-shell-openai-key][chatgpt-shell-openai-key]] must also be set to a function that
|
||||||
@ -1663,6 +1663,6 @@
|
|||||||
memory usage getting too high.
|
memory usage getting too high.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq gc-cons-threshold 1000000)
|
(setq gc-cons-threshold 1000000)
|
||||||
(setq gc-cons-percentage 0.2)
|
(setq gc-cons-percentage 0.2)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
x
Reference in New Issue
Block a user