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
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.
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.
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.
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.
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.
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.
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>.
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
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".
* 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
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.
See updated DOCUMENTATION.org and FAQ.org for more info.
* add core-env.el
* add library load-env-vars.el
* add bootstrap package dotenv-mode.el
* remove spacemacs-environment from bootstrap layer
* remove dotspacemacs variable dotspacemacs-import-env-vars-from-shell
* remove dotspacemacs variable dotspacemacs-improt-env-vars-shell-file-name
* add new key binding SPC f e e to open spacemacs.env file
* add new key binding SPC f e E to reload environment variable from env file
* add new key binding SPC f e C-e to re-initialize the env file from shell.
Commit d7f5b58890 added a lazy-loader for
spaceline but used lazy-load-window-purpose as its name. As result,
window-purpose lazy-loader got overwritten and window-purpose didn't load at
all.
Replace push with add-to-list in layer init functions and related code.
Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.
Replace a conditional push onto erc-packages with use of :toggle.
When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements. We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.
Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
Emacs 26.1 will introduce a new native line numbers feature:
"display-line-numbers". It includes relative line numbers, is faster than
current linum-mode, and doesn't use the margin area (it has its own area). So
yeah, we want to use the new feature when possible.
No changes are required on the user side, except for Emacs 26 users are
recommended to remove nlinum layer from their configuration (if they have
enabled it).
With this change:
- Emacs 26:
- uses display-line-numbers by default.
- linum and linum-relative packages are excluded.
- Emacs 25:
- does NOT use display-line-numbers.
- continues to use linum and linum-relative.
- nlinum layer:
- can still be used as before in Emacs 25.
- is NOT recommended in Emacs 26, but can be used.
- when enabled, excludes display-line-numbers.
Also contains some bug fixes:
Fixes a bug where setting `dostpacemacs-line-numbers` to `t` or `relative`
enabled line numbers in every buffer, instead of only in buffers that derive
from prog-mode and text-mode.
Likewise fixes a bug where specifying `:enabled-for-modes nil` (or not
specifying `:enabled-for-modes` at all) in `dotspacemacs-line-numbers` settings
meant "enable in all modes" instead of "enable in modes derived from prog-mode
or text-mode".
Because of this change, also adds a way for users to enable line numbers
in *all* buffers.
Removes check for special buffer. All our current checks should be enough to
enable line numbers only where it makes sense. Disabling in all special buffers
is not necessary.
The `spacemacs//helm-navigation-ts-set-face` function had been changed to call
the face `spacemacs-helm-navigation-ts-face` with `-ts-`, but the face
definition was still called `spacemacs-helm-navigation-ms-face` with `-ms-`.
* Fix various isolated typos
"apppend" -> "append"
"availabe" -> "available"
"Descripti using ternon" -> "Description"
"you have not them" -> "you don't have them"
"new on" -> "new one"
"plained" -> "curved"
"repel" -> "REPL"
"vairable" -> "variable"
* Fix a few errors in the CoffeeScript layer readme
Add a missing "the".
Correct a reference to the layer as "javascript" to "coffeescript".
Fix the syntax on the link to CoffeeLint.
* Fix typos: "dofile" -> "dotfile"
* Fix typos: "formated" and "formating"
"formated" -> "formatted"
"formating" -> "formatting"
* hy: Fix docstrings in funcs.el
Fix copy-and-pasted docstring text for
spacemacs/hy-shell-eval-current-form-and-go and
spacemacs/hy-shell-eval-region-and-go.
* Fix typos: "indendation" -> "indentation"
* Fix typos: "the the", "a a"
Fix duplicated (or misplaced) articles.
* Fix typos: "wether" -> "whether"
* Fix typos: "intialize" -> "initialize"
For now we have an issue with invalid XMP image format when dumping.
So we force utf-8 separator.
spaceline-compile is really long and not really necessary for regular users.
Advanced users must explicitly call spaceline-compile in their dotfile and be
ready to pay a 0.5s penalty when loading emacs.
Before the display system is initialized, we cannot reliably make font
measurements so the height will be incorrect. This lead to display artefacts
if emacs was started in daemon mode without a graphical interface and later a
graphical client was connected (so for example, if you do `emacs --daemon`
followed by `emacsclient -c`).
Reduce the width of the listed key bindings by:
Moving the range and highlighted symbols counter to the right of the transient
state title.
Shorten some key description names.
Reduce three instances of "search" to just one.
And reorder the listed keys based on their search scope, small to large:
swoop, buffers, files, project.
We have key bindings to create two and three column
window layers.
This commit makes available a key binding to return to
the default spacemacs window layer, the single column one.
This idea is to have the spacemacs-base distribution only configure defaults for
built-in packages. Those buit-in packages are now configured in the new layer
spacemacs-defaults.
Additionally some other packages of spacemacs-base have been dispatched to
better suiting spacemacs layers.
Projectile has been moved to the new layer spacemacs-project
- Move the following packages to bootsrap distributio layer:
- exec-path-from-shell
- evil-evilified-state
- holy-mode
- hybrid-mode
- spacemacs-theme
- ace-window has been moved to spacemacs-navigation
- centered-buffer-mode has been moved to spacemacs-editing-visual
- pcre2el has been moved to spacemacs-editing
- evil-escape and evil-visualstar have been moved to spacemacs-evil
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
Before the commit 4b111f7701 it was possible to create new perspectives from projects not available on the list.
It would be possible to provide a path to a project that has not been open previously by emacs, and have the perspective created. Now that a match is required, it is not possible anymore, as the path provided is not one of the possible matches on the list.
This commit changes the behavior back to allow accessing projects that have not been visited before. Without this change, one needs to open a specific project first, using `C-x C-e` or `SPC f f` and then switch to the layout.
Fix#10177
counsel-projectile has updated custom actions mechanism[1] and
counsel-projectile-switch-project-actions is no more defined
Also,
- moved counsel-projectile into spacemacs-layouts from ivy layer as
perspective/layout based project switching depends on it instead of swiper
- removed swiper from spacemacs-layouts
[1] a4e9a34d7f
Use `counsel-projectile-switch-project-action` instead of
`projectile-switch-project-by-name`, to match the additional actions available
via `counsel-projectile-switch-project` (SPC p p).
Since we have now a variable for the mode-line theme, it makes sense to move
the scaling of the mode-line to this variable. Thus the property
=:powerline-scale= of variable dotspacemacs-default-font has been removed and
it is replace by the property =:separator-scale= used in the variable
=dotspacemacs-mode-line-theme=.
This commit also adds a the property =:sperator= for the variable
=dotspacemacs-mode-line-theme= which allows to set the separator type.
Example of the final result:
dotspacemacs-mode-line-theme '(all-the-icons
:separator cup
:separator-scale 1.5)
Documentation has been updated to reflect the changes.