added python venv and some EShell customizations
This commit is contained in:
parent
6221e35733
commit
008ce842e7
|
|
@ -58,25 +58,24 @@ No longer using typescript-mode, as there's a builtin typescript-ts mode in Emac
|
|||
(let ((server-programs '(("typescript-ts-mode" . ("typescript-language-server" "--stdio"))
|
||||
("tsx-ts-mode" . ("typescript-language-server""--stdio")))))
|
||||
(setq eglot-server-programs (append server-programs eglot-server-programs))))
|
||||
|
||||
(use-package typescript-mode
|
||||
:mode ("\\.ts\\'" ("\\.tsx" . typescript-tsx-mode))
|
||||
:config
|
||||
(define-derived-mode typescript-tsx-mode typescript-mode "TypeScriptReact")
|
||||
(dolist (mode '(typescript-mode typescript-tsx-mode))
|
||||
(add-to-list 'eglot-server-programs `(,mode . ("typescript-language-server", "--stdio"))))
|
||||
:hook
|
||||
(typescript-mode . (lambda () (lang-default-settings)
|
||||
(let ((custom-tab-size 2))
|
||||
(setq-default default-tab-width custom-tab-sizen
|
||||
tab-width custom-tab-size
|
||||
c-basic-offset custom-tab-size))))
|
||||
(typescript-tsx-mode . (lambda ()
|
||||
(lang-default-settings)
|
||||
(let ((custom-tab-size 4))
|
||||
(setq-default default-tab-width custom-tab-size
|
||||
tab-width custom-tab-size
|
||||
c-basic-offset custom-tab-size))))))
|
||||
(use-package typescript-mode
|
||||
:mode ("\\.ts\\'" ("\\.tsx" . typescript-tsx-mode))
|
||||
:config
|
||||
(define-derived-mode typescript-tsx-mode typescript-mode "TypeScriptReact")
|
||||
(dolist (mode '(typescript-mode typescript-tsx-mode))
|
||||
(add-to-list 'eglot-server-programs `(,mode . ("typescript-language-server", "--stdio"))))
|
||||
:hook
|
||||
(typescript-mode . (lambda () (lang-default-settings)
|
||||
(let ((custom-tab-size 2))
|
||||
(setq-default default-tab-width custom-tab-size
|
||||
tab-width custom-tab-size
|
||||
c-basic-offset custom-tab-size))))
|
||||
(typescript-tsx-mode . (lambda ()
|
||||
(lang-default-settings)
|
||||
(let ((custom-tab-size 4))
|
||||
(setq-default default-tab-width custom-tab-size
|
||||
tab-width custom-tab-size
|
||||
c-basic-offset custom-tab-size))))))
|
||||
#+end_src
|
||||
|
||||
** Markdown
|
||||
|
|
@ -85,8 +84,7 @@ No longer using typescript-mode, as there's a builtin typescript-ts mode in Emac
|
|||
:commands (markdown-mode gfm-mode)
|
||||
:mode (("\\.md\\'". markdown-mode)
|
||||
("\\.markdown\\'" . markdown-mode))
|
||||
:init
|
||||
(setq markdown-command "multimarkdown"))
|
||||
:custom ((markdown-command "multimarkdown" "set the markdown command")))
|
||||
#+end_src
|
||||
|
||||
** JSON
|
||||
|
|
@ -97,7 +95,6 @@ No longer using typescript-mode, as there's a builtin typescript-ts mode in Emac
|
|||
#+end_src
|
||||
|
||||
** LaTeX (AUCTeX)
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package tex
|
||||
:ensure auctex
|
||||
|
|
@ -123,6 +120,16 @@ python venv manager
|
|||
(setenv "WORKON_HOME" (expand-file-name ".local/opt/miniforge3/envs" (safe-getenv "HOME" user-home-path))))
|
||||
#+end_src
|
||||
|
||||
*** Jupyter
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ein
|
||||
:config
|
||||
(add-to-list 'org-babel-load-languages '(ein . t)))
|
||||
;; :custom
|
||||
;; (ein:jupyter-server-use-subcommand "server" "use jupyterlab instead of jupyter notebook")
|
||||
;; :mode (("\\.ipynb\\'". ein:notebook-mode)))
|
||||
#+end_src
|
||||
|
||||
*** Tab Size
|
||||
Python code is recomendded to set the tab size to 4
|
||||
|
||||
|
|
|
|||
|
|
@ -59,12 +59,18 @@ do presentations in Org mode
|
|||
#+end_src
|
||||
|
||||
* Emacs Shell
|
||||
|
||||
** History
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'eshell-expand-input-functions 'eshell-expand-history-references)
|
||||
#+end_src
|
||||
|
||||
** Autocomplete
|
||||
setup EShell's tab completion to be like bash's
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'eshell-mode-hook (lambda () (setq pcomplete-cycle-completions nil)))
|
||||
(setq eshell-cmpl-cycle-completions nil)
|
||||
#+end_src
|
||||
|
||||
** Prompt
|
||||
This sets the prompt to a lambda, for aesthetic reasons
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -84,7 +90,6 @@ This sets the prompt to a lambda, for aesthetic reasons
|
|||
(setq eshell-highlight-prompt nil)
|
||||
#+end_src
|
||||
|
||||
|
||||
* Undo Tree
|
||||
a visualizer for Emacs' cool but confusing undo/history system
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue