Commit graph

1701 commits

Author SHA1 Message Date
Henrik Lissner
7f1b526f64
Set python-shell-* vars early
To make it easier for users to overwrite them in thir config.el (without
an after! block).
2018-10-03 00:05:45 -04:00
Henrik Lissner
63b195b133
lang/python: fix stringp errors when opening REPL
Caused my misuse of if-let* to let-bind dynamic variables. The expanded
code doesn't quite work out the way I expected, causing
python-shell-interpreter to be nil regardless of which side of the
if-else statement ran.
2018-10-02 23:52:29 -04:00
Henrik Lissner
270b381ce0
lang/ruby: fix reference to +python-version-cache 2018-10-01 12:28:58 -04:00
Henrik Lissner
05160a6526
lang/org: default org-agenda-files to org-directory 2018-09-30 15:14:01 -04:00
Henrik Lissner
fd19698927
doom|hack-local-variables => MODE-local-vars-hook
Uses a less destructive method (the same that Spacemacs uses) than the
one introduced in 13cee68, by introducing MODE-local-vars-hook hooks,
which run after local vars have been initialized.

The old method was to call `hack-local-variables` *before* mode hooks
run, however, this causes variables set by modes to have higher
precedence than local vars, which is unacceptable.

Also moved intero-mode & dante-mode to haskell-mode-local-vars-hook
2018-09-29 15:01:35 -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
b43888901f lang/cc: add rotate patterns for c++-mode
These can be used by pressing ! in normal mode, over rotatable regions
of text.
2018-09-28 21:13:27 -04:00
Henrik Lissner
523c2a114b lang/web (tests): Remove empty before-each block 2018-09-28 21:13:27 -04:00
Henrik Lissner
15991b5639 Refactor quiet! to be less destructive
It's possible for the debugger to be invoked from inside code wrapped in
a (quiet! ...) call. The debugger pauses Emacs in a broken state where
the functions locally rebound by quiet! (e.g. message, load-file,
write-region, etc) are never returned to their original definitions.

This attempts to reduce that probabilityby changing how quiet! silences
code. Rather than silencing them completely, they will be logged
to *Messages* but not displayed in the echo area.

Also, quiet! is now used less, where it isn't strictly needed (or where
inhibit-message is sufficient).
2018-09-28 21:13:27 -04:00
Henrik Lissner
078e3028a6 Minor, general comment revision 2018-09-28 21:02:59 -04:00
Henrik Lissner
29ad900c1f
lang/css: refactor +css/toggle-inline-or-block
Replaces instances of replace-regexp (interactive-only functions),
removing the need for with-no-warnings and quiet!.

Improves regexp responsible for compacting whitespace in between
properties, which reduces compaction of whitespace in string arguments.
2018-09-27 22:44:07 -04:00
Henrik Lissner
01dde97776
lang/org: tweak org-todo-keywords{,-faces} 2018-09-26 20:44:54 -04:00
Henrik Lissner
c7032cf8b0
lang/web: fully remove nil autopair group
This removes the nil autopair group, rather than just setting it to nil.
No functional different, it's [slightly] more performant.
2018-09-26 20:38:47 -04:00
Henrik Lissner
431ea613b0
lang/python: set PIPENV_MAX_DEPTH in eval handler
Instead of changing the cwd, which chould have other reprecussions for
the code about to be executed.
2018-09-26 20:38:02 -04:00
Henrik Lissner
da55ee2af2
lang/python: fix pipenv support for +python/repl 2018-09-26 20:37:35 -04:00
Henrik Lissner
68699c3d5b
lang/python: make repl/eval handlers respect pipenv 2018-09-26 12:28:32 -04:00
Henrik Lissner
4e0a4e1b51
lang/{ruby,python}: Fix advice arguments errors 2018-09-26 09:57:10 -04:00
Henrik Lissner
2a84836c11
+emacs-lisp-eval: emit backtrace on error
Running +eval/region (gr) and +eval/buffer (gR) will use
+emacs-lisp-eval (in emacs-lisp-mode buffers). This change will force it
to emit a backtrace in case of an error.
2018-09-25 23:26:08 -04:00
Henrik Lissner
8bdb42fe15
lang/ruby: major refactor
+ Robe is now to be started manually.
+ Adds more keybindings for robe (including <localleader> ' for
  robe-start).
+ Use ruby-mode if ruby isn't available (e.g. editing ruby files on
  remote systems), enh-ruby-mode otherwise.
+ Added rake, bundler, rvm, rbenv and minitest packages
+ Added $RBENV_ROOT/shims to exec-path. This should fix rbenv support
  for the ruby version display in the modeline.
2018-09-25 22:45:13 -04:00
Henrik Lissner
b91a8f0d2f
lang/python: rewrite modeline version segment
+ Add $PYENV_ROOT/shims was added to exec-path, so pyenv python version
  is picked up on.
+ Fixes out-of-date python version in the modeline of other buffers
  after switching pyenv/pyvenv/conda envs.
+ The pipenv version and regular python display have been merged.
2018-09-25 22:17:41 -04:00
Henrik Lissner
8afbb804d9
lang/ruby: add bundler + keybinds 2018-09-25 16:40:23 -04:00
Henrik Lissner
736bdeb205
lang/org: fix variable font-size for agenda paths
When you hover your cursor over agenda items, the path to that headline
is displayed in the minibuffer. If org-level-N have unusual :height
values, they'll cause the minibuffer to grow.

This removes any variable font sizes from this display.
2018-09-22 01:37:47 -04:00
Henrik Lissner
9726a982d1
lang/org: revise org-modules & revise load order
Improves the startup performance of org-mode by disabling modules I
don't think are commonly used (it's easy to add back however).
2018-09-21 22:42:26 -04:00
Henrik Lissner
ed1775b42d
lang/org: refactor +babel/ipython library
+ Conform ipython advice and helpers to naming conventions.
+ Refactor out dash.el usage
2018-09-21 22:38:21 -04:00
Henrik Lissner
ccaa642d98
lang/python: fix pipenv creating Pipfiles in pwd #888
`pipenv run ...` searches for a Pipfile itself, but doesn't search far
enough, creating a Pipfile in the current directory. Instead, we run the
command from the pipenv project root so it doesn't have to search.
2018-09-21 13:33:19 -04:00
Henrik Lissner
3fab4fbaba
Merge pull request #821 from patrl/agda
:lang agda (done)
2018-09-21 11:09:31 -04:00
Patrick Elliott
c23fe02869
Remove syntax highlighting 2018-09-21 14:52:42 +02:00
Henrik Lissner
92cf264b1b
lang/cc: don't complain if irony isn't installed 2018-09-20 23:13:17 -04:00
Henrik Lissner
c3b39be4ab
lang/crystal: improve dtrt-indent support 2018-09-20 15:43:42 -04:00
Henrik Lissner
aa08f338de
lang/emacs-lisp: add outline-minor-mode
And simplify outline-regexp for elisp buffers.
2018-09-20 15:28:03 -04:00
Henrik Lissner
77255a63e0
lang/org: refactor & expand org-capture-templates
+ Adds three new default org-capture templates, for todo, notes and
  changelogs. It will use the first {todo,notes,changelog}.org file
  found up the file heirarchy from the current file, or will use
  {project-root}/X.org.
+ Variables in org-capture-templates are now resolved relative to
  org-directory, if they aren't absolute.
+ Display target file in org capture window header-line.

Mentioned in #886.
2018-09-19 23:30:00 -04:00
Henrik Lissner
f25a5942e8
lang/scala: fix void-variable dtrt-indent-hook-mapping-list 2018-09-19 00:01:33 -04:00
Henrik Lissner
5ef94de541 Minor refactor, reformat & comment revision 2018-09-18 21:39:54 -04:00
Henrik Lissner
80e8ccec1c Alias +org-default-notes-file to org-default-notes-file 2018-09-18 15:19:50 -04:00
Henrik Lissner
6a44cf0124 editor/reformat: refactor & fixes
+ Change +format-type to +format-region-p (now a boolean)
+ Add PRESERVE-INDENT-P boolean argument to +format-buffer
+ Add +format-preserve-indentation variable (only controls indent
  preservation during +format/buffer, not +format/region, where it's
  always enabled).
+ Fix error arising from +format|buffer hook when no formatter is
  defined for the current mode #893
+ Change +format|buffer to alias for +format/buffer.
2018-09-18 15:19:50 -04:00
Henrik Lissner
4067c8937e Remove doom-major-mode-names & doom|set-mode-name
And replace it with buffer-local mode-name setters. This is more
explicit and less magical, which is easier for users to discover and
change, if they'd like.
2018-09-18 15:19:50 -04:00
Henrik Lissner
b7be38b2a9
New incremental lazy-loading at startup
This is for loading large packages (like org and magit) quietly in the
background during idle time. It is already set up to incrementally load
org and magit.

This is still experimental, however. the idle timers may need to be
tweaked.
2018-09-18 11:42:35 -04:00
Henrik Lissner
9684b34389
lang/markdown: fix next/previous link keybinds
They were the other way around.
2018-09-14 09:41:06 -04:00
Henrik Lissner
5145e7e822
lang/python: tab-width = python-indent-offset #882
This fixes evil-shift-width too (which is set to tab-width by
evil-collection-python).
2018-09-13 19:15:15 -04:00
Henrik Lissner
8575ddc136
Merge pull request #881 from rynffoll/feature/ansible
Add tools/ansible
2018-09-13 19:14:46 -04:00
Henrik Lissner
2abb452e83
Merge pull request #885 from dywedir/patch-1
lang/rust: add `cargo check` localleader keybind
2018-09-13 19:11:36 -04:00
Edwin Török
9d445c8a1f make compile: fix error in emacs-lisp
```
In toplevel form:
../modules/lang/emacs-lisp/autoload.el:71:21:Error: Wrong type argument: listp, "~/.emacs.d/modules/lang/emacs-lisp/autoload"
✕ Failed to compile modules/lang/emacs-lisp/autoload.el
```

This apparently attempts to get compiled multiple times, avoid that by
attempting to compile only if it is not compiled already.
2018-09-12 22:55:13 +01:00
Edwin Török
6eb95c98ea Fix bin/doom -d compile: org-attach-directory not defined 2018-09-12 22:55:13 +01:00
Vladyslav M
cd22434df0
lang/rust: add cargo check localleader keybind 2018-09-12 23:32:17 +03:00
Ruslan Kamashev
62212a4b94 Add tools/ansible 2018-09-11 22:42:05 +03:00
Henrik Lissner
ed702bab16
lang/ess: minor reformatting
Make hooks stand out a little more.
2018-09-10 22:39:11 -04:00
Henrik Lissner
ae6d106dce
lang/ess: update to reflect changes upstream #880 2018-09-10 22:36:37 -04:00
Henrik Lissner
f54c36e721
lang/common-lisp: revise sly popup rules
Fixes issues with the compilation, inspector, debug or trace buffers
replacing the repl popup.
2018-09-10 12:50:45 -04:00
Henrik Lissner
08d9c02218
lang/go: fix formatter
`use-region-p` is not a reliable mechanism for detecting region-type
formatting, so +format-type was added to the editor/format module.
2018-09-10 08:25:48 -04:00
Henrik Lissner
f115e4a883
lang/javascript: fix hijacked SPC in insert mode #876 2018-09-09 23:15:55 -04:00