Format all the buffers and other python stuffs

This commit is contained in:
Logan Hunt 2023-01-24 16:03:04 -07:00
parent 2b345d724b
commit 76ac8afb00
No known key found for this signature in database
GPG Key ID: 8AC6A4B840C0EC49
3 changed files with 20 additions and 4 deletions

View File

@ -212,13 +212,19 @@
:init :init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "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) (elixir-mode . lsp)
(rust-mode . lsp) (rust-mode . lsp)
(java-mode . lsp)
(typescript-mode . lsp) ;; npm install -g typescript typescript-language-server (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server
;; if you want which-key integration
(lsp-mode . lsp-enable-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) :commands lsp)
#+END_SRC #+END_SRC
** Languages ** Languages
*** Common Lisp *** Common Lisp
@ -329,6 +335,16 @@ After installing the ~rust-analyzer~ program, the following can be used:
#+RESULTS: #+RESULTS:
: t : 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 * Elcord
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp

@ -1 +1 @@
Subproject commit 6d4584f01dec0143a169186df1608860d1aa1ef0 Subproject commit 19c231b2518efe71cb6dade3ad4cf573377902c3

View File

@ -8,7 +8,7 @@ exec wmname compiz &
exec emacs-keys-everywhere & exec emacs-keys-everywhere &
exec picom -b --vsync --backend glx & 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 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 & exec xsetroot -cursor_name left_ptr &