diff options
author | ThanosApollo <[email protected]> | 2022-11-07 11:38:24 +0200 |
---|---|---|
committer | ThanosApollo <[email protected]> | 2022-11-07 11:38:24 +0200 |
commit | bcb95c879febcc632e9c5c52ce259d9cf891ead9 (patch) | |
tree | f541fab2074611c6b9c9cb1fb8742c2553aa3656 | |
parent | 2891a483fc6d384c5bdbf3e010bef67017c9f708 (diff) |
add rjsx-mode,electricpair
-rw-r--r-- | .emacs.d/init.el | 160 |
1 files changed, 94 insertions, 66 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4bb4cab..20d33a0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -3,7 +3,10 @@ (require 'package) (add-to-list 'load-path "~/.emacs.d/lisp/") (load "~/.emacs.d/custom.el") -(load "~/.emacs.d/lisp/init-exwm.el") +(load "~/.emacs.d/lisp/init-keys.el") +;;(load "~/.emacs.d/lisp/init-exwm.el") +(use-package corfu) + (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") @@ -147,52 +150,35 @@ "tt" '(counsel-load-theme :which-key "choose theme"))) - ;; (use-package evil - ;; :init - ;; (setq evil-want-integration t) - ;; (setq evil-want-keybinding nil) - ;; (setq evil-want-C-u-scroll t) - ;; (setq evil-want-C-i-jump nil) - ;; ;;:hook (evil-mode . apollo/evil-hook) - ;; :config - ;; (evil-mode 1) - ;; (define-key evil-insert-state-map (kbd "C-f") 'evil-normal-state) - - ;; (evil-global-set-key 'motion "j" 'evil-next-visual-line) - ;; (evil-global-set-key 'motion "k" 'evil-previous-visual-line) - - ;; (evil-set-initial-state 'messages-buffer-mode 'normal) - ;; (evil-set-initial-state 'dashboard-mode 'normal) - ;; (evil-define-key 'normal dired-mode-map - ;; (kbd "h") 'dired-up-directory - ;; (kbd "l") 'dired-find-file - ;; (kbd "m") 'dired-mark - ;; (kbd "R") 'dired-do-rename - ;; (kbd "D") 'dired-do-delete) - ;; ) - - ;; (use-package evil-collection - ;; :after evil - ;; :config - ;; (evil-collection-init)) -;;Ibuffer -(global-set-key (kbd "C-x C-b") 'ibuffer) -;;Counsel -(global-set-key (kbd "M-;") 'counsel-M-x) -(global-set-key (kbd "C-;") 'counsel-find-file) -(global-set-key (kbd "C-e") 'move-end-of-line) -(define-prefix-command 'window) -(global-set-key (kbd "C-w") 'window) -(global-set-key (kbd "C-w C-l") 'windmove-right) -(global-set-key (kbd "C-w C-h") 'windmove-left) -(global-set-key (kbd "C-w C-v") 'split-window-right) -(global-set-key (kbd "C-w C-c") 'delete-window) +;; (use-package evil +;; :init +;; (setq evil-want-integration t) +;; (setq evil-want-keybinding nil) +;; (setq evil-want-C-u-scroll t) +;; (setq evil-want-C-i-jump nil) +;; ;;:hook (evil-mode . apollo/evil-hook) +;; :config +;; (evil-mode 1) +;; (define-key evil-insert-state-map (kbd "C-f") 'evil-normal-state) + +;; (evil-global-set-key 'motion "j" 'evil-next-visual-line) +;; (evil-global-set-key 'motion "k" 'evil-previous-visual-line) + +;; (evil-set-initial-state 'messages-buffer-mode 'normal) +;; (evil-set-initial-state 'dashboard-mode 'normal) +;; (evil-define-key 'normal dire-mode-map +;; (kbd "h") 'dired-up-directory +;; (kbd "l") 'dired-find-file +;; (kbd "m") 'dired-mark +;; (kbd "R") 'dired-do-rename +;; (kbd "D") 'dired-do-delete) +;; ) + +;; (use-package evil-collection +;; :after evil +;; :config +;; (evil-collection-init)) -;; (use-package god-mode -;; :init -;; (god-mode) -;; :config -;; (global-set-key (kbd "C-f") #'god-mode-all)) (apollo/leader-keys @@ -333,6 +319,15 @@ (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'apollo/org-babel-tangle-config))) + ;Developer + +;;Essentials +(electric-pair-mode 1) + +;;emacs-lisp +(setq tab-always-indent 'complete) +(add-to-list 'completion-styles 'initials t) + ;;instal flyckeck (use-package flycheck :init @@ -377,41 +372,47 @@ :prefix lsp-keymap-prefix "d" '(dap-hydra t :wk "debugger"))) -;;; init-javascript.el --- Support for Javascript and derivatives -*- lexical-binding: t -*- - ;;; Commentary: - ;;; Code: - -;; (use-package json-mode -;; :mode "\\.json\\" -;; :hook (json-mode . lsp-deferred)) +(use-package json-mode + :mode ".json" + :hook (json-mode . lsp-deferred)) ;; (use-package js2-mode ;; :mode "\\.js\\'") - ;;(provide 'init-javascript) +;; (provide 'init-javascript) + +(use-package rjsx-mode + :mode ".js" + :hook (rjsx-mode . lsp-deferred) + :config + (defadvice js-jsx-indent-line (after js-jsx-indent-line-after-hack activate) + "Workaround sgml-mode and follow airbnb component style." + (save-excursion + (beginning-of-line) + (if (looking-at-p "^ +\/?> *$") + (delete-char sgml-basic-offset))))) + (use-package typescript-mode -:mode "\\.ts\\'" +:mode ".ts'" :hook (typescript-mode .lsp-deferred) :config (setq typescript-indent-level 2)) (use-package python-mode :ensure t + :mode ".py" :hook (python-mode . lsp-deferred) :custom - ;; NOTE: Set these if Python 3 is called "python3" on your system! - ;; (python-shell-interpreter "python3") - ;; (dap-python-executable "python3") (dap-python-debugger 'debugpy) :config (require 'dap-python)) +;;autocomplete + ;;Pyenv (use-package pyvenv :config (pyvenv-mode 1)) -;;set PATH of pyls -(setq lsp-pyls-server-command "/home/apollo/.local/bin/pylsp") (use-package company :after lsp-mode @@ -431,8 +432,6 @@ :custom (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) -;;terminals -(use-package vterm) ;;elfeed @@ -460,6 +459,37 @@ :config (setq elfeed-goodies/entry-pane-size 0.5)) +(use-package vterm + :config + (setq vterm-shell "/bin/zsh") + (global-set-key (kbd "C-c v") 'vterm)) + +(use-package pdf-tools + :init + (pdf-tools-install)) + +(use-package eyebrowse + :init + (eyebrowse-mode) + :bind + (("M-`" . eyebrowse-switch-to-window-config-0) + ("M-1" . eyebrowse-switch-to-window-config-1) + ("M-2" . eyebrowse-switch-to-window-config-2) + ("M-3" . eyebrowse-switch-to-window-config-3) + ("M-4" . eyebrowse-switch-to-window-config-4) + ("M-5" . eyebrowse-switch-to-window-config-5))) + +(define-key dired-mode-map "b" 'dired-up-directory) +(use-package paredit) +(use-package corfu) +(use-package monkeytype) +(use-package telega) + +(put 'downcase-region 'disabled nil) +(put 'dired-find-alternate-file 'disabled nil) +(put 'set-goal-column 'disabled nil) + + (custom-set-variables ;; custom-set-variables was added by Custom. @@ -467,14 +497,12 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes - '("7a4784fc0c0c853c578132e81a757a0f9b3e675fdd7e56303f3ee1fb8d7ae2a3" "2dc03dfb67fbcb7d9c487522c29b7582da20766c9998aaad5e5b63b5c27eec3f" "944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "443e2c3c4dd44510f0ea8247b438e834188dc1c6fb80785d83ad3628eadf9294" "554c2be54aecbbd3a6317906ada2e8f25f50f8d6bf3d9c22e3b30e3700d0bbd1" "5f128efd37c6a87cd4ad8e8b7f2afaba425425524a68133ac0efd87291d05874" "bf948e3f55a8cd1f420373410911d0a50be5a04a8886cabe8d8e471ad8fdba8e" "fb2c27e7ad4a81c2f57bceeca0faeb1c84fb7a167c097b998e2a1ea314455fd6" "47f3e55e4e3d570d5513d4cc58047dc059bd6ab3d135c796c4ccbfb77d4eb88b" "1070069a4671554a2c00b8375485896c1aa8144f5b8d99b86845069351770ee9" "e8483bc21cf667971eabdbb01203e3a471de1b59a4e532368b7a20f5665d686a" "b7bf7b95fb796614f0b36a7c4906a93db75ad0c6146f336c7ed085f6fceef93d" "05b767a3f3a37ac46353fd88f194934d82eb6c3644c3b8da883752f57513e7aa" default)) + '("944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "3199be8536de4a8300eaf9ce6d864a35aa802088c0925e944e2b74a574c68fd0" "443e2c3c4dd44510f0ea8247b438e834188dc1c6fb80785d83ad3628eadf9294" "554c2be54aecbbd3a6317906ada2e8f25f50f8d6bf3d9c22e3b30e3700d0bbd1" "5f128efd37c6a87cd4ad8e8b7f2afaba425425524a68133ac0efd87291d05874" "bf948e3f55a8cd1f420373410911d0a50be5a04a8886cabe8d8e471ad8fdba8e" "fb2c27e7ad4a81c2f57bceeca0faeb1c84fb7a167c097b998e2a1ea314455fd6" "47f3e55e4e3d570d5513d4cc58047dc059bd6ab3d135c796c4ccbfb77d4eb88b" "1070069a4671554a2c00b8375485896c1aa8144f5b8d99b86845069351770ee9" "e8483bc21cf667971eabdbb01203e3a471de1b59a4e532368b7a20f5665d686a" "b7bf7b95fb796614f0b36a7c4906a93db75ad0c6146f336c7ed085f6fceef93d" "05b767a3f3a37ac46353fd88f194934d82eb6c3644c3b8da883752f57513e7aa" default)) '(package-selected-packages - '(something moe-theme zenburn-theme dracula-theme the-matrix-theme ef-themes dmenu exwm which-key vterm visual-fill-column use-package typescript-mode smart-cursor-color ranger rainbow-delimiters python-x python-mode prettier-js pdf-tools org-superstar org-evil org-bullets modus-themes magit lsp-ui lsp-ivy json-mode js2-mode ivy-rich helpful god-mode general flycheck eyebrowse evil-collection elpy elisp-lint elfeed-goodies doom-themes doom-modeline dired-ranger dap-mode counsel-projectile company-box command-log-mode buttercup all-the-icons))) + '(autocomplete ac-slime rjsx-mode telega monkeytype evil-collection lsp-intellij lsp-mode yasnippet lsp-treemacs helm-lsp projectile hydra flycheck company avy which-key helm-xref dap-mode zenburn-theme json-mode))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) -(put 'downcase-region 'disabled nil) -(put 'dired-find-alternate-file 'disabled nil) |