From 76ac8afb00a33acb325e95e51b6a695058cf6810 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 24 Jan 2023 16:03:04 -0700 Subject: [PATCH] Format all the buffers and other python stuffs --- .emacs.d/settings.org | 20 ++++++++++++++++++-- .stumpwm.d/modules | 2 +- .xinitrc | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.emacs.d/settings.org b/.emacs.d/settings.org index 8a624dc..5ef74d4 100644 --- a/.emacs.d/settings.org +++ b/.emacs.d/settings.org @@ -212,13 +212,19 @@ :init ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") (setq lsp-keymap-prefix "C-c l") - :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) + :hook ((python-mode . lsp) ;; pip install python-lsp-server pyls-black pyls-isort pyls-mypy (elixir-mode . lsp) (rust-mode . lsp) + (java-mode . lsp) (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server - ;; if you want which-key integration (lsp-mode . lsp-enable-which-key-integration)) + :config (lsp-register-custom-settings + '(("pyls.plugins.pyls_mypy.enabled" t t) + ("pyls.plugins.pyls_mypy.live_mode" nil t) + ("pyls.plugins.pyls_black.enabled" t t) + ("pyls.plugins.pyls_isort.enabled" t t))) :commands lsp) + #+END_SRC ** Languages *** Common Lisp @@ -329,6 +335,16 @@ After installing the ~rust-analyzer~ program, the following can be used: #+RESULTS: : t +** Format All The Buffers +#+BEGIN_SRC emacs-lisp + (use-package format-all + :ensure t) + (add-hook 'prog-mode-hook 'format-all-mode) + (add-hook 'format-all-mode-hook 'format-all-ensure-formatter) +#+END_SRC + +#+RESULTS: +| format-all-ensure-formatter | * Elcord #+BEGIN_SRC emacs-lisp diff --git a/.stumpwm.d/modules b/.stumpwm.d/modules index 6d4584f..19c231b 160000 --- a/.stumpwm.d/modules +++ b/.stumpwm.d/modules @@ -1 +1 @@ -Subproject commit 6d4584f01dec0143a169186df1608860d1aa1ef0 +Subproject commit 19c231b2518efe71cb6dade3ad4cf573377902c3 diff --git a/.xinitrc b/.xinitrc index 9f44210..4784bf5 100644 --- a/.xinitrc +++ b/.xinitrc @@ -8,7 +8,7 @@ exec wmname compiz & exec emacs-keys-everywhere & exec picom -b --vsync --backend glx & -exec xmodmap ~/.xmodmap & +#exec xmodmap ~/.xmodmap & exec xinput set-prop 10 "Coordinate Transformation Matrix" 1.2 0 0 0 1.2 0 0 0 1.8 & exec xsetroot -cursor_name left_ptr &