This commit is contained in:
2021-01-27 21:50:40 +01:00
parent d8336fbbae
commit 34f76c13d8
25 changed files with 109 additions and 159 deletions

View File

@@ -16,27 +16,26 @@
;;; Code:
(use-package pdf-tools
:load-path (lambda() (concat user-emacs-directory "lisp/pdf-tools"))
:defer t ;; used by org-ref
)
:load-path "lisp/pdf-tools"
:defer t) ;; used by org-ref
(use-package biblio
:load-path (lambda() (concat user-emacs-directory "lisp/biblio"))
:defer t ;; used by org-ref
)
:load-path "lisp/biblio"
:defer t) ;; used by org-ref
(use-package org-ref ;; used with some preamble defs and \printbibliography (biblatex/biber, no html export), see also ox-bibtex
:load-path (lambda() (concat user-emacs-directory "lisp/org-ref"))
:load-path "lisp/org-ref"
:after (org)
:defer 1
:init
;; specify completion backends
(defvar org-ref-completion-library 'org-ref-ivy-cite) ;; requires ivy-bibtex, must be set before requiring org-ref otherwise helm will be loaded
:config
(setq bibtex-dialect 'biblatex) ;; biblatex also for biber
)
(setq bibtex-dialect 'biblatex)) ;; biblatex also for biber
(use-package ox-bibtex ;; used with #+BIBLIOGRAPHY: ... (bibtex, with html export), see also org-ref
:after (org)
:defer 1
)
:defer 1)
(provide 'bibliography-settings)
;;; bibliography-settings.el ends here

View File

@@ -51,7 +51,7 @@
(setq srecode-map-save-file (concat user-cache-directory "cedet/srecode-map.el")))
(use-package srefactor ;; https://melpa.org/#/srefactor
:load-path (lambda() (concat user-emacs-directory "lisp/srefactor"))
:load-path "lisp/srefactor"
:defer 2) ;; Loads after 2 seconds of idle time.
(use-package srefactor-lisp

View File

@@ -33,17 +33,15 @@
;; in an ivy action minibuffer use M-o `ivy-dispatching-done' to see
;; valid actions.
(use-package ivy
:load-path (lambda() (concat user-emacs-directory "lisp/ivy"))
:load-path "lisp/ivy"
:delight (ivy-mode "") ;; Ⓘ i
:defer 0.1
;; Ivy-based interface to standard commands
:bind (
("C-s" . swiper)
:bind (("C-s" . swiper)
("C-c C-r" . ivy-resume) ;; resumes the last Ivy-based completion.
("<f6>" . ivy-resume)
("C-c v" . ivy-push-view)
("C-c V" . ivy-pop-view)
)
("C-c V" . ivy-pop-view))
:config
(ivy-mode 1)
(setq ivy-use-virtual-buffers t) ;; Add recent files and bookmarks to the ivy-switch-buffer
@@ -60,8 +58,7 @@
(use-package counsel
:after ivy
:bind (
("M-x" . counsel-M-x)
:bind (("M-x" . counsel-M-x)
("M-y" . counsel-yank-pop)
("C-x b" . counsel-switch-buffer)
("C-x C-f" . counsel-find-file)
@@ -91,8 +88,7 @@
("C-c t" . counsel-load-theme)
("C-c F" . counsel-org-file)
:map minibuffer-local-map
("C-r" . counsel-minibuffer-history)
)
("C-r" . counsel-minibuffer-history))
:config
;; Do not open dired for directories when using counsel-find-file
;; https://emacs.stackexchange.com/questions/33701/do-not-open-dired-for-directories-when-using-counsel-find-file
@@ -112,7 +108,7 @@
;;(setq tab-always-indent 'complete) ;; use 'complete when auto-complete is disabled
(use-package company
:load-path (lambda() (concat user-emacs-directory "lisp/company"))
:load-path "lisp/company"
:delight (company-mode "") ;; Ⓒ c
;;:bind (("C-M-i" . company-complete))
:bind (([remap completion-at-point] . company-complete)
@@ -216,7 +212,7 @@ Possible PACKAGE values are `company'."
'(yas-popup-isearch-prompt yas-maybe-ido-prompt yas-completing-prompt yas-no-prompt)))
(use-package yasnippet-snippets
:load-path (lambda() (concat user-emacs-directory "lisp/yasnippet-snippets"))
:load-path "lisp/yasnippet-snippets"
:after (yasnippet)
:defer 1)

View File

@@ -12,8 +12,7 @@
(setq deft-directory "~/Sync")
;; (setq deft-extensions '("org" "md" "txt"))
(setq deft-use-filename-as-title t)
(setq deft-use-filter-string-for-filename t)
)
(setq deft-use-filter-string-for-filename t))
(provide 'deft-settings)
;;; deft-settings.el ends here

View File

@@ -6,7 +6,7 @@
;;; Code:
(use-package eaf
:load-path (lambda() (concat user-emacs-directory "lisp/emacs-application-framework"))
:load-path "lisp/emacs-application-framework"
;;:after (org) ;; eaf requires eaf-interleave requires org
;;:defer 2
:commands (eaf-open
@@ -27,8 +27,7 @@
:if my-dbusp ;; EAF use DBus' session bus, it must run by a general user (DO NOT USE as root).
:config
(setq eaf-find-alternate-file-in-dired t)
(setq eaf-config-location (concat user-cache-directory "eaf/"))
)
(setq eaf-config-location (concat user-cache-directory "eaf/")))
(provide 'eaf-settings)
;;; eaf-settings.el ends here

View File

@@ -18,9 +18,9 @@
;;; Code:
(use-package ess-site ;; all ESS features
:load-path (lambda() (concat user-emacs-directory "lisp/ess"))
:commands ess-r-mode ;; only R related features
)
:load-path "lisp/ess"
:commands ess-r-mode) ;; only R related features
(use-package ess-R-data-view
:after (ess-r-mode))

View File

@@ -15,11 +15,11 @@
:mode "\\.md\\'")
(use-package sql-indent
:load-path (lambda() (concat user-emacs-directory "lisp/sql-indent"))
:load-path "lisp/sql-indent"
:commands sqlind-minor-mode)
(use-package systemd
:load-path (lambda() (concat user-emacs-directory "lisp/systemd"))
:load-path "lisp/systemd"
:commands systemd-mode
:mode (("\\.service\\'" . systemd-mode) ("\\.mount\\'" . systemd-mode)))

View File

@@ -207,8 +207,7 @@ with a drive letter and a colon.")
(use-package paren
:defer 0.1
:config
(show-paren-mode t)
)
(show-paren-mode t))
;; emacs warning:
;; ad-handle-definition: `text-scale-increase' got redefined
@@ -231,8 +230,7 @@ with a drive letter and a colon.")
:config
(setq transient-levels-file (concat user-cache-directory "transient/levels.el"))
(setq transient-values-file (concat user-cache-directory "transient/values.el"))
(setq transient-history-file (concat user-cache-directory "transient/history.el"))
)
(setq transient-history-file (concat user-cache-directory "transient/history.el")))
;;
;; keyboard
@@ -306,6 +304,7 @@ with a drive letter and a colon.")
(global-set-key (kbd "M-m j S") 'split-line)
;; navigation/jumping
(global-set-key (kbd "M-m j f") 'find-function)
(global-set-key (kbd "M-m j l") 'find-library)
(global-set-key (kbd "M-m j v") 'find-variable)
;; narrow & widen
(global-set-key (kbd "M-m n r") 'narrow-to-region)
@@ -347,8 +346,7 @@ with a drive letter and a colon.")
(global-set-key (kbd "M-m w s") 'split-window-below)
(with-eval-after-load 'winner-mode
(global-set-key (kbd "M-m w u") 'winner-undo)
(global-set-key (kbd "M-m w U") 'winner-redo)
)
(global-set-key (kbd "M-m w U") 'winner-redo))
(global-set-key (kbd "M-m w v") 'split-window-right)
(global-set-key (kbd "M-m w w") 'other-window)
(global-set-key (kbd "M-m w W") 'ace-window) ;; same as ace-selct-window
@@ -423,14 +421,14 @@ with a drive letter and a colon.")
(global-set-key [mouse-4] (lambda () (interactive) (scroll-down 1)))
(global-set-key [mouse-5] (lambda () (interactive) (scroll-up 1)))
(defun track-mouse (e))
(setq mouse-sel-mode t)
)
(setq mouse-wheel-progressive-speed nil)
;; Turn on horizontal scrolling with mouse wheel
(global-set-key (kbd "<mouse-6>") (lambda () (interactive) (scroll-right 1)))
(global-set-key (kbd "<mouse-7>") (lambda () (interactive) (scroll-left 1)))
(setq mouse-sel-mode t))
(global-set-key (kbd "<mouse-8>") (lambda () (interactive) (previous-buffer)))
(global-set-key (kbd "<mouse-9>") (lambda () (interactive) (next-buffer)))
;;; Scrolling
;;(setq mouse-wheel-scroll-amount '(1)) ; Distance in pixel-resolution to scroll each mouse wheel event.
(setq mouse-wheel-progressive-speed nil) ; Progressive speed is too fast for me.
(setq mouse-wheel-tilt-scroll t) ; Turn on horizontal scrolling with mouse wheel
(setq mouse-wheel-flip-direction t) ; Swap direction of `wheel-right' and `wheel-left'
;; for scroll-all-mode add mouse wheel support
;; https://www.emacswiki.org/emacs/ScrollAllMode
(defun my-mwheel-scroll-all-function (func &optional arg)
@@ -450,19 +448,19 @@ with a drive letter and a colon.")
(setq mwheel-scroll-up-function 'my-mwheel-scroll-all-scroll-up)
(setq mwheel-scroll-down-function 'my-mwheel-scroll-all-scroll-down)
;;; Scrolling.
;; https://www.reddit.com/r/emacs/comments/8sw3r0/finally_scrolling_over_large_images_with_pixel/
;; Good speed and allow scrolling through large images (pixel-scroll).
;; Note: Scroll lags when point must be moved but increasing the number
;; of lines that point moves in pixel-scroll.el ruins large image
;; scrolling. So unfortunately I think we'll just have to live with
;; this.
;;(pixel-scroll-mode) ;; default off
(setq pixel-dead-time 0) ; Never go back to the old scrolling behaviour.
(setq pixel-resolution-fine-flag t) ; Scroll by number of pixels instead of lines (t = frame-char-height pixels).
(setq mouse-wheel-scroll-amount '(1)) ; Distance in pixel-resolution to scroll each mouse wheel event.
(setq mouse-wheel-progressive-speed nil) ; Progressive speed is too fast for me.
(use-package pixel-scroll
:defer t
:config
(setq pixel-dead-time 0) ; Never go back to the old scrolling behaviour.
(setq pixel-resolution-fine-flag t) ; Scroll by number of pixels instead of lines (t = frame-char-height pixels).
;;(pixel-scroll-mode) ;; default off
)
;;
;; Menu

View File

@@ -87,9 +87,7 @@
;; truncate-lines
;; vertical-type
;; horizontal-type)
(set-window-scroll-bars window nil vertical-type nil horizontal-type)
)
)
(set-window-scroll-bars window nil vertical-type nil horizontal-type)))
)
(use-package tab-bar
@@ -194,7 +192,7 @@
:defer t)
(use-package all-the-icons
:load-path (lambda() (concat user-emacs-directory "lisp/all-the-icons"))
:load-path "lisp/all-the-icons"
:defer t
:config
(when (and (not (my-font-installed-p "all-the-icons"))
@@ -204,7 +202,7 @@
))
(use-package dashboard
:load-path (lambda() (concat user-emacs-directory "lisp/dashboard"))
:load-path "lisp/dashboard"
:delight (dashboard-mode "🅓")
:config
(setq dashboard-startup-banner 'logo)
@@ -409,11 +407,9 @@ See also `dashboard-insert-section'."
(add-to-list 'dashboard-item-generators '(buffers . dashboard-insert-buffers) t)
;; see below add-to-list to dashboard-items
(add-to-list 'dashboard-items '(buffers . 5) t)
;; (add-to-list 'dashboard-items '(custom) t)
;; needs package all-the-icons
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
@@ -457,7 +453,7 @@ See also `dashboard-insert-section'."
;; Custom functions/hooks for persisting/loading frame geometry upon save/load
(setq my-frame-geometry-file (concat user-cache-directory "frame-geometry.el"))
(defun my-frame-geometry-save ()
"Gets the current frame's geometry and saves to ~/.emacs.frameg."
"Gets the current frame's geometry and save it to `my-frame-geometry-file'."
(let ((frameg-font (frame-parameter (selected-frame) 'font))
(frameg-left (frame-parameter (selected-frame) 'left))
(frameg-top (frame-parameter (selected-frame) 'top))
@@ -481,7 +477,7 @@ See also `dashboard-insert-section'."
(when (file-writable-p frameg-file)
(write-file frameg-file)))))
(defun my-frame-geometry-load ()
"Loads ~/.emacs.frameg which should load the previous frame's geometry."
"Load `my-frame-geometry-file' which should load the previous frame's geometry."
(let ((frameg-file my-frame-geometry-file))
(when (file-readable-p frameg-file)
(load-file frameg-file))))

View File

@@ -14,7 +14,7 @@
;;; Code:
(use-package ledger-mode
:load-path (lambda() (concat user-emacs-directory "lisp/ledger-mode"))
:load-path "lisp/ledger-mode"
:delight
(ledger-mode "🅛d") ; "Le "
(ledger-report-mode "🅛dr") ; "LeR 🅖⒭"
@@ -22,12 +22,10 @@
:mode "\\.ledger\\'"
:config
(setq ledger-post-account-alignment-column 2)
(setq ledger-post-amount-alignment-column 62)
)
(setq ledger-post-amount-alignment-column 62))
(use-package flycheck-ledger
:after (ledger-mode flycheck)
)
:after (ledger-mode flycheck))
(use-package company-ledger
:after (ledger-mode company)
@@ -37,8 +35,7 @@
(add-hook 'ledger-mode-hook
(lambda ()
(set (make-local-variable 'company-backends)
'(company-ledger company-capf company-files))))
)
'(company-ledger company-capf company-files)))))
(provide 'ledger-settings)
;;; ledger-settings.el ends here

View File

@@ -7,9 +7,8 @@
;;; Code:
(use-package multiple-cursors
:load-path (lambda() (concat user-emacs-directory "lisp/multiple-cursors"))
:bind (
;; see kbd prefix description in which-key-settings
:load-path "lisp/multiple-cursors"
:bind (;; see kbd prefix description in which-key-settings
("M-m s m a" . mc/mark-all-dwim)
("M-m s m b" . mc/mark-all-like-this)
("M-m s m m" . mc/mark-more-like-this-extended)
@@ -20,9 +19,7 @@
("M-m s m s n" . mc/insert-numbers)
("M-m s m s r" . set-rectangular-region-anchor)
("M-m s m s s" . mc/sort-regions)
("M-m s m s t" . mc/reverse-regions)
)
)
("M-m s m s t" . mc/reverse-regions)))
(provide 'multiple-cursors-settings)
;;; multiple-cursors-settings.el ends here

View File

@@ -2,7 +2,7 @@
;;; Commentary:
;;; Code:
(use-package my
:load-path (lambda() (concat user-emacs-directory "lisp/my"))
:load-path "lisp/my"
:config
(with-eval-after-load 'org
(add-hook 'org-mode-hook 'my-org-link-color-hook)

View File

@@ -234,8 +234,7 @@ Example defines
;; be loaded before, otherwise both versions will be loaded and will
;; conflict.
(use-package org
:load-path (lambda() (list (concat user-emacs-directory "lisp/org/lisp")
(concat user-emacs-directory "lisp/org/contrib/lisp")))
:load-path ("lisp/org/lisp" "lisp/org/contrib/lisp")
:delight (org-mode "🅞") ;; "Org "
:defer t
:init
@@ -422,7 +421,7 @@ Example defines
(use-package org-cliplink
:after (org)
:load-path (lambda() (concat user-emacs-directory "lisp/org-cliplink"))
:load-path "lisp/org-cliplink"
:config
(defun my-org-link-description-update ()
"."

View File

@@ -11,10 +11,9 @@
;;; Code:
(use-package gnuplot-mode
:load-path (lambda() (concat user-emacs-directory "lisp/gnuplot"))
:load-path "lisp/gnuplot"
:commands gnuplot-mode
:mode "\\.gp\\'"
)
:mode "\\.gp\\'")
(use-package plantuml-mode
:commands (plantuml-mode org-mode)

View File

@@ -2,7 +2,7 @@
;;; Commentary:
;;; Code:
(use-package polymode
:load-path (lambda() (concat user-emacs-directory "lisp/polymode"))
:load-path "lisp/polymode"
:commands poly-python-web-mode
:config
@@ -18,8 +18,7 @@
(define-polymode poly-python-web-mode
:hostmode 'poly-python-hostmode
:innermodes '(poly-python-web-expr-innermode))
)
:innermodes '(poly-python-web-expr-innermode)))
(provide 'polymode-settings)
;;; polymode-settings.el ends here

View File

@@ -29,8 +29,7 @@
(push '("^\*WoMan.+\*$" :regexp t :position bottom ) popwin:special-display-config)
(push '("^\\*Flycheck.+\\*$" :regexp t :dedicated t :position bottom :stick t :noselect t ) popwin:special-display-config)
(popwin-mode 1)
)
(popwin-mode 1))
(provide 'popwin-settings)
;;; popwin-settings.el ends here

View File

@@ -129,16 +129,14 @@ process."
:after (python anaconda-mode company)
:bind (([remap anaconda-mode-complete] . company-anaconda))
:config
(add-to-list 'company-backends '(company-anaconda :with company-capf)) ;; to see anaconda-mode completions together with ones comes from inferior python process
)
(add-to-list 'company-backends '(company-anaconda :with company-capf))) ;; to see anaconda-mode completions together with ones comes from inferior python process
;; https://melpa.org/#/sphinx-doc
;; https://github.com/naiquevin/sphinx-doc.el
;; enable the sphinx-doc-mode and bind the interactive function sphinx-doc to C-c M-d.
(use-package sphinx-doc
:delight (sphinx-doc-mode "") ;; Ⓢ s
:hook (python-mode . sphinx-doc-mode)
)
:hook (python-mode . sphinx-doc-mode))
(provide 'python-settings)
;;; python-settings.el ends here

View File

@@ -4,8 +4,7 @@
(use-package sh-script
:defer t
:config
(setq sh-basic-offset 2)
)
(setq sh-basic-offset 2))
(use-package powershell ;; https://melpa.org/#/powershell
:commands powershell-mode)

View File

@@ -20,7 +20,7 @@
;; for a short while. Therefore better defer loading.
;;(require 'flycheck (concat user-emacs-directory "lisp/flycheck/flycheck.el"))
(use-package flycheck
:load-path (lambda() (concat user-emacs-directory "lisp/flycheck"))
:load-path "lisp/flycheck"
:defer 2
:init
(setq flycheck-mode-line-prefix "𝓕") ;; Ⓕ 𝓕 ✈ f ;; other flycheck settings see syntax-checking-settings.el
@@ -31,8 +31,7 @@
;; flycheck-mode-line-prefix see general-settings-post.el
(setq flycheck-emacs-lisp-load-path 'inherit)
;;(add-hook 'after-init-hook #'global-flycheck-mode) ;; deactivated bc of defer
(global-flycheck-mode)
)
(global-flycheck-mode))
;; flycheck also has tooltips
;; flycheck-pos-tip shows errors under point in pos-tip popups.

View File

@@ -12,10 +12,9 @@
;;; Code:
(use-package spacemacs-common
:after (cl-lib) ;; spacemacs-common misses to load cl-lib
:load-path (lambda() (concat user-emacs-directory "lisp/spacemacs-theme"))
:load-path "lisp/spacemacs-theme"
:config
(load-theme 'spacemacs-dark t)
)
(load-theme 'spacemacs-dark t))
;; Test char and monospace:
;; 1234567890abcdefghijklmnopqrstuvwxyz [] () :;,. !@#$^&*
@@ -55,11 +54,10 @@
(use-package emojify
:commands emojify-mode
:load-path (lambda() (concat user-emacs-directory "lisp/emojify"))
:load-path "lisp/emojify"
:hook (after-init . global-emojify-mode)
:init
(setq emojify-emojis-dir (concat user-emacs-directory ".cache/emojify"))
)
(setq emojify-emojis-dir (concat user-emacs-directory ".cache/emojify")))
(provide 'theme-settings)
;;; theme-settings.el ends here

View File

@@ -39,9 +39,7 @@
("etc/images/next-node" . "document-export")
("etc/images/refresh" . ("document-revert" "refresh" "gtk-convert"))
("etc/images/exit" . ("n:application-exit" "n:system-shutdown" "exit" "gtk-quit"))
))
)
)
))))
(use-package dialog
:defer 2
@@ -59,9 +57,7 @@
(message "ja")
(previous-buffer)
(my-org-export-html)
(next-buffer)
)
)
(next-buffer)))
(setq my-org-export-dialog-html-var 'my-org-export-dialog-html-fun)
(defun my-org-export-dialog-pdf-fun ()
"Ask."
@@ -70,9 +66,7 @@
(message "ja")
(previous-buffer)
(my-org-export-pdf)
(next-buffer)
)
)
(next-buffer)))
(setq my-org-export-dialog-pdf-var 'my-org-export-dialog-pdf-fun)
(dialog-define my-org-export-dialog
@@ -85,8 +79,7 @@
;;[text 5 1 "PDF (LaTeX)"]
[button-quit 5 1 :tag "PDF (LaTeX)" :notify my-org-export-dialog-pdf-var]
[button-quit 7 1]
[text 8 1 ""]
)
[text 8 1 ""])
"This is my-org-export dialog.")
;; (my-org-export-dialog)
)
@@ -94,12 +87,11 @@
(defun my-org-export-ivy ()
""
(setq my-org-export-list '(
("HTML" . my-org-export-html)
("HTML async" . my-org-export-html-async)
("PDF (LaTeX)" . my-org-export-pdf)
("PDF (LaTeX) async" . my-org-export-pdf-async)
))
(setq my-org-export-list
'(("HTML" . my-org-export-html)
("HTML async" . my-org-export-html-async)
("PDF (LaTeX)" . my-org-export-pdf)
("PDF (LaTeX) async" . my-org-export-pdf-async)))
(ivy-read
"Org export: "
;;'("HTML" "PDF (LaTeX)")
@@ -113,19 +105,14 @@
;; get the value from the key value pair and call value (fun)
(funcall (cdr x))
)
"switch"
)
)
)
)
"switch"))))
(defun my-org-export ()
""
(interactive)
;;(my-org-export-dialog)
;;(dialog-run 'my-org-export-dialog)
(my-org-export-ivy)
)
(my-org-export-ivy))
;;(my-org-export)
;;(makunbound 'my-org-export)

View File

@@ -11,7 +11,7 @@
;; hydra.el https://elpa.gnu.org/packages/hydra.html
;; treemacs-magit ;; http://melpa.org/#/treemacs-magit
(use-package treemacs
:load-path (lambda() (concat user-emacs-directory "lisp/treemacs"))
:load-path "lisp/treemacs"
:commands treemacs
:init
;; get rid of the message:
@@ -19,21 +19,20 @@
;; see https://github.com/Alexander-Miller/treemacs/issues/100
;; and https://github.com/Alexander-Miller/treemacs/commit/f62a946f0fc5db79d37fb748ab49334c4e3cbbfd
(defvar treemacs-no-load-time-warnings t)
(setq
treemacs-follow-after-init t
treemacs-sorting 'alphabetic-case-insensitive-desc
;;treemacs-width 35
;;treemacs-position 'left
;;treemacs-is-never-other-window nil
;;treemacs-silent-refresh nil
;;treemacs-indentation 2
;;treemacs-sorting 'alphabetic-desc
;;treemacs-show-hidden-files t
;;treemacs-goto-tag-strategy 'refetch-index
;;treemacs-collapse-dirs (if treemacs-python-executable 3 0)
)
(setq treemacs-follow-after-init t)
(setq treemacs-sorting 'alphabetic-case-insensitive-desc)
;;(setq treemacs-width 35)
;;(setq treemacs-position 'left)
;;(setq treemacs-is-never-other-window nil)
;;(setq treemacs-silent-refresh nil)
;;(setq treemacs-indentation 2)
;;(setq treemacs-sorting 'alphabetic-desc)
;;(setq treemacs-show-hidden-files t)
;;(setq treemacs-goto-tag-strategy 'refetch-index)
;;(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0))
;;(:map global-map ([f8] . treemacs-toggle))
)
)
(use-package treemacs-magit
:after (treemacs))

View File

@@ -21,7 +21,7 @@
;;; Code:
;; see also Diff-Hl (diff-hl-mode) to see VC diff highlighting in fringes.
(use-package magit
:load-path (lambda() (concat user-emacs-directory "lisp/magit"))
:load-path "lisp/magit"
:bind (("C-c M-g" . magit-file-dispatch))
:config
;; (setq magit-completing-read-function 'magit-builtin-completing-read) ;; if ivy-mode is on then it uses it otherwise set to 'ivy-completing-read
@@ -32,8 +32,7 @@
(interactive "e")
(mouse-set-point evt)
(magit-section-toggle (magit-current-section)))
(define-key magit-mode-map [left-fringe mouse-1] 'my-magit-fringe-click)
)
(define-key magit-mode-map [left-fringe mouse-1] 'my-magit-fringe-click))
;; On Windows, we must use Git GUI to enter username and password
;; See: https://github.com/magit/magit/wiki/FAQ#windows-cannot-push-via-https
@@ -48,16 +47,13 @@
)
(use-package orgit
:after (magit org)
)
:after (magit org))
(use-package diff-hl
:load-path (lambda() (concat user-emacs-directory "lisp/diff-hl"))
:hook (
((prog-mode vc-dir-mode org-mode) . turn-on-diff-hl-mode)
:load-path "lisp/diff-hl"
:hook (((prog-mode vc-dir-mode org-mode) . turn-on-diff-hl-mode)
(magit-pre-refresh . diff-hl-magit-pre-refresh)
(magit-post-refresh . diff-hl-magit-post-refresh)
)
(magit-post-refresh . diff-hl-magit-post-refresh))
;;:config
;;(global-diff-hl-mode)
)

View File

@@ -18,23 +18,23 @@
(setq css-indent-offset 2))
(use-package js2-mode
:load-path (lambda() (concat user-emacs-directory "lisp/js2-mode"))
:load-path "lisp/js2-mode"
:commands js2-mode)
(use-package php-mode
:load-path (lambda() (concat user-emacs-directory "lisp/php-mode"))
:load-path "lisp/php-mode"
:commands php-mode)
(use-package web-mode
:commands (web-mode))
(use-package web-completion-data
:load-path (lambda() (concat user-emacs-directory "lisp/web-completion-data"))
:load-path "lisp/web-completion-data"
:defer t)
(use-package company-web-html
:after (web-mode company)
:load-path (lambda() (concat user-emacs-directory "lisp/company-web"))
:load-path "lisp/company-web"
:bind (([remap complete-symbol] . company-complete)) ;; M-C-i and <M-tab>
:config
;;(add-to-list 'company-backends 'company-web-html)
@@ -42,8 +42,7 @@
(add-hook 'web-mode-hook
(lambda ()
(set (make-local-variable 'company-backends)
'(company-web-html company-capf company-files))))
)
'(company-web-html company-capf company-files)))))
(provide 'web-settings)
;;; web-settings.el ends here

View File

@@ -14,11 +14,9 @@
(setq which-key-idle-delay 1.0)
(setq which-key-idle-secondary-delay 0.05)
;;(setq which-key-unicode-correction 3)
(when (daemonp)
;; problem if using unicodes and emacsclient, the last line of which-key side-frame is cropped.
(setq which-key-dont-use-unicode t)
)
(setq which-key-dont-use-unicode t))
:config
(which-key-mode)
(unless (daemonp)