Commit graph

907 commits

Author SHA1 Message Date
Quentin Le Guennec
db9bc3848d feature/workspaces: Fix +workspace-delete to match docstring 2018-10-30 19:10:16 +01:00
Henrik Lissner
9599ca3cf2
feature/lookup: fix missing other-window args
For +lookup/references & +lookup/documentation
2018-10-22 22:16:27 -04:00
Henrik Lissner
915467cb13
feature/lookup: update dumb-jump integration
dumb-jump-go now returns a results plist, so our cl-letf hack is no
longer necessary.
2018-10-21 17:54:15 -04:00
Henrik Lissner
9337c3f8c3
feature/lookup: fix OTHER-WINDOW arg
For +lookup/definition, +lookup/references and +lookup/documentation.
2018-10-21 17:53:23 -04:00
Henrik Lissner
54749d04e6
Have :P modifier throw error when not in a project
If it returns nil, it will throw a stringp error otherwise.
2018-10-19 23:27:58 -04:00
Henrik Lissner
ab95ae1975
feature/eval: minor refactor
Now that I've "backported" display-line-numbers to Emacs 25, it isn't
necessary to conditionally enable nlinum-mode.

Also, use after! isntead of def-package!; this usage is equivalent, and
after! imposes less overhead.
2018-10-19 22:01:01 -04:00
Henrik Lissner
005a07b416
+evil:apply-macro: fix operator & fail gracefully
Formly, this would fail silently. This has been rewritten to let you
know if no macro is available at a register. It will also inform you how
many times the macro was executed.

Also fixes g@ not invoking the operator state.
2018-10-18 19:41:29 -04:00
Henrik Lissner
2ca2050c6d
feature/evil: fix o/O indentation in haskell-mode
Refactors +evil*insert-newline-*-and-respect-comments advice. This also
fixes an issue where o uses haskell's line indenter in haskell-mode,
which is naive. Instead, we use haskell-indentation-newline-and-indent,
which is smarter.

This is a dirty dirty hack. May Nyarlathotep have mercy on our souls.

Reported by @ar1a
2018-10-18 12:17:30 -04:00
Henrik Lissner
09f9e12638
Fix evil-open-above in auto-filled comments
If comment-auto-fill-only-comments is enabled, evil-open-above (O) can
break comments, e.g. in haskell

-- 1 :. 2 :. 3 :. Nil
-- |a
--

Becomes

-- 1 :. 2 :. 3 :. Nil
-- |
--
  a
--

Reported by @ar1a
2018-10-17 22:27:41 -04:00
Henrik Lissner
eb1440caa9
feature/evil: add evil-collection-resclient 2018-10-16 18:27:34 -04:00
Henrik Lissner
f4d49acdc8
More descriptive signatures for set-file-template!
And set-file-templates!
2018-10-16 17:32:59 -04:00
Zaiste
b4f0d60894
fix: allow deadgreap folding in normal mode 2018-10-08 18:37:13 +02:00
Henrik Lissner
352d9902e4
Fix set-eval-handler!
This ensures eval handlers shadow the correct entries in
quickrun--language-alist, rather than adding new/duplicate ones.
2018-10-07 00:36:34 -04:00
Amos Bird
ab273db50d
Rule is too restrict for file templates 2018-10-06 23:52:18 +08:00
Henrik Lissner
fe425c005e
Add g-/g= keys for buffer narrowing/widening 2018-10-03 11:14:08 -04:00
Henrik Lissner
6515efa19e
feature/workspaces: add +workspaces-on-switch-project-behavior #836
To control when a new workspace is created when switching projectile
projects.
2018-10-03 00:00:56 -04:00
Henrik Lissner
e7fc1d3290
Fix wrong-type-arg: stringp, nocache errors
Fix old usage of doom-project-name and doom-project-root.
2018-09-28 23:49:18 -04:00
Henrik Lissner
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
d9a179d071
feature/evil: refactor neotree-make-executor fix
The autoload is necessary in case neotree was installed in another
session.
2018-09-26 10:46:43 -04:00
Henrik Lissner
3dbeb4e3a7
Add doctstrings to +evil/fold-* commands 2018-09-23 21:06:45 -04:00
Henrik Lissner
8c4504380f
+evil/fold-toggle: don't hide recursively
Otherwise sub-entries will be folded and remain folded when unfolding
entries.
2018-09-23 21:04:20 -04:00
Henrik Lissner
ac63596be8 Fix doom-project-root returning nil if no project
It should return default-directory. A change upstream broke this.
2018-09-22 13:15:12 -04:00
Henrik Lissner
f8fb321f2c
Remove outline support from +evil/fold-close-all
It is buggy in modes with a poorly written outline-level function (like
elisp).
2018-09-22 10:34:31 -04:00
Henrik Lissner
1b3511890e
feature/evil: fix overzealous folding from :n TAB
Changes +evil/matchit-or-toggle-fold to be less trigger-happy about
toggling folds (it will only open folds not, not toggle them).

Also updates its docstring.
2018-09-20 22:27:15 -04:00
Henrik Lissner
feabbc31da feature/evil: add +evil/fold-{next,previous}
Brings zj/zk to evil
2018-09-20 22:27:01 -04:00
Henrik Lissner
5410f1d575 feature/evil: add arbitrary code folding keybinds 2018-09-20 22:27:01 -04:00
Henrik Lissner
6fce87bd06 feature/evil: refactor folding & outline support
Code folding commands will now obey outline headers (if
outline-minor-mode is on and in outline-mode).
2018-09-20 22:26:36 -04:00
Henrik Lissner
316aa428fb lang/evil: refactor +everywhere
Removed unnecessary blocks and reduced the amount of code to maintain.
2018-09-18 21:39:54 -04:00
Henrik Lissner
ed0857b988
Fix invalid-function error on snippet prompt 2018-09-17 08:53:13 -04:00
Henrik Lissner
1b7ae37447
feature/evil: refactor evil-collection integration
+ Move disabled modules into +evil-collection-disabled-list to make it
  easier to maintain our copy of evil-collection-list
