Commit Graph

5470 Commits

Author SHA1 Message Date
2f268e80bb tools/lsp: fall back to lsp-find-{definitions,references} #1521
When lsp-ui-mode is disabled.
2019-06-29 01:36:24 +02:00
a9ca62070c tools/lsp: reduce lsp's self-configuring eagerness
The original `lsp' initializes too much, too quickly. Things like
flycheck, company, and yasnippet. Doom's modules already handle these
just fine, so we advice it to leave it to us to handle. I intentionally
avoid disabling lsp-auto-configure because doing so is much more
destructive than I'd like.

This update prevents lsp-ui-mode from being auto-enabled on lsp-mode.
You can now (remove-hook 'lsp-mode-hook #'lsp-ui-mode) to disable
lsp-ui.

This update also adds these two hooks:

+ +lsp|init-company (on `lsp-mode-hook')
+ +lsp|init-ui-flycheck-or-flymake (on `lsp-ui-mode-hook')
2019-06-29 01:36:24 +02:00
380c3ac268 Disable lookup handlers if minor mode is disabled 2019-06-29 00:23:13 +02:00
7f5d961d89 lang/org: add nix install instructions to README 2019-06-28 19:45:05 +02:00
79db8c8958 lang/org: add gnuplot packages to README 2019-06-28 17:56:15 +02:00
11bfb17894 lang/org: major refactor
The motivation for this change was to rethink lang/org's flags. Many of
its former flags represented non-features. Therefore, its flags have
been reduced to five: +dragndrop, +ipython, +pandoc, +gnuplot and
+present. Everything else is included as org-load-hooks and treated as
reasonable defaults.

Other changes:
- Fixes #1502: don't autopair certain pairs when in a math region
- Fixes #1483: broken localleader in org-agenda
- Adds gnuplot support #1108
- Doom's org submodules have been moved into lang/org/contrib/, because
  I expect there will be *many* more to come, and I don't want to
  pollute the moudle's root.
2019-06-28 17:28:28 +02:00
9752cc005c lang/scala: minor reformatting 2019-06-28 17:28:28 +02:00
08e125d3d0 lang/scala: fix comment continuation #1515
On Doom's modded newline-and-indent.
2019-06-28 17:28:10 +02:00
c3d48e286b Add nix-mode file template 2019-06-27 21:35:53 +02:00
501ed32ce5 Merge pull request #1518 from jsravn/improve-scala-lsp
Remove lsp-scala, as lsp-metals is bundled in lsp-mode
2019-06-27 20:48:48 +02:00
a639d36a92 remove lsp-scala
lsp-scala is deprecated. It's now bundled in lsp-mode as lsp-metals.
2019-06-27 18:27:39 +01:00
57c52e4db6 Wrap :on-load for +lua-love-mode in a progn
Fixes #1516.
2019-06-27 20:26:32 +03:00
22cc519ac1 Add set-project-type! autodef
And use it for love2d projects in lang/lua module.
2019-06-27 17:16:40 +02:00
ba7c713bf6 Add projectile-{run,configure,test}-project keybinds 2019-06-27 17:14:15 +02:00
2387f56ba1 Rethink how we standardize modified RET
C-RET / C-S-RET = add new "item" below/above
On MacOS
  s-RET / S-s-RET = add new line below/above
Elsewhere
  M-RET / M-S-RET = add new line below/above
2019-06-27 13:22:42 +02:00
20b397362b Don't auto-kill term/vterm/eshell dedicated popups 2019-06-27 01:27:40 +02:00
d697cb7ec7 Fix C-{j,k} in non-read-expression prompts 2019-06-26 19:18:04 +02:00
525cba3f3b ui/workspaces: fix +workspaces|init for daemon 2019-06-26 19:17:56 +02:00
6bcddad852 Bind s-x (in visual mode) to kill-region on MacOS
To emulate standard cut behavior on cmd+X on MacOS
2019-06-26 14:31:07 +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
4ecf6c9414 Add SCHEDULED support to +org/dwim-at-point 2019-06-26 14:31:06 +02:00
f4ef25bb12 Don't delete-other-windows during org-agenda popup 2019-06-26 14:31:06 +02:00
b5c5b7f10d Move posframe+persp-mode fix to ui/workspaces 2019-06-26 14:31:06 +02:00
9823881d47 ui/workspaces: general refactor
- Fixes #1506: unsets uniquify-buffer-name-style to work around breakage
  in persp-mode having to do with buffers being retrospectively renamed.
  See Bad-ptr/persp-mode.el#104.
- Move creation of main workspace into persp-mode-hook, to ensure main
  workspace always exists and nil workspace is never active.
- Remove +workspaces|init-frame and significantly reduce LOC in
  +workspaces|init to the bare essentials. This _may_ break persp-mode
  in daemon Emacs, but I'll deal with that next.
2019-06-26 14:30:37 +02:00
86ebe08593 Show dirname in ivy-switch-buffer #1506
Makes buffer names more readable in case uniquify-buffer-name-style is
nil (which is necessary to work around a limitation of persp-mode).
2019-06-26 14:28:40 +02:00
168c1d5e61 Disable evil-snipe in calc-mode 2019-06-26 14:28:40 +02:00
affa7314f7 Remap C-{j,k} to {next,previous}-line-or-history-element 2019-06-26 14:28:40 +02:00
7a4bce3f9a ui/workspaces: associate buffers on buffer switch
We stop relying on the built-in mechanism for auto-registering a buffer
to the current workspace, because it misses many buffers (e.g. when we
switch buffers with SPC b b). Instead, we add buffers when they are
interactively switched to.
2019-06-26 14:28:40 +02:00
0290b687a5 Decouple ]e / [e keys from :tools flycheck module #1511
They're generic enough.
2019-06-26 14:28:40 +02:00
8434ae619d Enable evil-escape in term-mode
It was formerly escaped because of general bugginess, particularly when
bind -v was used in zsh. It's still too buggy to enable in vterm-mode,
however.
2019-06-26 14:28:33 +02:00
64d88bb956 fix: file not found in autoload 2019-06-21 16:45:07 +08:00
2e96fce2e0 ui/modeline: remove obsolete advice (fix #1372) 2019-06-19 11:37:27 +02:00
9c74d9d669 Add SPC g b and SPC g c b for branching
SPC g b = magit-branch-checkout
SPC g c b = magit-branch-and-checkout
2019-06-18 22:06:29 +02:00
e313fef7b0 term/eshell: fix reference to old function 2019-06-18 21:52:50 +02:00
44a5ffad66 tools/flyspell: doom-log failed to find checker
Instead of logging with message, which is more disruptive (appears in
bin/doom output, for instance).
2019-06-18 17:30:26 +02:00
f2d7c5625d Revise comments & docstring 2019-06-18 14:43:05 +02:00
c0bffd4268 editor/file-templates: general refactor 2019-06-18 00:29:05 +02:00
21cf1c2da6 editor/file-templates: fix #1401
org-capture, when used on a target that doesn't exist, will invisibly
expand a file template, leaving a hang yasnippet active. After
org-capture initializes, the yasnippet will attempt to operate on
overlays that don't exist, throwing overlayp errors.
2019-06-18 00:21:26 +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
0a7221798b Start file searchs from basic sh/dash shell
Uses the most basic, uncustomized shell to a) prevent interference
caused by slow shell configs and b) speed up project text searches. This
comes at the cost of isolating these programs from envvars that the user
may have set in their shell configs in order to change
ag/rg/pt/git-grep/grep's behavior.

If this bothers you, change +ivy-file-search-shell to your shell (or
to the value of `shell-file-name`).

Possibly relevant to an issue mentioned in #1260
2019-06-17 15:10:55 +02:00
855ff34e2c Port more next/previous motions from vim
They are:

]m, [m
  Jump to next/previous beginning of method/function.
]M, [M
  Jump to next/previous end of method/function
]#, [#
  Jump to next/previous preprocessor directive (only supports C-style
  directives for now)
]*, [* (or ]\, [\)
  Jump to next/previous comment
2019-06-17 12:37:19 +02:00
61502d7e31 Reformat editor/evil/autoload/evil library 2019-06-17 12:05:54 +02:00
76143d5a51 Escape pipes in selection for rg project searches
Pipes need to be double-escaped, because they're meaningful to both ivy
and ripgrep, and searches conducted on a selection need to be literal.
2019-06-16 23:04:39 +02:00
72fd61e07b Ensure order of after-change-major-mode-hook hooks
Reduces the likeliness of load order issues.
2019-06-16 19:16:23 +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
39faabab6a lang/emacs-lisp: fix imenu regexp for sections
Otherwise, section labels with non-symbol characters would be excluded
from imenu's results.
2019-06-16 19:16:23 +02:00
9bba39bd3a Prevent unsaved prompts when formatting #1498
The fix for #1489 (in 13f5a762) gives the temp buffer (where formatting
is performed) a real buffer-file-name, which causes it to prompt to save
it when it is killed.
2019-06-16 19:16:22 +02:00
0b1ecb8105 editor/evil: port vim-unimpaired keybinds
Adds these keys, inspired by tpope/vim-unimpaired:

[ SPC, ] SPC (or [o, ]o)
  Add COUNT blank lines above/below the cursor
[f, ]f
  Visit previous/next file in current folder, alphabetically
[u, ]u
  Url encode/decode operators
[y, ]y
  C-string-style escaping/unescaping operators (escapes quotes,
  backslashes and control characters)
[x, ]x
  XML entity encoding/decoding operators (only if :lang web is enabled)
[F, ]F
  Focus previous/next frame (decided this is better than ]t/[t which is
  being used by hl-todo-{next,previous})

We already had gp and ]b/[b (buffers).

We're not going to port ]e/[e because it is redundant with ddp/ddP or gx
(evil-exchange). I also think these keybinds are better suited to
{next,previous}-error.
2019-06-16 19:16:22 +02:00
3bbd4e3008 use default nix-indent-function
See https://github.com/NixOS/nix-mode/pull/79
2019-06-15 15:37:32 +03:00