noctuid / lispyville

lispy + evil = lispyville

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation documentation?

wpcarro opened this issue · comments

Thanks for making this package! I'm excited to get it up-and-running, but I'm currently having trouble.

Here is my configuration:

(defconst wpc/lisp-mode-hooks
  '(lisp-mode-hook
    emacs-lisp-mode-hook
    clojure-mode-hook
    clojurescript-mode-hook))

(use-package lispy
  :config
  (general-add-hook wpc/lisp-mode-hooks (enable lispy-mode))) ;; enable is just a macro that expands into `(lambda () (lispy-mode 1)`

(use-package lispyville
  :after (lispy)
  :config
  (add-hook 'lispy-mode-hook #'lispyville-mode))

I have confirmed that lispyville-mode is activated when I'm in .el files using describe-mode. What's troubling me, is that some of the keybindings I'm expecting to be mapped don't appear to be mapped.

For example, I'm primarily interested in using the lispyville-drag-{forward,backward} commands. Currently when I run M-j or M-k, I get lispy-split and lispy-kill-sentence.

While I'm on the subject of lispy bindings, I know lispyville cooperates with lispy, but I wasn't expecting to have any lispy KBDs in my keymaps; I was only expecting to have lispyville bindings. Is this an unreasonable expectation? In general I'm leery of overpopulating my keymaps because I find keybinding in Emacs to be somewhat messy. (P.s. I use general to help me with this, so thank you for that package.)

Lastly, would you be willing to accept a PR that includes a basic "Installation" section. The Readme is quite informative and as such it's long and takes time to read. While I'm at work, sometimes I only have time to quickly install and test out packages. For these moments, I look for quickstart installation instructions. I'm having trouble finding those in the Readme. It's possible that I'm missing something obvious.

For example, I'm primarily interested in using the lispyville-drag-{forward,backward} commands. Currently when I run M-j or M-k, I get lispy-split and lispy-kill-sentence.

See lispyville-key-theme. Neither of these are bound by default.

While I'm on the subject of lispy bindings, I know lispyville cooperates with lispy, but I wasn't expecting to have any lispy KBDs in my keymaps

lispyville-mode will work without lispy-mode. If you don't want any lispy keybindings, only enable lispyville-mode (and remove the :after line). As a side note, your enable macro could always be replaced with #'<some-mode>.

Lastly, would you be willing to accept a PR that includes a basic "Installation" section

If you want to add an example use-package statement that adds extra keybindings in the Basic Configuration Section and maybe move the section higher readme, that would be fine.

Thank you for the detailed response.

RE: lispyville-set-key-theme, is there a way (other than white-listing every key-theme) to enable all key-themes? Thinking something like (lispyville-set-key-theme 'all) or (lispyville-set-key-theme lispyville-key-themes) where

(defconst lispyville-key-themes
  '(operators
    c-w
    prettify
    text-objects
    ;; ...
    mark-toggle
    )
  "All available key-themes in Lispyville.")

RE: lispy-mode, thank you. Will update my configuration.

RE: enable, At some point I had configuration for hooks that looked like #'<some-mode>, which worked in most cases, but failed for (I think) linum-mode, which is when I wrote the macro and started consuming it throughout my configuration. I could be wrong about this because my memory is a bit hazy, but I specifically remember there being a use case.

RE: Documentation. Once I get this working, I'll add an example use-package statement to the README and open a PR.

Thanks for the help!

is there a way (other than white-listing every key-theme) to enable all key-themes?

There are different incompatibile versions for some of them (e.g. marking and slurping), but I could add a variable for all compatibile ones and maybe another variable or variables with a choice from the incompatibile ones. Could you open a separate issue for that?

but failed for (I think) linum-mode

To clarify, if the minor mode uses define-minor-mode, then it will work. If it uses some non-standard method, then it may not. I haven't seen a mode where that's the case. I never used linum-mode for line numbers, but it looks like it uses define-minor-mode. Maybe it used to not or maybe you had a problem with another mode.

Thanks, I'll try to look at your PR soon.