Remove unused packages
This commit is contained in:
parent
533ea6953f
commit
5eda7990e2
@ -4,7 +4,7 @@
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
'(git-gutter-fringe yaml-mode whitespace-cleanup-mode which-key web-mode vue-mode vscode-dark-plus-theme use-package undo-tree tide terraform-mode smartparens sass-mode restclient rainbow-mode py-autopep8 projectile prettier-js pkgbuild-mode pip-requirements php-refactor-mode ox-reveal nginx-mode neotree lua-mode lsp-ui log4j-mode load-env-vars json-mode js2-refactor ivy-rich ivy-hydra highlight-indent-guides graphviz-dot-mode go-mode git-timemachine git-modes eslintd-fix emmet-mode elpy editorconfig dotenv-mode doom-modeline dokuwiki-mode dockerfile-mode diminish dashboard dap-mode crystal-mode counsel company-quickhelp company-php apache-mode all-the-icons)))
|
||||
'(ox-reveal terraform-mode restclient load-env-vars dap-mode lsp-ui lsp-treemacs graphviz-dot-mode dokuwiki-mode dockerfile-mode dotenv-mode web-mode rainbow-mode yaml-mode vue-mode typescript-mode tide sass-mode smartparens lua-mode pkgbuild-mode py-autopep8 pip-requirements elpy projectile company-php php-mode php-refactor-mode go-mode markdown-mode eslintd-fix prettier-js json-mode js2-refactor js2-mode crystal-mode editorconfig nginx-mode emmet-mode whitespace-cleanup-mode log4j-mode ivy-hydra hydra ivy-rich counsel flycheck company-quickhelp company apache-mode dashboard neotree all-the-icons highlight-indent-guides doom-modeline diminish which-key undo-tree vscode-dark-plus-theme)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
2
init.el
2
init.el
@ -75,7 +75,6 @@
|
||||
;; Utils
|
||||
(require 'init-utils)
|
||||
;; GUI
|
||||
(require 'init-linum)
|
||||
(require 'init-gui)
|
||||
(require 'init-editing-utils)
|
||||
(require 'init-diminish)
|
||||
@ -93,7 +92,6 @@
|
||||
(require 'init-whitespace)
|
||||
(require 'init-emmet-mode)
|
||||
(require 'init-nginx)
|
||||
(require 'init-git)
|
||||
(require 'init-editorconfig)
|
||||
;; Languages
|
||||
(require 'init-ccc)
|
||||
|
@ -1,108 +0,0 @@
|
||||
;;; init-git.el --- .Emacs Configuration -*- lexical-binding: t -*-
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
(setq vc-follows-symlinks t
|
||||
find-file-visit-truename t
|
||||
vc-handled-backends nil)
|
||||
|
||||
(if (display-graphic-p)
|
||||
(use-package git-gutter-fringe
|
||||
:ensure t
|
||||
:config
|
||||
(global-git-gutter-mode t)
|
||||
(setq-default fringes-outside-margins nil)
|
||||
(setq-default left-fringe-width 10)
|
||||
(set-face-foreground 'git-gutter-fr:modified "purple")
|
||||
(set-face-foreground 'git-gutter-fr:added "green")
|
||||
(set-face-foreground 'git-gutter-fr:deleted "red")
|
||||
|
||||
(defun my-reshape-git-gutter (gutter)
|
||||
"Re-shape gutter for `ivy-read'."
|
||||
(let* ((linenum-start (aref gutter 3))
|
||||
(linenum-end (aref gutter 4))
|
||||
(target-line "")
|
||||
(target-linenum 1)
|
||||
(tmp-line "")
|
||||
(max-line-length 0))
|
||||
(save-excursion
|
||||
(while (<= linenum-start linenum-end)
|
||||
(with-no-warnings
|
||||
(goto-line linenum-start))
|
||||
(setq tmp-line (replace-regexp-in-string "^[ \t]*" ""
|
||||
(buffer-substring (line-beginning-position)
|
||||
(line-end-position))))
|
||||
(when (> (length tmp-line) max-line-length)
|
||||
(setq target-linenum linenum-start)
|
||||
(setq target-line tmp-line)
|
||||
(setq max-line-length (length tmp-line)))
|
||||
|
||||
(setq linenum-start (1+ linenum-start))))
|
||||
;; build (key . linenum-start)
|
||||
(cons (format "%s %d: %s"
|
||||
(if (eq 'deleted (aref gutter 1)) "-" "+")
|
||||
target-linenum target-line)
|
||||
target-linenum)))
|
||||
|
||||
(defun my-goto-git-gutter ()
|
||||
(interactive)
|
||||
(eval-when-compile (require 'git-gutter-fringe nil t))
|
||||
(when (and (require 'git-gutter-fringe nil t)
|
||||
(fboundp 'ivy-read))
|
||||
|
||||
(if git-gutter-fr:diffinfos
|
||||
(ivy-read "git-gutters-fr:"
|
||||
(mapcar 'my-reshape-git-gutter git-gutter-fr:diffinfos)
|
||||
:action (lambda (e)
|
||||
;; ivy9+ keep `(car e)'
|
||||
;; ivy8- strip the `(car e)'
|
||||
;; we handle both data structure
|
||||
(unless (numberp e) (setq e (cdr e)))
|
||||
(with-no-warnings
|
||||
(goto-line e))))
|
||||
(message "NO git-gutters-fringe!"))
|
||||
))))
|
||||
|
||||
(use-package git-modes
|
||||
:ensure t
|
||||
:mode
|
||||
("/\\.?git/?config$" . gitconfig-mode)
|
||||
("/\\.gitmodules$" . gitconfig-mode)
|
||||
("/\\.gitignore$" . gitignore-mode)
|
||||
("/\\.git/info/exclude$" . gitignore-mode)
|
||||
("/git/ignore$" . gitignore-mode)
|
||||
("/.dockerignore\\'" . gitignore-mode)
|
||||
("/\\.gitattributes\\'" . gitattributes-mode)
|
||||
("/info/attributes\\'" . gitattributes-mode)
|
||||
("/git/attributes\\'" . gitattributes-mode))
|
||||
|
||||
(use-package git-timemachine
|
||||
:ensure t
|
||||
:commands git-timemachine
|
||||
:bind (:map git-timemachine-mode
|
||||
("c" . git-timemachine-show-current-revision)
|
||||
("b" . git-timemachine-switch-branch)))
|
||||
|
||||
;;; smerge-mode video explain https://emacsgifs.github.io/public/videos/758861381898637313.mp4
|
||||
(use-package smerge-mode
|
||||
:ensure t
|
||||
:config
|
||||
(defun enable-smerge-maybe ()
|
||||
(when (and buffer-file-name (vc-backend buffer-file-name))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^<<<<<<< " nil t)
|
||||
(smerge-mode +1)))))
|
||||
|
||||
(eval-when-compile (require 'smerge-mode nil t))
|
||||
(when (and (require 'smerge-mode nil t)
|
||||
(fboundp 'enable-smerge-maybe))
|
||||
(add-hook 'buffer-list-update-hook #'enable-smerge-maybe)))
|
||||
|
||||
(provide 'init-git)
|
||||
|
||||
;; Local Variables:
|
||||
;; byte-compile-warnings: (not free-vars)
|
||||
;; End:
|
||||
;;; init-git.el ends here
|
@ -69,6 +69,7 @@
|
||||
(global-set-key (kbd "<f12>") 'revert-buffer-no-confirm)
|
||||
(global-set-key (kbd "s-h") 'global-hl-line-mode) ; Highlight current line
|
||||
(global-set-key (kbd "M-c") nil) ; disable capitalize-word
|
||||
(global-set-key (kbd "<f6>") 'display-line-numbers-mode)
|
||||
;; muti-curses
|
||||
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
||||
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
|
||||
|
@ -1,43 +0,0 @@
|
||||
;;; init-nlinum.el --- .Emacs Configuration -*- lexical-binding: t -*-
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Line numbers
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Linum snippets from: https://www.emacswiki.org/emacs/LineNumbers
|
||||
|
||||
(use-package linum
|
||||
:config
|
||||
(defun my-linum-get-format ()
|
||||
"Defines LINUM-GET-FORMAT"
|
||||
(let* ((width (1+ (length (number-to-string
|
||||
(count-lines (point-min) (point-max))))))
|
||||
(format (concat "%" (number-to-string width) "d \u2502")))
|
||||
(setq my-linum-format-string format)))
|
||||
(add-hook 'linum-before-numbering-hook 'my-linum-get-format)
|
||||
|
||||
(defun my-linum-format (line-number)
|
||||
"Defines LINE-FORMAT"
|
||||
(propertize (format my-linum-format-string line-number) 'face
|
||||
(if (eq line-number my-current-line)
|
||||
'my-linum-hl
|
||||
'linum)))
|
||||
(setq linum-format 'my-linum-format)
|
||||
|
||||
(defadvice linum-update (around my-linum-update)
|
||||
"Defines LINUM-UPDATE for update lines"
|
||||
(let ((my-current-line (line-number-at-pos)))
|
||||
ad-do-it))
|
||||
(ad-activate 'linum-update)
|
||||
|
||||
:bind
|
||||
(([f6] . linum-mode)))
|
||||
|
||||
(provide 'init-linum)
|
||||
|
||||
;; Local Variables:
|
||||
;; byte-compile-warnings: (not free-vars)
|
||||
;; End:
|
||||
;;; init-linum.el ends here
|
Loading…
x
Reference in New Issue
Block a user