Commit Graph

32 Commits

Author SHA1 Message Date
Henrik Lissner
0be962bb77
tools/eshell: remove ag alias, add dired alias 2019-11-18 14:19:10 -05:00
Henrik Lissner
449ddb986c
Minor refactors & reformatting across the board 2019-11-15 22:17:31 -05:00
Henrik Lissner
94c2f91b75
term/eshell: fix custom eshell faces 2019-10-27 14:03:45 -04:00
Rudi Grinberg
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
Henrik Lissner
422c61a02a
term/eshell: integrate company + pcomplete 2019-10-22 12:36:43 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
96c053c91d
term/eshell: refactor company integration
Idle completion should be opt-in, especially for TRAMP users.
2019-10-19 22:22:50 -04:00
Henrik Lissner
a1f51ef6e1
term/eshell: add emacs/e command 2019-10-18 21:10:55 -04:00
Henrik Lissner
9b95a18eb8
term/eshell: improve completion 2019-10-18 21:10:55 -04:00
Henrik Lissner
0344d6719c
term/eshell: add eldoc support 2019-10-18 21:10:55 -04:00
Henrik Lissner
3e947d39b5
term/eshell: optimize branch display in prompt #1882 2019-10-17 02:53:44 -04:00
UndeadKernel
56d8e1e0f8 bindings: fix emacs bindings and add more 2019-09-07 00:32:34 +02: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
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
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
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
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
Henrik Lissner
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
Henrik Lissner
e313fef7b0
term/eshell: fix reference to old function 2019-06-18 21:52:50 +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
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
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
a56ce38903
term/eshell: refactor & update keybinds
- Replace +eshell|init-evil with an advice for
  evil-collection-eshell-next-prompt-on-insert
- Update C-n/C-j and C-p/C-k keybinds to use
  eshell-{next,previous}-matching-input-from-input, which behave much
  like zsh's history-substring-search-{up,down}
- Move window navigation keybinds C-{h,j,k,l} to C-c {h,j,k,l} (more
  tmux-esque).
2019-06-11 07:57:26 +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
Siddharth Shekar
aa64cf9426 Replace kill-this-buffer with kill-current-buffer
As per the documentation for kill-this-buffer, it should only be invoked
from the menu and behaves unpredictably when invoked programmatically.
2019-05-30 18:54:58 -07:00
Henrik Lissner
a583d69ae1
Fix #1442: void-function eshell-input-filter-initial-space
eshell-input-filter-initial-space was introduced in Emacs 26. I've
inlined its definition, at least until we drop 25.x support.
2019-05-29 23:44:23 -04:00
Henrik Lissner
8c65a63b1c
Move eshell, term & vterm modules to :term 2019-05-19 02:17:59 -04:00