Fix issue #11207.
Only try to disable eyebrowse's advice on rename-buffer if we can find that
advice. If eyebrowse is older than version 0.7.6 (2017-11-22), the advice
will not exist, and attempting to delete it will cause an error:
ad-disable-advice: rename-buffer is not advised
* layers/+spacemacs/spacemacs-layouts/funcs.el
(spacemacs//activate-persp-mode): Only disable the
eyebrowse-fixup-window-configs advice for rename-buffer if the advice
exists.
See README.org for details
<<amendment 1>>
Updated some keybindings based on CONVENTIONS doc
Corrected file headers
Incorporated some immediate feedback from MaskRay
<<amendment 2>>
Corrected keybindings in README.org
<<amendment 3>>
Eliminated stray org-mode tag at table foot in README.org
Eliminated new 'l' prefix and moved bindings under 'g'
<<amendment 4>>
Updated defaults in config.el based on feedback from sebastiencs (lsp/lsp-ui dev)
- lsp-ui-sideline enabled by default
- lsp-ui-peek-expand-by-default disabled
<<amendment 5 09/04/18>>
Removed 'spacemacs/' prefix from lsp-format-buffer binding
<<amendment 6 09/04/18>>
Moved lsp-ui-peek bindings under j (jump)
Added goto bindings for new lsp-mode functions goto type definition and goto implementation
<<amendment 7 31/05/18>>
Corrected layer title in file headers
Rebased on dev tip (390462e)
<<amendment 8 03/07/18>>
Added keybindings for lsp-describe-thing-at-point,
lsp-workspace-restart, lsp-execute-code-action suggested by Yyoncho (LSP
Java)
Added avy keyboard navigation function provided by MaskRay
Reverted lsp-ui-peek to expand by default after an upstream change that
restricts expansion to current document, addressing the previous
performance issue.
<<amendment 9 04/07/18>>
Corrected keybinding for lsp-describe-thing-at-point
<<amendment 10 19/07/18>>
Rebound lsp-restart-workspace under mlq
Declared 'lsp' prefix (myrgy)
Added evil-set-command-property fix suggested by Yyoncho
Moved lsp-c-c++ layer from private branch to this PR after spending too
many hours of my life rebasing after circle CI picks up a formatting
error :)
<<amendment 11 25/07/18>>
Rebased
Bound cquery-freshen-index under lf
Bound cquery-preprocess-file under lp
<<amendment 12 01/08/18>>
Rebased
(c-c++ layer) moved semantic refactor refactor-at-point binding from mr
to mrp to prevent key binding error when semantic layer enabled
<<amendment 13 17/08/18>>
Added option to select ccls or cquery backend based on work by myrgy
Rebased on current upstream develop
<<amendment 14 20/08/18>>
Incorporated feedback from myrgy and maskray.
Corrected some duplication/inconsistencies.
Rebased.
<<amendment 15 21/08/18>>
Reduced duplication in backend config
<<amendment 16 22/08/18>>
Removed lsp-c-c++ layer example -- to be merged with c-c++ layer once
this PR is sorted
<<amendment 17 23/08/18>>
Added CHANGELOG.develop entry as per updated contribution guidelines.
<<amendment 18 24/08/18>>
Moved some keybindings as per feedback from sdwolfz
Before this commit, spacemacs-layouts/init-eyebrowse advised rename-buffer
with spacemacs//fixup-window-config. However, this advice causes problems
if persp-mode is not activated when a function tries to rename a buffer.
In particular, Spacemacs's CI uses Emacs's batch mode to run
spacemacs/publish-doc, which uses rename-buffer. In batch mode, persp-mode
is not activated, and consequently spacemacs/publish-doc was failing:
Publishing file /home/travis/.emacs.d/news/news01.org using ‘org-html-publish-to-html’
Skipping check for new version (reason: dotfile)
Wrong type argument: hash-table-p, nil
Warning (emacs): recentf mode: Wrong type argument: hash-table-p, nil
spacemacs/publish-doc failed
In order to avoid problems, this commit moves the advising of rename-buffer
from spacemacs-layouts/init-eyebrowse to spacemacs//activate-persp-mode.
* layers/+spacemacs/spacemacs-layouts/packages.el
(spacemacs-layouts/init-eyebrowse): Move advice from here...
* layers/+spacemacs/spacemacs-layouts/funcs.el
(spacemacs//activate-persp-mode): ...to here.
The problem was not with the existing bindings, but rather:
1. C-x C-e (spacemacs//counsel-edit -- from an ivy completion session) would
land you in an ivy-occur buffer with wgrep enabled but in motion state. This
meant the spacemacs key bindings for wgrep were not available. In particular,
the usual routine is:
* (enter ivy completion session, e.g. with SPC s a P)
* C-c C-e
* edit the buffer as needed
* , , (wgrep-finish-edit)
* , s wgrep-save-all-buffers
2. That last binding (, s) was not there.
One issue is that , s is available before wgrep-finish-edit is called, which is
confusing because I don't think it has any useful function at that point in
time.
Eyebrowse stores window configurations for workspaces in frame properties.
These window configurations reference buffers by name, which means that
these references must be updated when a buffer is renamed. To this end,
eyebrowse advises rename-buffer.
Spacemacs integrates eyebrowse with persp-mode by saving the eyebrowse
workspaces for a perspective as a parameter for that perspective so that
Spacemacs can restore a perspective's workspaces when switching to that
perspective. However, eyebrowse's advice for rename-buffer fails to update
inactive workspaces, for which the window configurations are stored in
perspective parameters and not frame properties.
This commit disables eyebrowse's advice and adds perspective-aware advice
to update buffer references in workspace window configurations.
* layers/+spacemacs/spacemacs-layouts/funcs.el
(spacemacs//fixup-window-configs): New.
* layers/+spacemacs/spacemacs-layouts/packages.el
(spacemacs-layouts/init-eyebrowse): Remove eyebrowse-fixup-window-configs
advice for rename-buffer and advise with spacemacs//fixup-window-configs
instead.
Define an alias and use it internally so that (1) the name of the command will
be better to understand what it does than the original name and (2) Helm or Ivy
interface is invoked instead of Ido.
These are suggested in PR #11115.
Try again to fix issue #11176.
* layers/+source-control/github/packages.el (github/init-magithub): Disable
the GitHub project status, pull requests, and issues sections by default.
* layers/+source-control/github/README.org: Document that these sections
are all disabled by default, and how to enable them.
Syntax-checking and auto-complete layers should more
directly communicate that their function depends on
the installation of individual language layers to avoid
misunderstandings with new users who only install
syntax-checking or auto-complete and install the packages
manually.
This fixes issue #5776.
* layers/+spacemacs/spacemacs-layouts/packages.el
(spacemacs-layouts/init-persp-mode):
Set persp-add-buffer-on-after-change-major-mode to 'free.