Commit Graph

156 Commits

Author SHA1 Message Date
1fd18b88dd Bind C-j/C-k to forward/backward history for eshell 2020-01-09 15:26:08 -05:00
f0abb3264c Fix #2014: +shell/here doesn't execute COMMAND 2020-01-01 22:47:59 -05:00
b88ff2a563 Fix s-backspace for non-evil users 2019-12-23 17:21:30 -05:00
c1879945fd Replace doom/backward-kill-to-bol-and-indent
WIth new evil-delete-back-to-indentation, with behaves exactly as C-u
does in vim.
2019-12-21 03:30:44 -05:00
e56cc98ae9 Move multi-term-buffer-name to :term term 2019-12-17 18:09:39 -05:00
663d3aaba9 term/eshell: move eshell-aliases-file to aliases
Rather than "alias"
2019-12-13 16:17:09 -05:00
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
996188250b Minor refactors & comment revision 2019-12-06 17:16:34 -05:00
26c8f5c6ef Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
aa19eeed0f Fix #2100: shell modeline doesn't stay hidden 2019-11-22 13:17:06 -05:00
0212bb95f8 term/shell: fix void-variable dir #2095 2019-11-21 13:54:37 -05:00
0be962bb77 tools/eshell: remove ag alias, add dired alias 2019-11-18 14:19:10 -05:00
449ddb986c Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
802cd5bfca Revert 5f9a630c2
manateelazycat/multi-term#2 wass merged.
2019-11-04 12:42:23 -05:00
94c2f91b75 term/eshell: fix custom eshell faces 2019-10-27 14:03:45 -04:00
bace6dddd2 autoload company-pcomplete-available
This function is called from the eshell module

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2019-10-23 10:18:44 +09:00
422c61a02a term/eshell: integrate company + pcomplete 2019-10-22 12:36:43 -04:00
5f9a630c2f term/term: fix void-function tramp-tramp-file-p error
multi-term uses tramp functions before tramp is loaded.

Remove this once manateelazycat/multi-term#2 is merged.
2019-10-21 16:23:44 -04:00
aa35695444 term/term: fix wrong-type-arg stringp error on +term/here
Caused by a change upstream to the multi-term function's return value.
2019-10-21 15:54:53 -04:00
a7a3e0e0e9 term/eshell: remove company integration
pcomplete simply provides better completion (but with a terrible UI).
There must be a way to integrate it into company...
2019-10-21 09:57:48 -04:00
25f6d5fec0 term/eshell: remove esh-autosuggest, improve company integration
esh-autosuggest only provides history completion, which isn't very
useful, especially when we already have history search (via ivy/helm)
available on 'C-s' in eshell.

The active company-backends have been rearranged so that company-capf is
the main completer, but will fall back to company-files (since capf
doesn't complete files, only directories and commands).

I wish there were something more robust, however. Perhaps a way to
integrate pcomplete into company?
2019-10-21 09:42:14 -04:00
45223b3785 term/eshell: remove use-package! shrink-path block
Just load it when it is needed, instead.
2019-10-19 22:22:50 -04:00
96c053c91d term/eshell: refactor company integration
Idle completion should be opt-in, especially for TRAMP users.
2019-10-19 22:22:50 -04:00
a1f51ef6e1 term/eshell: add emacs/e command 2019-10-18 21:10:55 -04:00
9b95a18eb8 term/eshell: improve completion 2019-10-18 21:10:55 -04:00
0344d6719c term/eshell: add eldoc support 2019-10-18 21:10:55 -04:00
3e947d39b5 term/eshell: optimize branch display in prompt #1882 2019-10-17 02:53:44 -04:00
323e0adf45 Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
56d8e1e0f8 bindings: fix emacs bindings and add more 2019-09-07 00:32:34 +02:00
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
0c7e6261e8 term/vterm: don't reset vterm popup 2019-08-11 02:05:09 -04:00
6647ebc736 term/shell: fix void-variable buffer error on +shell/toggle 2019-08-05 11:29:22 -04:00
19ecf8e46a Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
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
703b58f325 term/*: conform to new conventions 2019-07-23 00:07:14 +02:00
1b79aa1b4d term/eshell: remove redundant keys (with evil-collection)
And expand comments + use windmove-* instead of evil-window-* so as to
not exclude non-evil users from these keybinds.
2019-07-22 02:37:46 +02:00
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
51d3b1b424 💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
4ebd3fad7f Add :term shell module 2019-07-13 13:00:24 +02:00
648e81f765 term/vterm: remove evil config
It's been implemented in evil-collection-vterm.
2019-07-06 23:22:28 +02:00
0eeb6b5092 term/vterm: add nixos recipes to README 2019-07-05 20:11:25 +02:00
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
9a02bd8ac8 Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
e313fef7b0 term/eshell: fix reference to old function 2019-06-18 21:52:50 +02:00
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
2835314022 term/term: don't erase term buffer on toggle #1492 2019-06-17 16:06:11 +02:00
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
3e4f0a982b Fix #1492: +term/toggle not closing popup
And prevent term process from prompting on death.
2019-06-14 13:16:18 +02:00
7ce4a25e1e Rewrite +term/toggle #1492
multi-term performs a lot of hackery on Emacs' windows API, which causes
problems, particularly for persp-mode. To side-step it all we must
reinvent some of the wheel.
2019-06-14 12:33:09 +02:00
be907350e4 Fix +eshell/toggle with arguments
Fixes:

- Wrong-type-argument error when failing to display eshell buffer with
  pop-to-buffer, because it was killed (when prefix arg is non-nil).
- Passes non-existent variable `buf` to +eshell-run-command.
2019-06-13 17:52:52 +02:00