BREAKING CHANGE: This removes git-gutter as an implementation for the `:ui vc-gutter` module, leaving only the diff-hl implementation. There are no longer any +git-gutter or +diff-hl flags for this module. Users don't have to do anything to keep the vc gutter, unless they prefer git-gutter for any reason (in which case they'll need to install and set it up themselves). This has been planned for some time, because of a roadmap goal for Doom to lean into native/built-in functionality where it's equal or better than the third party alternatives. diff-hl relies on the built-in vc.el library instead of talking to git directly (thus expanding support to whatever VCS's vc.el supports, and not git alone), which also means it can take advantage of its caching and other user configuration for vc.el. Overall, it is faster and lighter. What I've also been waiting for was a stage-hunk command, similar to git-gutter:stage-hunk, which arrived in dgutov/diff-hl@a0560551cd and dgutov/diff-hl@133538973b, and have evolved since. Ref: dgutov/diff-hl@a0560551cd Ref: dgutov/diff-hl@133538973b Ref: https://github.com/orgs/doomemacs/projects/5/views/1?pane=issue&itemId=58747789
81 lines
3.3 KiB
EmacsLisp
81 lines
3.3 KiB
EmacsLisp
;;; input/layout/+azerty.el -*- lexical-binding: t; -*-
|
|
|
|
;; NOTE: here is roughly what the translations are:
|
|
;; previous: [ -> é
|
|
;; next: ] -> è
|
|
;; ` -> ²
|
|
;; @ -> à
|
|
|
|
(defun +layout-remap-keys-for-azerty-h ()
|
|
(setq avy-keys '(?q ?s ?d ?f ?g ?h ?j ?k ?l ?m)
|
|
lispy-avy-keys '(?q ?s ?d ?f ?g ?h ?j ?k ?l ?m ?ù ?a ?z ?e ?r ?t ?y ?u ?i ?o ?p))
|
|
(after! ace-window
|
|
(setq aw-keys '(?q ?s ?d ?f ?g ?h ?j ?k ?l ?m)))
|
|
(map! "C-z" 'evil-window-map)
|
|
(map!
|
|
:leader
|
|
:desc "Window" "z" 'evil-window-map
|
|
(:when (modulep! :ui popup)
|
|
:desc "Toggle last popup" "é" #'+popup/toggle)
|
|
:desc "Switch to last buffer" "²" #'evil-switch-to-windows-last-buffer
|
|
(:when (modulep! :ui workspaces)
|
|
(:prefix-map ("TAB" . "workspace")
|
|
:desc "Switch to last workspace" "²" #'+workspace/other
|
|
:desc "Previous workspace" "é" #'+workspace/switch-left
|
|
:desc "Next workspace" "è" #'+workspace/switch-right))
|
|
(:prefix-map ("b" . "buffer")
|
|
:desc "Previous buffer" "é" #'previous-buffer
|
|
:desc "Next buffer" "è" #'next-buffer)
|
|
(:prefix-map ("g" . "git")
|
|
(:when (modulep! :ui vc-gutter)
|
|
:desc "Jump to previous hunk" "é" #'+vc-gutter/previous-hunk
|
|
:desc "Jump to next hunk" "è" #'+vc-gutter/next-hunk))))
|
|
|
|
(defun +layout-remap-evil-keys-for-azerty-h ()
|
|
(map! :nv "à" #'evil-execute-macro
|
|
:nv "²" #'evil-goto-mark
|
|
(:when (modulep! :checkers spell)
|
|
:m "és" #'+spell/previous-error
|
|
:m "ès" #'+spell/next-error)
|
|
:n "è SPC" #'+evil/insert-newline-below
|
|
:n "é SPC" #'+evil/insert-newline-above
|
|
:n "èb" #'next-buffer
|
|
:n "éb" #'previous-buffer
|
|
:n "èf" #'+evil/next-file
|
|
:n "éf" #'+evil/previous-file
|
|
:m "èu" #'+evil:url-encode
|
|
:m "éu" #'+evil:url-decode
|
|
:m "èy" #'+evil:c-string-encode
|
|
:m "éy" #'+evil:c-string-decode
|
|
(:when (modulep! :ui vc-gutter)
|
|
:m "èd" #'+vc-gutter/next-hunk
|
|
:m "éd" #'+vc-gutter/previous-hunk)
|
|
(:when (modulep! :ui hl-todo)
|
|
:m "èt" #'hl-todo-next
|
|
:m "ét" #'hl-todo-previous)
|
|
(:when (modulep! :ui workspaces)
|
|
:n "èw" #'+workspace/switch-right
|
|
:n "éw" #'+workspace/switch-left)
|
|
:m "è#" #'+evil/next-preproc-directive
|
|
:m "é#" #'+evil/previous-preproc-directive
|
|
:m "èa" #'evil-forward-arg
|
|
:m "éa" #'evil-backward-arg
|
|
:m "èc" #'+evil/next-comment
|
|
:m "éc" #'+evil/previous-comment
|
|
:m "èe" #'next-error
|
|
:m "ée" #'previous-error
|
|
:n "èF" #'+evil/next-frame
|
|
:n "éF" #'+evil/previous-frame
|
|
:m "èh" #'outline-next-visible-heading
|
|
:m "éh" #'outline-previous-visible-heading
|
|
:m "èm" #'+evil/next-beginning-of-method
|
|
:m "ém" #'+evil/previous-beginning-of-method
|
|
:m "èM" #'+evil/next-end-of-method
|
|
:m "éM" #'+evil/previous-end-of-method
|
|
:n "éo" #'+evil/insert-newline-above
|
|
:n "èo" #'+evil/insert-newline-below
|
|
:nv "gà" #'+evil:apply-macro))
|
|
|
|
(+layout-remap-keys-for-azerty-h)
|
|
(when (modulep! :editor evil)
|
|
(+layout-remap-evil-keys-for-azerty-h))
|