Disable tabs in python and js mode

This commit is contained in:
Jeremy Dormitzer 2020-01-31 11:19:04 -05:00
parent 0eca10e78e
commit ec1fe76304

View File

@ -2036,6 +2036,13 @@ Syntax checking etc.:
((normal motion visual) flycheck-mode-map "ze" 'hydra-flycheck/body)) ((normal motion visual) flycheck-mode-map "ze" 'hydra-flycheck/body))
#+END_SRC #+END_SRC
* Tabs
#+BEGIN_SRC emacs-lisp
(defun disable-tab-insert ()
(interactive)
(setq indent-tabs-mode nil))
#+END_SRC
* JSON * JSON
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package json-mode (use-package json-mode
@ -2080,7 +2087,8 @@ Some formatting stuff:
(web-mode-set-content-type "jsx")) (web-mode-set-content-type "jsx"))
(when (or (equal web-mode-content-type "javascript") (when (or (equal web-mode-content-type "javascript")
(equal web-mode-content-type "jsx")) (equal web-mode-content-type "jsx"))
(lsp))))) (lsp))))
(add-hook 'web-mode-hook #'disable-tab-insert))
#+END_SRC #+END_SRC
Use nvm to manage node versions: Use nvm to manage node versions:
@ -2210,6 +2218,7 @@ Emacs support for the Language Server Protocol
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; (leader-def-key "sp" #'elpy-shell-switch-to-shell) ;; (leader-def-key "sp" #'elpy-shell-switch-to-shell)
(leader-def-key "sp" #'run-python) (leader-def-key "sp" #'run-python)
(add-hook 'python-mode-hook #'disable-tab-insert)
#+END_SRC #+END_SRC
Elpy is a python IDE package: Elpy is a python IDE package: