summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-01-01 08:53:59 -0500
committermattkae <mattkae@protonmail.com>2023-01-01 08:53:59 -0500
commit23fb17b9ca778a5a77bfd9227422b13561dbedb8 (patch)
tree114c32bfe802979970f29f230c573fc06ace6401
parent03535ea723e56470a3ed67200d649b8bfb47e1ae (diff)
Improved the auto install script
-rw-r--r--init.el22
-rw-r--r--lisp/general.el18
2 files changed, 15 insertions, 25 deletions
diff --git a/init.el b/init.el
index 12a468a..910fd45 100644
--- a/init.el
+++ b/init.el
@@ -11,19 +11,8 @@
;; https://stackoverflow.com/questions/31079204/emacs-package-install-script-in-init-file
(package-initialize)
-;; (use-package dashboard
-;; :ensure t
-;; :config
-;; (dashboard-setup-startup-hook)
-;; (setq dashboard-projects-backend 'projectile)
-;; (setq dashboard-items '((recents . 5)
-;; (bookmarks . 5)
-;; (projects . 5)
-;; (agenda . 5)
-;; (registers . 5))))
-
(setq package-list
- '(eslint-fix go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))
+ '(highlight-indent-guides helm helm-projectile js-doc eslint-fix go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode all-the-icons req-package projectile org))
;; Fetch the list of packages available
(unless package-archive-contents
@@ -31,8 +20,13 @@
; Install the missing packages
(dolist (package package-list)
- (unless (package-installed-p package)
- (package-install package)))
+ (let ((has-refreshed 0))
+ (unless (package-installed-p package)
+ (unless (eq has-refreshed 1)
+ (setq has-refreshed 1)
+ (package-refresh-contents)
+ )
+ (package-install package))))
;; The default is 800 kilobytes. Measured in bytes.
(setq gc-cons-threshold (* 50 1000 1000))
diff --git a/lisp/general.el b/lisp/general.el
index 51ff942..be8103e 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -145,18 +145,14 @@
:hook (prog-mode . git-gutter-mode)
:config
(setq git-gutter:update-interval 0.02)
- (setq git-gutter:window-width 1)
- (set-face-background 'git-gutter:modified "dark magenta")
- (set-face-background 'git-gutter:deleted "tomato")
- (set-face-background 'git-gutter:added "forest green"))
-
-(custom-set-variables
- '(git-gutter:modified-sign " ")
- '(git-gutter:added-sign "++")
- '(git-gutter:deleted-sign "--"))
+ (setq git-gutter:window-width 1))
(use-package git-gutter-fringe
- :ensure t)
+ :ensure t
+ :config
+ (define-fringe-bitmap 'git-gutter-fr:added [224] nil nil '(center repeated))
+ (define-fringe-bitmap 'git-gutter-fr:modified [224] nil nil '(center repeated))
+ (define-fringe-bitmap 'git-gutter-fr:deleted [128 192 224 240] nil nil 'bottom))
;; Emojis
(use-package emojify
@@ -247,7 +243,7 @@
company-show-quick-access t
company-tooltip-limit 20
company-dabbrev-downcase nil
- company-backends '((company-capf company-gtags company-elisp company-css))
+ company-backends '((company-capf company-gtags company-elisp company-css company-dabbrev))
)
)