Small tweaks, paredit and better python
This commit is contained in:
parent
8bd52f2622
commit
4194370afa
1 changed files with 44 additions and 19 deletions
63
init.el
63
init.el
|
@ -41,23 +41,19 @@
|
||||||
|
|
||||||
;; clean up the modeline
|
;; clean up the modeline
|
||||||
(straight-use-package 'diminish)
|
(straight-use-package 'diminish)
|
||||||
(require 'diminish)
|
|
||||||
(diminish 'auto-revert-mode)
|
(diminish 'auto-revert-mode)
|
||||||
|
|
||||||
(menu-bar-mode 1)
|
(menu-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(when (display-graphic-p)
|
||||||
(if (window-system)
|
(toggle-scroll-bar -1)
|
||||||
(toggle-scroll-bar -1))
|
(tool-bar-mode -1))
|
||||||
(global-display-line-numbers-mode)
|
(global-display-line-numbers-mode -1)
|
||||||
(column-number-mode 1)
|
(column-number-mode 1)
|
||||||
(setq inhibit-startup-screen t)
|
(setq inhibit-startup-screen t)
|
||||||
|
(setq-default indicate-buffer-boundaries 'left)
|
||||||
(setq auto-save-default nil)
|
(setq auto-save-default nil)
|
||||||
(setq visible-bell t)
|
(setq visible-bell t)
|
||||||
(setq-default fill-column 80)
|
;; (setq-default fill-column 80)
|
||||||
|
|
||||||
;; bigger frames
|
|
||||||
(add-to-list 'default-frame-alist '(height . 50))
|
|
||||||
(add-to-list 'default-frame-alist '(width . 100))
|
|
||||||
|
|
||||||
;; I'm the only cowboy on this mainframe
|
;; I'm the only cowboy on this mainframe
|
||||||
;; (setq create-lockfiles nil)
|
;; (setq create-lockfiles nil)
|
||||||
|
@ -105,10 +101,10 @@
|
||||||
(setq modus-themes-italic-constructs t
|
(setq modus-themes-italic-constructs t
|
||||||
modus-themes-bold-constructs t
|
modus-themes-bold-constructs t
|
||||||
modus-themes-mixed-fonts nil
|
modus-themes-mixed-fonts nil
|
||||||
modus-themes-subtle-line-numbers t)
|
modus-themes-subtle-line-numbers 'nil)
|
||||||
(modus-themes-load-themes)
|
(modus-themes-load-themes)
|
||||||
:config
|
:config
|
||||||
(modus-themes-load-operandi)
|
(modus-themes-load-vivendi)
|
||||||
:bind (:map oxamap ("\\" . modus-themes-toggle)))
|
:bind (:map oxamap ("\\" . modus-themes-toggle)))
|
||||||
|
|
||||||
;; use modern pdf-tools
|
;; use modern pdf-tools
|
||||||
|
@ -356,8 +352,6 @@
|
||||||
:hook (julia-mode . julia-snail-mode))
|
:hook (julia-mode . julia-snail-mode))
|
||||||
|
|
||||||
;; scheming
|
;; scheming
|
||||||
;; (use-package racket-mode
|
|
||||||
;; :straight t)
|
|
||||||
(use-package geiser-racket
|
(use-package geiser-racket
|
||||||
:straight t)
|
:straight t)
|
||||||
|
|
||||||
|
@ -369,18 +363,44 @@
|
||||||
:config
|
:config
|
||||||
(setq inferior-lisp-program "sbcl"))
|
(setq inferior-lisp-program "sbcl"))
|
||||||
|
|
||||||
|
(use-package paredit
|
||||||
|
:straight t
|
||||||
|
:config
|
||||||
|
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'lisp-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'lisp-interaction-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'scheme-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'geiser-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'ielm-mode-hook 'enable-paredit-mode)
|
||||||
|
(add-hook 'eval-expression-minibuffer-setup-hook 'enable-paredit-mode))
|
||||||
|
|
||||||
;; make lambda lambda :D
|
;; make lambda lambda :D
|
||||||
(add-hook 'scheme-mode-hook 'prettify-symbols-mode)
|
(add-hook 'scheme-mode-hook 'prettify-symbols-mode)
|
||||||
(add-hook 'inferior-scheme-mode-hook 'prettify-symbols-mode)
|
(add-hook 'inferior-scheme-mode-hook 'prettify-symbols-mode)
|
||||||
|
(add-hook 'lisp-mode-hook 'prettify-symbols-mode)
|
||||||
(add-hook 'geiser-mode-hook 'prettify-symbols-mode)
|
(add-hook 'geiser-mode-hook 'prettify-symbols-mode)
|
||||||
(add-hook 'emacs-lisp-mode-hook 'prettify-symbols-mode)
|
(add-hook 'emacs-lisp-mode-hook 'prettify-symbols-mode)
|
||||||
|
|
||||||
;; python
|
;; python
|
||||||
(setq python-shell-interpreter "python")
|
(defun oxa/set-system-python ()
|
||||||
(setq flycheck-python-pycompile-executable "python")
|
"Set python interpreter to ipython if it's present."
|
||||||
|
(if (executable-find "ipython")
|
||||||
|
(progn (setq python-shell-interpreter "ipython"
|
||||||
|
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")
|
||||||
|
(setq flycheck-python-pycompile-executable "python"))
|
||||||
|
(progn
|
||||||
|
(setq python-shell-interpreter "python")
|
||||||
|
(setq flycheck-python-pycompile-executable "python"))))
|
||||||
|
|
||||||
|
(oxa/set-system-python)
|
||||||
|
|
||||||
|
;; working with python venvs
|
||||||
|
(use-package pyvenv
|
||||||
|
:straight t)
|
||||||
|
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:straight t
|
:straight t
|
||||||
|
:bind (:map oxamap ("L" . 'lsp))
|
||||||
:init
|
:init
|
||||||
(setq lsp-keymap-prefix "C-z l")
|
(setq lsp-keymap-prefix "C-z l")
|
||||||
:hook ((lsp-mode . lsp-enable-which-key-integration))
|
:hook ((lsp-mode . lsp-enable-which-key-integration))
|
||||||
|
@ -388,15 +408,20 @@
|
||||||
|
|
||||||
(use-package lsp-ui
|
(use-package lsp-ui
|
||||||
:straight t
|
:straight t
|
||||||
|
:after lsp-mode
|
||||||
:commands lsp-ui-mode)
|
:commands lsp-ui-mode)
|
||||||
|
|
||||||
|
(use-package lsp-ivy
|
||||||
|
:straight t
|
||||||
|
:commands lsp-ivy-workspace-symbol)
|
||||||
|
|
||||||
;; snippets
|
;; snippets
|
||||||
(straight-use-package 'yasnippet)
|
(straight-use-package 'yasnippet)
|
||||||
(yas-global-mode t)
|
(yas-global-mode t)
|
||||||
(diminish 'yas-minor-mode)
|
(diminish 'yas-minor-mode)
|
||||||
|
|
||||||
;; I use custom vars for local config, so let's put them to separate file, where
|
;; I use custom vars for local config, so let's put them to separate
|
||||||
;; it's easier for git to ignore it
|
;; file, where it's easier for git to ignore it
|
||||||
(setq custom-file "~/.emacs.d/custom.el")
|
(setq custom-file "~/.emacs.d/custom.el")
|
||||||
(load custom-file 'noerror)
|
(load custom-file 'noerror)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue