diff options
Diffstat (limited to 'config/emacs.org')
| -rw-r--r-- | config/emacs.org | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/config/emacs.org b/config/emacs.org index ca040d4..dab81d6 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -25,6 +25,11 @@ Emacs is self documenting, after all! #+begin_src emacs-lisp (use-package emacs :custom + ;; global defaults + (setq-default indent-tabs-mode nil) ;; no real tabs, only spaces + (setq-default tab-width 2) ;; just in case, make a "tab" show as 4 spaces + (setq-default standard-indent 2) ;; base indentation + ;; Startup errors (warning-minimum-level :emergency "Supress emacs warnings") (confirm-kill-processes nil "Don't ask to quit") @@ -332,22 +337,32 @@ Org superstar adds those nice looking utf-8 bullets: ** LSP We set up eglot, the LSP manager for emacs, now built in: #+begin_src emacs-lisp - (use-package eglot - :hook - (prog-mode . eglot-ensure) - (nix-mode . eglot-ensure) - :config - (add-to-list 'eglot-server-programs '(nix-mode . ("nil")))) + ;; (use-package eglot + ;; :hook + ;; (prog-mode . eglot-ensure) + ;; (nix-mode . eglot-ensure) + ;; :config + ;; (add-to-list 'eglot-server-programs '(nix-mode . ("nil")))) + + (use-package lsp + :hook + (prog-mode . lsp)) - (use-package lsp - :hook - (prog-mode . lsp)) + (with-eval-after-load 'lsp-mode + (setq lsp-typescript-format-enable t + lsp-typescript-indent-size 4 + lsp-typescript-tab-size 4 + lsp-typescript-indent-style "spaces")) + + (use-package editorconfig + :config + (editorconfig-mode 1)) - (use-package flycheck - :config (global-flycheck-mode)) + (use-package flycheck + :config (global-flycheck-mode)) - (use-package platformio-mode - :hook (prog-mode . platformio-conditionally-enable)) + (use-package platformio-mode + :hook (prog-mode . platformio-conditionally-enable)) #+end_src *** C/C++ Specific configuration for C (I also use the clangd lsp): @@ -514,7 +529,7 @@ emacs keybindings. "m l" '(lyrics-fetcher-show-lyrics :wk "Music lyrics") "o p" '(treemacs :wk "Project Drawer") "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") - "f f" '(eglot-format :wk "Format code buffer") + ;; "f f" '(eglot-format :wk "Format code buffer") "i p c" '(prestonpan :wk "Connect to my IRC server") "i l c" '(liberachat :wk "Connect to libera chat server") "i e c" '(efnet :wk "Connect to efnet chat server") |
