牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

けっきょくEmacs の helm に戻ったので設定のメモ

前置き

helmからcounselに乗り換えたけど半年使って慣れずに結局helmに戻ったので設定メモ

Instal

M-x package-list-pacages で下記インストール

  • helm
  • helm-ls-git

init.el にhelmの設定

(progn
  (let ((ad-redefinition-action 'accept))
    (helm-mode 1))
  (setq helm-split-window-default-side 'same)
  (setq helm-mini-default-sources
        '(helm-source-buffers-list
          helm-source-files-in-current-dir
          helm-source-ls-git
          helm-source-recentf
          ))
  (require 'helm-ls-git)
  (setq helm-ls-git-default-sources
        '(helm-source-ls-git-status
          helm-ls-git-branches-source
          helm-source-ls-git-buffers
          helm-source-ls-git
          helm-ls-git-stashes-source
          ))
  (define-key helm-map (kbd "C-h") 'delete-backward-char)
  (global-set-key (kbd "C-]") 'helm-mini)
  (global-set-key (kbd "M-Y") 'helm-show-kill-ring)
  (global-set-key (kbd "M-.") 'helm-etags-select)
  (global-set-key (kbd "M-X") 'helm-M-x)
  (global-set-key (kbd "C-c g") 'helm-browse-project)
  )

色ちょびっと変更

  (eval-after-load 'helm
    '(progn
       (set-face-attribute 'helm-selection nil :background "#94BFF3")
       (set-face-attribute 'helm-grep-lineno nil :foreground "#F0DFAF")
       ))

ag.el でhelm使わない

  (add-to-list 'helm-completing-read-handlers-alist '(ag . nil))

いくつかのmodeでhelm-imenu使う

(define-key python-mode-map (kbd "C-c C-j") 'helm-imenu)
(define-key go-mode-map (kbd "C-c C-j") 'helm-imenu)
(define-key graphql-mode-map (kbd "C-c C-j") 'helm-imenu)
(define-key markdown-mode-map (kbd "C-c C-j") 'helm-imenu)```

Link