paperwm/gnome-shell-mode

Documentation for installing in Doom Emacs

wraithm opened this issue · 1 comments

I'm absolutely loving paperwm! Thanks for all this wonderful work.

I use Doom Emacs, and it's not clear to me what the best way to install this for Doom Emacs would be. Basically, I'm asking for some help installing this in the best way on Doom Emacs.

Cheers :)

I happen to have switched to doom a while back, so here's how I have it set up:

In packages.el (same directory as config.el). Replace the path as needed.

(package! gnome-shell-mode
  :recipe (:local-repo  "~/src/gnome-shell-mode/" :files ("local/gnome-shell-mode/*")))
(package! company-gnome-shell
  :recipe (:local-repo  "~/src/gnome-shell-mode/" :files ("local/company-gnome-shell/*.el")))

In config.el:

(use-package! gnome-shell-mode
  :defer t
  :commands (gnome-shell-mode)
  :config
  (setq-hook! 'gnome-shell-mode-hook
    mode-name "GJS")

  (map!
   :map gnome-shell-mode-map
   :v "<return>" 'gnome-shell-send-region
   :gvni "C-<return>" 'gnome-shell-repl

   :map gnome-shell-mode-map
   :localleader
   :gnv :desc "Reload buffer" "r" 'gnome-shell-reload
   :desc "Reload session" "R" 'gnome-shell-restart
   :desc "Launch session" "l" 'gnome-shell-launch-session
   :desc "Clear output" "c" 'gnome-shell-clear-output-at-point

   (:prefix ("g" . "jump")
     :desc "Jump to definition" "g" '+lookup/definition)

   (:prefix ("s" . "eval in session")
     :desc "Eval buffer" "b" 'gnome-shell-send-buffer
     :desc "Eval function" "f" 'gnome-shell-send-proc
     :desc "Eval function" "d" 'gnome-shell-send-proc
     :desc "Eval line" "l" 'gnome-shell-send-current-line
     :desc "Eval region" "r" 'gnome-shell-send-region)

   (:prefix ("e" . "eval in session")
     :desc "Eval buffer" "b" 'gnome-shell-send-buffer
     :desc "Eval function" "f" 'gnome-shell-send-proc
     :desc "Eval function" "d" 'gnome-shell-send-proc
     :desc "Eval line" "l" 'gnome-shell-send-current-line
     :desc "Eval region" "r" 'gnome-shell-send-region)

   (:prefix ("o" . "output")
     :desc "Clear all output" "c" 'gnome-shell-clear-output
     :desc "Copy output" "y" 'gnome-shell-copy-output)

   (:prefix ("h" . "help")
     :desc "Lookup at point" "h" 'gnome-shell-look-up-function-at-point
     )
   )
  )

(use-package! company-gnome-shell
  :defer t
  :commands (company-gnome-shell)
  :init
  (set-company-backend! 'gnome-shell-mode 'company-gnome-shell))

Hope that helps, I should probably add it to the readme, but time :p