+ Update evil-collection-list to reflect changes upstream
+ Fixes errors wrt missing evil-collection-* modules
2018-09-16 12:58:51 -04:00
Henrik Lissner
2b5738194e
feature/lookup: reduce coupling w/ lookup backends
You can now control exactly what lookup backends are used for the
various lookup commands (definition, references, online and file).

This allows you to disable (or add) backends by manipulating the default
value for these lists with add-hook or remove-hook:

* +lookup-definition-functions
* +lookup-references-functions
* +lookup-documentation-functions
* +lookup-file-functions
2018-09-13 19:15:15 -04:00
Henrik Lissner
03ce3db322
feature/evil: update for evil-collection changes
Now, evil-want-keybindings must be set to nil instead of
evil-want-integration.
2018-09-13 19:15:15 -04:00
Edwin Török
b9c966ec54 Backport to Emacs 25: avoid (setf (alist-get ... 'equal))
We would need to use `'equal` for comparison, but Emacs 25 only allows `'eq`.
Using `advice-add` to override `alist-get` does not work, because `setf`
has special handling for `alist-get`.

`repl.el`: Switch to a hash table which already supports multiple comparison
functions, and changing of elements even in Emacs 25.
`eshell/autoload/settings.el`: use conditional set-or-push.
Drop `doom*alist-get`, it is unused now.

Thanks to @hlissner for the reimplementation.
2018-09-12 23:03:02 +01:00
Henrik Lissner
856e4f27e5
feature/eval: autoload +eval-{repls,runners}
Fix void-variable error when, under certain conditions, these variables
are referred to before their containing files are loaded.
2018-09-10 22:57:26 -04:00
Henrik Lissner
bcb444fa18
Enable yas-minor-mode in conf-modes too 2018-09-09 09:58:21 -04:00
Henrik Lissner
bd28eea778
feature/evil: remove <> opener/closers
And remove unnecessary def-package block. These commands are already
autoloaded by the package.
2018-09-09 09:58:21 -04:00
Henrik Lissner
c58077810d
General refactor of modules
General code and comment improvements.

Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
2018-09-09 09:58:20 -04:00
Henrik Lissner
89b83f2457
Enable evil-escape-mode
I know this is redundant with the pre-command-hook hook, but the hook
allows us to lazy load the package, and the mode allows other modes (or
the user) to interactively disable it.

For example, evil-mc disabled it while cursors are active due to
incompatibility. This isn't possible if the mode isn't enabled to begin
with.
2018-09-09 09:58:20 -04:00
Henrik Lissner
18554ca5b5
feature/evil: extract advice functions
Into its own autoloads file, for better organization.
2018-09-09 09:58:20 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
c0ff5b030a
feature/evil: fix evil-change recommenting line
Due to a bug crossing over from +evil-want-o/O-continue-comments
functionality. It has also been refactored for performance. This also
fixes an issue where smartparens functions could be called before
smartparens was loaded, making o/O inoperable.
2018-09-09 09:58:19 -04:00
Henrik Lissner
e89e3bd15e
Redesign set-docsets! autodef
+ Adds :add/:remove support.
+ Adds conditional docset support through nested vectors
+ Removes support for setting docsets on a minor-mode basis (mostly for
  performance reasons, but now that we have conditional docsets, it's
  unnecessary).
2018-09-09 09:58:18 -04:00
Henrik Lissner
e7d5da2686
feature/evil: detect frame cursor-color #851
In case set-cursor-color was used early in the config process (e.g. in
~/.doom.d/init.el), detect it before resorting to #FFFFFF as a default.
2018-09-03 03:58:44 +02:00
Henrik Lissner
596705dbda
Properly prioritize private snippets #852
In the previous solution, if *any* private snippets existed, *all*
non-private snippets were hidden.
2018-09-03 03:58:43 +02:00
Henrik Lissner
55d4cbd314
Fix vestigial refs to before-switch-buffer hook
doom-before-switch-buffer-hook was renamed to doom-enter-buffer-hook
2018-08-31 14:10:25 +02:00
Henrik Lissner
7b2661d6a0
feature/lookup: update +lookup:dash ex command 2018-08-31 03:04:29 +02:00
Henrik Lissner
0cf9d1f2f2
Minor refactor & revision across the board 2018-08-31 02:53:50 +02:00
Henrik Lissner
fd8f8c5108
feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +02:00
Henrik Lissner
68e2b814e7
Fix stringp error when inserting new snippets #852
New snippets (created with yas-new-snippet) may not yet be associated
with a file when it is passed to the functions in yas-prompt-functions.
One of those functions, +snippets-prompt-private, prioritizes private
snippets over default ones, but determines which is which with
`file-in-directory-p`, which expects string arguments.

To fix this, we can safely assume that if a snippet has no associated
file, it is a private snippet.
2018-08-30 17:40:33 +02:00
Henrik Lissner
895cf136d5
Ensure evil popup rules are defined later
Otherwise they fall before ui/popup's fallback rules in
display-buffer-alist
2018-08-30 13:29:56 +02:00