Commit graph

476 commits

Author SHA1 Message Date
duianto 3de7081950 Cleanup which-key names
Moved:
- ("ai" "irc") to both the `erc` and `rcirc` layers. They don't have to be
  renamed until the layers are loaded.

- ("ay" "ipython notebook") to the `ipython-notebook` layer.

- ("p$" "projects/shell")
  ("'"  "open shell")
  ("as" "shells")
  to the `shell` layer.

- The commands with keybindings from spacemacs-bootstrap/packages.el to
  spacemacs-defaults/keybindings.el.

Removed:
- ("gd" "diff") it seems to be an old group name, there's no `SPC g d` group at
  the moment.

- ("Re" "elisp") and ("Rp" "pcre") because they have moved to:
  ("xr" "regular expressions")
  ("xre" "elisp")
  ("xrp" "pcre")

- ("xm" "move") seems to be an old move text group, the current keybindings are
  `SPC x J` and `SPC x K` which opens the Move Text Transient State.

- ("b" "persp-buffers") because `SPC b` is also renamed as ("b" "buffers") which
  is more general and not persp-mode specific.
2019-02-18 14:35:00 -05:00
syl20bnr 95422ae5d5 Second part of review and tweaks of release notes 2019-02-10 12:37:41 -05:00
syl20bnr 474f945709 defaults: add SPC T N key binding to cycle theme backward 2019-02-10 10:10:51 -05:00
JAremko 24d875e193 Add transient state for centered buffer 2019-01-27 20:49:40 +02:00
Richard Kim a46b784e85 ported Info-find-file from emacs 27 by adding third argument 2019-01-22 00:00:42 +02:00
yuhan0 6737c8c8e5 Add ivy option to buffer transient state 2019-01-21 23:06:08 +02:00
deb0ch b7dedb9bd6 layouts layer: fix helm loading 2019-01-20 16:24:11 +02:00
syl20bnr 7cc06ce63e Update change logs
Thank you everybody for participating in #11741 in order to make this
possible!
2019-01-13 16:32:47 +02:00
emacspace 45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00
JAremko 69a89cc412 Replace centered-buffer-mode with writeroom-mode 2018-11-26 11:14:04 -05:00
duianto 438ad905da Update delete file messages
problems:
the delete file prompt doesn't show which file it's about to delete,
and when the deletion request is canceled, then the question remains in the
minibuffer (the text disappears when an action updates the minibuffer, like
moving the cursor, but it might be confusing to still be seeing the question
after it's been answered)

solution:
show the file name in the delete file prompt, and show a canceled message
2018-11-12 22:07:25 +00:00
Ag Ibragimov 27b2fb424a Keeps previous position on toggle-maximize-buffer 2018-11-12 22:01:56 +00:00
yuhan0 0596e90c3d Add 'z' recenter bindings for various transient states
By analogy with the "zz", "zb", "zt" vim / evil bindings, this adds an
additional key binding "z" for `recenter-top-bottom` to the following
transient states which navigate around the buffer in large jumps:
- auto-symbol-highlight
- error
- buffer
- vcs
- org-babel

This allows for repositioning of the buffer for visibility without having to
exit the transient state.

Minor updates are also made to documentation of other transient states.
2018-11-12 21:47:17 +00:00
deb0ch 1402b1bacc formatting 2018-11-05 22:14:32 +00:00
Boris Buliga 69a1e056ff
support directories in spacemacs/rename-file
1. Fix `short-name` for directories. Previously it was empty string.
2. Remove redundant check for existing buffer:
   1. `(get-buffer new-name)` always return `nil`, because `new-name` is a path
      to file, not a file name.
   2. `(find-file new-name)` handles this situation.
   3. `dired-rename-file` handles this situation as well.
3. Use `dired-rename-file` to do the dirty stuff.
   1. Renames files and directories.
   2. All associated buffers are updated. If you rename a directory, all buffers
      that were visiting files from that directory now visit files from new
      directory.
4. Properly handle recentf list update for directories - all files from the
   renamed directory are removed from recentf list and the same files but from
   new directory are added back.
2018-10-31 20:56:28 +02:00
Codruț Constantin Gușoi 5c6057226e Encapsulates multiple cursors functionality in a layer 2018-10-27 14:33:42 +03:00
duianto cca3021bb5
Fix packages.el formatting
Join trailing parentheses
Fix indentation
Limit line length to 80 chars
Fix missing newline warning
Remove empty line in a function
2018-10-23 07:13:53 +03:00
Boris Buliga 5d4b80bbad
set load-prefer-newer to t 2018-10-23 07:11:47 +03:00
duianto 0f1c461a5c
Fix missing newline warning
problem:
`'face 'minibuffer-prompt` and `new-name` are shown with an orange color,
and `describe-char` shows that they have the face: `font-lock-warning-face`

solution:
adding a newline before them removes the orange warning color
2018-10-18 19:34:15 +03:00
Boris Buliga d81e75584e
bump year in the copyright headers
Folks, this time of year has come. We can bump year in the copyright headers.
Let's celebrate!
2018-10-16 20:27:05 +03:00
Matt Kramer 5f27eee072
Fix global toggles for aggressive-indent and smartparens
Previously the global toggles acted on the local instead of global mode
2018-10-13 19:22:23 +03:00
JAremko cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
syl20bnr 9f8b867af1 Add SPC f y n and SPC f y N to copy the name of a file 2018-09-11 15:04:19 -04:00
syl20bnr e641e6c6e6 Add doom-emacs mode-line theme
Set dotspacemacs-mode-line-theme to 'doom to enjoy this great minimalistic
mode-line.
2018-09-04 14:53:39 -04:00
Miciah Masters 7852c3b36e Delete compilation finish hook
Before this commit, Spacemacs assigned an anonymous function to the
compilation-finish-function variable.  This variable was deprecated
in Emacs 22.1 and removed in Emacs 27.1 in favor of the
compilation-finish-functions hook.  Consequently, the assignment has
no practical effect in Emacs 27.1.

Although we could add the Spacemacs function to the new
compilation-finish-functions hook, the function serves little purpose; it
prints a generic message when compilation succeeds:

    compilation ok.

and it prints the key binding for spacemacs/next-error when compilation
fails:

    There were errors. Use SPC e n to visit.

However Emacs already prints messages to indicate success or failure,
respectively:

    Compilation finished

or (for example)

    Compilation exited abnormally with code 1

Because the Spacemacs function prints its "There were errors" message
immediately after Emacs prints its "Compilation exited abnormally" message,
the latter was obscured.  Because the exit code in Emacs's message could be
useful and the added value of the Spacemacs function's message is minimal,
we can simply delete the Spacemacs function.

* layers/+spacemacs/spacemacs-defaults/funcs.el
(compilation-finish-function): Delete the assignment and anonymous
function.
2018-09-03 21:29:53 +01:00
Ting Zhou 91bf157706 make spacemacs/counsel-search with proper highlighting 2018-09-01 00:13:03 +03:00
mpanarin ae00b1c70a Revert "Disable evil-ediff for now"
This reverts commit 4dbd5e6110.
2018-08-31 16:58:05 +03:00
Codruț Constantin Gușoi 816099aa2b Fixes keybinding conflict with fasd layer
The `SPC f a` keybinding was already used by the `fasd` layer so a
workaround had to be found for the newly introduced one.

Refs: c2e377c902
Refs: #11224

Thanks @agzam for pointing it out and investigating potential solutions.
2018-08-30 00:13:43 +03:00
Miciah Masters 25ac434e83 Only disable eyebrowse advice if it exists
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.
2018-08-28 21:57:27 +01:00
Cormac Cannon c122eb6a05 lsp-layer configuration and building blocks for derived layers.
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
2018-08-23 23:02:52 +01:00
Miciah Masters 31f4c2a005 Advise rename-buffer when persp-mode activated
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.
2018-08-23 10:29:37 +01:00
Miciah 4972855231 Fix updating buffer names in window configurations
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.
2018-08-21 23:27:31 +03:00
Masayuki Takemura c2e377c902 spacemacs-defaults: add a keybind to open a file and replace buffer with it
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.
2018-08-21 00:55:37 +03:00
Miciah Masters 6058921a02 layouts: Add free buffers to current layout
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.
2018-08-09 22:43:11 +01:00
Miciah def07cbfa3 Fix smart-closing-parenthesis extra parenthesis
Fix issue #9477: spacemacs/smart-closing-parenthesis sometimes adds an
extra closing parenthesis.

spacemacs/smart-closing-parenthesis may call sp-up-sexp twice: first to
find the position of an existing closing delimiter or the position at which
one would be inserted, and second to insert a delimiter if necessary or
else move point after the existing closing delimiter.

The problem is that each call to sp-up-sexp may insert a delimiter, but
spacemacs/smart-closing-parenthesis is supposed to insert at most one.

The solution is to undo any edit performed by the first call to sp-up-sexp.

* layers/+spacemacs/spacemacs-editing/funcs.el: Undo any edit performed by
the first call to sp-up-sexp.
2018-08-04 10:48:00 -04:00
Miciah Masters 1ecffa9834 Bind SPC f i to spacemacs/insert-file 2018-08-01 22:46:40 -04:00
Miciah Masters 07964b1a2e Work around ido-mode remapping Spacemacs keys
Add aliases for commands that ido-mode remaps that we want to bind to
Spacemacs keys, and use these aliases in the Spacemacs key bindings so that
these bindings invoke the original commands rather than the ido commands.

See <https://github.com/syl20bnr/spacemacs/issues/10237#issuecomment-359861570>.
2018-08-01 22:46:40 -04:00
syl20bnr 1ae5463051 Correctly lazy-load and disable zone 2018-07-29 15:42:32 -04:00
Kechao CAI 115c93050f +spacemacs: fix zone init
Commit 6f15744 causes the zone initialization error. This will fix #11101.
2018-07-29 15:32:31 -04:00
syl20bnr 6f157449c1 Fix zone-out-when-idle and correctly disable it when nil 2018-07-28 18:32:23 -04:00
Jesse Byler 1671f53f93 Add function spacemacs/new-empty-buffer-new-frame with binding
Add new function spacemacs/new-empty-buffer-new-frame, implemented
with a new selector in spacemacs/new-empty-buffer.  Bind it to
<SPC> b N f
2018-07-23 23:52:31 +03:00
bmag 4f70a9abcc Load evil-surround when entering operator state
Only using visual state as entry point for evil-surround doesn't guarantee
surround is available for evil-yank and evil-delete. Fixed by also using
operator state.

Fixes #11019 and #11021
2018-07-12 11:56:20 +03:00
Codruț Constantin Gușoi e2c0250548 Clarifies the zero based column indexing with messages and docs 2018-07-12 09:13:02 +03:00
Miciah 899e6beaac Fix and rename column-indexing toggle
The column-indexing toggle did not have a :status property.  As a result,
the toggle command would enable the toggle but would not disable it.  In
addition, the absence of :status prevented -off and -on commands from being
defined.

This commit adds a :status property so that the toggle works properly and
-off and -on commands are defined.

This commit also renames the toggle to "zero-based-column-indexing" in order to
make its purpose clearer.

* layers/+spacemacs/spacemacs-defaults/keybindings.el (column-indexing):
Add :status and rename to "zero-based-column-indexing".
2018-07-10 18:17:57 -04:00
FieryCod 41e9671a4d Fix the projectile layer 2018-07-09 23:17:08 +02:00
syl20bnr 4dbd5e6110 Disable evil-ediff for now 2018-07-04 02:36:59 -04:00
Codruț Constantin Gușoi 31264ffc84 Fixes errors when restoring a perspective
The function ends up being called with an argument due to the before advice.
2018-07-04 01:17:28 +03:00
syl20bnr a013d86874 core: update environment variables management
* add new dotfile function `dotspacemacs/user-env`
* add ignored env. vars with variable spacemacs-ignored-environment-variables
* ignore env vars: SSH_AUTH_SOCK and DBUS_SESSION_BUS_ADDRESS
* update documentation in DOCUMENTATION.org
* update .spacemacs.template with new function
* rename environment file from spacemacs.env to .spacemacs.env
* move location of .spacemacs.env file to home or dotdirectory
* add a header to the generated .spacemacs.env file to explain what it is
* make SPC f e e fallbacks to the function dotspacemacs/user-env if the user
  manages the env var by themselves
* make SPC f e E call the new function dotspacemacs/user-env
* sort environment variables in .spacemacs.env file
2018-07-03 01:25:28 -04:00
Codruț Constantin Gușoi aba51afe48 Multiple ways to copy a file path 2018-06-29 01:09:54 +03:00
bmag b54ea8ef90 line-nums: don't default to text/prog-mode if disabled by user
When :enabled-for-modes is nil we default it to '(prog-mode text-mode), but if
any of them is in :disabled-for-modes then it shouldn't be enabled by default.
This commit fixes the second part.
2018-06-27 09:13:21 +03:00