Commit graph

67 commits

Author SHA1 Message Date
Sean Farley
146e9a1acf vterm: adapt to new function signature
emacs-libvterm@376db7cf416 had a breaking change for
`vterm-exit-functions` which sends the event as the second argument.
2019-12-09 14:50:28 -08:00
Henrik Lissner
996188250b
Minor refactors & comment revision 2019-12-06 17:16:34 -05:00
Henrik Lissner
323e0adf45
Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
Henrik Lissner
2485123164
term/{eshell,vterm}: remove already in * buffer check
Allows users to spawn additional eshell/vterm buffers, if they like.
2019-08-22 14:44:14 -04:00
Henrik Lissner
0c7e6261e8
term/vterm: don't reset vterm popup 2019-08-11 02:05:09 -04:00
Henrik Lissner
19ecf8e46a
Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
703b58f325
term/*: conform to new conventions 2019-07-23 00:07:14 +02:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
648e81f765
term/vterm: remove evil config
It's been implemented in evil-collection-vterm.
2019-07-06 23:22:28 +02:00
Henrik Lissner
0eeb6b5092
term/vterm: add nixos recipes to README 2019-07-05 20:11:25 +02:00
Henrik Lissner
63883d575b
term/vterm: prefer built-in vterm to elpa
If it's present. Particularly useful for nix-os users who install
Emacs+vterm with this statement:

  systemPackages = with pkgs; [
    ((emacsPackagesNgGen emacs).emacsWithPackages (epkgs: [
      epkgs.emacs-libvterm
    ]))
  ];

Or with home-manager:

  programs.emacs = {
    enable = true;
    extraPackages = epkgs: [ epkgs.emacs-libvterm ];
  };
2019-07-05 20:04:42 +02:00
Henrik Lissner
9c842bfad8
Open term popups in current dir, instead of project-root
CDing into the project root can be accomplished with external tools, e.g.

  cd $(git rev-parse --show-toplevel)
  cd $(hg root)
  cd $(npm root)

Any of which could be aliased. Also, +vterm/toggle and term/toggle
define the PROOT environment variable, so `cd $PROOT` will work too.

On the other hand, CDing to the current file/folder requires that the
shell be made aware of the file/directory of some Emacs state, which is
a little trickier to deal with, so I made that the default behavior for
+term/toggle, +vterm/toggle and +eshell/toggle.
2019-06-17 19:25:17 +02:00
Henrik Lissner
43615c4d64
Integrate term toggle commands w/ persp-mode #1492
By namespacing the dedicated term buffers you get perspective-local
popup terminals.
2019-06-16 19:16:23 +02:00
Henrik Lissner
b2da28edfe
Revert to initial evil state on term popup toggle
i.e. switch to insert state and move cursor to prompt.
2019-06-12 20:17:47 +02:00
Henrik Lissner
4fec3eb698
Revise term/vterm/eshell commands & keybinds
The semantics of SPC o t and SPC o T (or SPC o e and SPC o E in eshell's
case) have been reversed.

The lowercase keybind toggles the popup (and the prefix arg forciby
recreates the popup), and the uppercase keybind switches to that
terminal in the current buffer (whose prefix arg will open the terminal
in default-directory, rather than the project root).

- +{term,vterm,eshell}/open have been replaced with +X/here commands and
  are bound to SPC o T (and SPC o E in eshell's case).
- +{term,vterm,eshell}/popup* have been replaced with +x/toggle commands
  and are bound to SPC o t (and SPC o e in eshell's case).

The "toggle" behavior will do as the name implies, except will select
the popup if it is visible but unfocused.
2019-06-11 07:53:50 +02:00
Henrik Lissner
8c65a63b1c
Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00