diff --git a/emacs/kch/.emacs.d/init.el b/emacs/kch/.emacs.d/init.el index 1084e36..004c262 100755 --- a/emacs/kch/.emacs.d/init.el +++ b/emacs/kch/.emacs.d/init.el @@ -40,8 +40,7 @@ (defun disable-minor-mode (mode major-mod-list) "Disable minor MODE when 'major-mode' in MAJOR-MOD-LIST." (if (member major-mode major-mod-list) - (funcall mode 0) - (funcall mode 1))) + (funcall mode 0))) ;;line numbering (global-display-line-numbers-mode 1) @@ -51,7 +50,11 @@ treemacs-mode shell-mode gud-mode + term-mode + tetris-mode + snake-mode eww-mode + magit-mode eshell-mode doc-view-mode latex-mode)))) diff --git a/emacs/kch/.emacs.d/package.org b/emacs/kch/.emacs.d/package.org index aaef5fd..2ce27e4 100644 --- a/emacs/kch/.emacs.d/package.org +++ b/emacs/kch/.emacs.d/package.org @@ -6,6 +6,7 @@ :ensure t) #+end_src * Evil + [[https://github.com/emacs-evil/evil][github - evil]] vim key binding evil has several states. you can define key bindings depend on the state. @@ -28,7 +29,10 @@ (setq evil-replace-state-cursor '("orange" box))) #+end_src * Magit + [[https://github.com/magit/magit][github - magit]] git interface + - hit C-x g (see the git state) + - hit C-c g (do other git stuff) #+begin_src emacs-lisp (use-package magit :ensure t @@ -36,6 +40,14 @@ (global-set-key (kbd "C-c g") 'magit-dispatch-popup)) #+end_src * Yassnippet + [[https://github.com/joaotavora/yasnippet][github - yasnippet]] + 1. type the key + 2. hit the tab + 3. complete snippet automatically + + + - run command yas-new-snippet to add new snippet + - run yas-describe-tables to list up possible snippets depends on major-mode #+begin_src emacs-lisp (use-package yasnippet :ensure t @@ -51,6 +63,15 @@ (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) #+end_src * Iedit + [[https://github.com/victorhge/iedit][github - iedit]] + Modify same simbols concurrently + Locate point on the simbol and hit C-c ; + After revise then hit C-c ; again + You can combine Iedit with "emacs narrow" and "emacs wider" + 1. Select visual block + 2. hit C-x n n (narrow) + 3. hit C-x n w (wider) + Use Iedit inside emacs narrow will effect only narrowed buffer. #+begin_src emacs-lisp (use-package iedit :ensure t @@ -59,6 +80,7 @@ #+end_src * Flycheck + [[https://www.flycheck.org/en/latest/][flycheck org]] grammar check #+begin_src emacs-lisp (use-package flycheck @@ -70,6 +92,7 @@ (shell-command-to-string "which pylint"))))) #+end_src * Company + [[https://github.com/company-mode/company-mode][github - company mode]] autocompletion front hand #+begin_src emacs-lisp (use-package company @@ -78,6 +101,19 @@ (global-company-mode)) #+end_src * LSP + [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode github.io]] + Language Server Protocol + language server can understand your code and show up some recommendations. + - list up autocomplete candidates (with company mode) + - error check with flycheck + - xref (behave like ctag) + + before use lsp, visit official web site. + + If you want to use lsp with C/C++ project has complecated directory architecture, + I strongly recommend "bear" + [[https://github.com/rizsotto/Bear][github - bear]] + ** lsp-mode #+begin_src emacs-lisp (use-package lsp-mode @@ -108,6 +144,7 @@ :ensure t) #+END_SRC * Conda + [[https://github.com/necaris/conda.el][github - conda]] Conda supports different pyls with anaconda. #+BEGIN_SRC emacs-lisp (use-package conda @@ -124,6 +161,7 @@ * Xcscope cscope setting with xcscope package. check github repo get to know how to install this. + [[https://github.com/dkogan/xcscope.el][github - xcscope]] #+begin_src emacs-lisp (use-package xcscope :ensure t @@ -144,7 +182,10 @@ (load-theme 'dracula t)) #+end_src * Ox-reveal (Reveal.js for emacs) + [[https://github.com/hexmode/ox-reveal][github ox-reveal]] reveal.js presentation + in org buffer, you can use Yassnippet "