- In addition to the spacemacs leader keys, also replace the default emacs
keybindings under `C-h`
- Fix a documentation copy-paste mistake for `SPC h d v`
Classic completions now use company-math if available
however if this fails it should fall back to the
original system to avoid issues with existing
configs.
Combining company-math and company-auctex
Updating documentation and make math-symbol-lists requiring company-math
Back to original readme
math-symbol-lists is used elsewhere and should not be made dependent on the use of company-math
using the result of company-auctex-macros
Add explicit dependency of company-amth to math-symbol-lists
Sometimes it is handy to show keymaps persistently with which-key. For example,
to show navigation commands in Info-mode, gnus, eww etc. This PR implements
handy toggles and documentation for that.
problem:
key bindings that use the winum package,
don't work in the spacemacs-base distribution.
for example in the buffer transient state: SPC b .
{number}, C-{number} or M-{number}
shows messages like these:
Wrong type argument: commandp, winum-select-window-1
Symbol’s function definition is void: winum-get-window-by-number
cause:
the winum package is loaded in the spacemacs-navigation layer,
but the layer isn't used in the spacemacs-base distribution.
solution:
show the message:
This command requires the winum package,
winum is part of the spacemacs-navigation layer.
* First working pass
- Runs prettier on save when in ruby-mode.
- Adds `node_modules/.bin/` to local `exec-path`
- This means project-local `prettier` executables are preferred
* Making ruby layer prettier formatting configurable
- Adds a variable to control whether prettier is used to format-on-save.
- Documents use, configuration, and keybindings in the README
* Add to CHANGELOG.develop
* Delete spurious comment
* Use prettier as a dependency only when config variable is present
I do not see any reason why the keybinding to enter org-agenda should not be on
`. ,`. Therefore I propose here to make that keybinding consistent with the
keybindings for entering transient states in most/all other modes
Changes:
- Added two configuration variables for the mu4e layer to control mu4e-org
integration.
- Optionally configures mu4e compose mode to support Org-mode syntax.
- Improves lazy-loading of relevant features. E.g. loading org-mode does not
automatically trigger loading of mu4e.
problem:
The spacemacs-completion layer defines the variable:
helm-use-fuzzy
But the spacemacs-base distribution doesn't use the
spacemacs-completion layer by default.
helm-use-fuzzy is used in the helm layer.
When a helm buffer is opened, for example: `SPC SPC`
Then a warnings buffer opens:
>Error (use-package): helm/:config: Symbol’s value as variable is void: helm-use-fuzzy
solution:
Make sure that helm-use-fuzzy is bound and true.
problem:
The Magit w (apply patches) arguments are not remembered between sessions.
cause:
Magit reads the transient files:
history.el, levels.el, and values.el
before Spacemacs has redirected them to the .cache directory.
solution:
Redirect the files before magit reads them.
problem:
Pressing: u
in the spacemacs-base distribution, shows:
evil-undo: Symbol’s function definition is void: undo-tree-undo
cause:
The evil undo system is setup as: undo-tree
but undo-tree is loaded in the spacemacs-editing layer,
and the layer isn't used by default in the spacemacs-base distribution.
solution:
Set the evil undo system to undo-tree when the undo-tree package is used.
Now if undo-tree isn't setup, then:
- u uses the default Emacs undo command.
- C-r says: Customize ‘evil-undo-system’ for redo functionality.
problem:
Reloading the configuration: SPC f e R
after changing the variable: dotspacemacs-fullscreen-at-startup
to: t
changes Emacs into fullscreen mode.
solution:
Only check the variable and change to fullscreen mode on startup,
before Spacemacs has been initialized.
Fixes: Reloading config with fullscreen-at-startup t (in macOS) toggles fullscreen mode #13073
problem:
The Treemacs layer is unable to find python 3 in Windows.
cause:
The Treemacs layer looks for "python3", but the executable is called
"python.exe" in Windows.
solution:
Let Treemacs check for python 3 upstream, it has a better method for finding the
python 3 executable in Windows.
Similar to the keybindings added to the info layer in PR #14188, I here propose to add the same
keybindings to the epub layer. These J/K keybindings are currently undefined in the epub
layer. These keybindings are used in the Zathura document reader, they are very
convenient and I guess they feel very natural and are preferred over d/u by most people.
Standard LSP support auto-activates the server
if LSP layer is loaded. I have now added instructions
to explicitly disable this behaviour if someone wants
to work in LSP in one layer but only with CIDER in
clojure.
Spacemacs lacks a keybinding alternative to the most natural way of scrolling
Info pages (i.e. SPC) in vanilla emacs.
Anyway, this commit adds J/K to scroll most naturally through info pages.
Currently, in Info-mode, a keybinding for J is not defined while K is bound to
evil-lookup.
Issue #2828 already adresses the inconsistent experience, and in my opinion this
can and should be improved as navigating Info pages is a very crucial part of
using Emacs.
Personally I have bound J/K to scroll page up/down in buffers/pdf/djvu/doc-view,
which I inherited from using the zathura pdf reader, and I think this is a better
default than the default vim alternatives.
bind c-spc to ivy-call-and-recenter
this is the closest thing to helm follow mode in ivy world
unbin `g` key and map `U` for
for ivy-occur-mode-map and ivy-occur-grep-mode-map
* LaTeX: improved i18n support and documentation
- Added a new layer config variable `latex-build-engine`, a thin wrapper of
`TeX-engine`:
- For better support of non-european character set rendering, `xetex` is
chosen when it's found on PATH, and when eithe `chinese` or `japanese`
layer is enabled
- Added a new layer config variable `latex-enable-preview`:
- When non-nil, `auto-revert-mode` is added to `doc-view-mode-hook`
- Previously this is described in documentation but requires users to set it
manually
- Documentation:
- Added a section that lists are layer config variables
- Improved all documentation examples, s.t. they are valid elisp forms to be
evaluated directly
- Improved the section on backend:
- Emphsized that LSP layer is always preferred
- Provided information on installing the language server
- Added the default value for layer config variable, `latex-nofil-env`
* minor edits
- Updated CHANGELOG.develop
- Renamed `latex-enable-preview` to `latex-refresh-preview`
- Replaced a fuzzy intra-link in documentation with a proper link
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
When ligatures are enabled globally emacs gets pined at 100% CPU. In #13967
there were some ligatures that were highlighted but enabling this only in
prog-mode so emacs dose not get pined at 100% when just enabling with
(unicode-fonts-enable-ligatures t). In #14178 it was highlighted that "\\" had
an issue in the `init.el` so this has been removed
- "//" Issues with doom mode line
- ".." "..." Issues with helm find file
- "--" Issues with magit
The eglot configuration for automatically starting a server instance when
opening a file is incorrect and thus tries to start the server twice which leads
to more problems down the line. Also the company-backend is not properly setup
so auto-completion does not work reliably when using lsp or eglot.
This fixes g (magit-refresh), in the hybrid editing style when the variable:
hybrid-style-enable-evilified-state
is: nil
Thanks marienz for reporting the issue and for suggesting to check if the
editing style supports evil navigation.
https://github.com/syl20bnr/spacemacs/issues/14181#issuecomment-739251438
The newly added bindings had side effects for
magit. This was caused by which-keys replacement
working on bindings which are identical between
various modes.
To fix this I have changed the api to use the newly
added keymap based replacements which avoid these
issues.
As a side effect they are a ton faster as which
key does not have to compare all available bindings
everytime it opens its help window.
I have also fixed some more missing which-key
description in magit status buffer.
Currently 'helm-ag-mode-jump-other-window is bound both to RET and to C-o (its
original default binding), while 'helm-ag-mode-jump isn't bound at all (its
original default binding is RET). This commit removes our customization so that
both 'helm-ag-mode-jump-other-window and 'helm-ag-mode-jump have bindings in the
mode.
The same change is also made for the analogous helm-grep functions, for the same
reason.
This layer helps quickly sorting Dired buffers in various ways, such as
time, size, etc.
I think the underlying package is useful and worth a place in spacemacs.
It has also been promoted by Pragmatic Emacs before (albeit long time
ago): http://pragmaticemacs.com/emacs/speedy-sorting-in-dired-with-dired-quick-sort/
Disclaimer: I'm the author of dired-quick-sort package
Add key binding to evaluate the current namespace form (very useful when
starting CIDER as it loads in clojure.core to enable the cider-clojure-docs
functions to work)
Add keybinding to reload all namespaces into the REPL process
Adjusted key bindings to be lower case under `en` sub-menu.
Declared key binding prefixes.
And updated the react layer documentation:
- Mentioned the additional key bindings in the javascript layer
- Added a link to the javascript layer
* [core][keybinng] improve minor mode binding
This commit added add a new function defun spacemacs/declare-prefix-for-minor-mode
and improved spacemacs/set-leader-keys-for-minor-mode.
`which-key` package recently introduced a new api
which-key-add-keymap-based-replacements which improves perfomance and allows
prefix and namings to be stored directly in keymap. This is a great improvement.
With this new api we now make change to spacemacs/declare-prefix-for-minor-mode
to manage prefix also. For example:
(spacemacs/set-leader-keys-for-minor-mode 'lsp-mode
"=" "format"
"=b" #'lsp-format-buffer)
Before we had to use another api to bind prefix
spacemacs/declare-prefix-for-mode which only works on major-mode. As lsp-mode is
a minor mode this api causes a lot of problems to which-key performance. An
example is https://github.com/syl20bnr/spacemacs/issues/12455 which led to my
hack in https://github.com/syl20bnr/spacemacs/pull/12474.
The improved spacemacs/set-leader-keys-for-minor-mode will take care of both
prefix and key naming for the minor mode. This will allows us to have a better
set up for dynamic minor modes such as lsp-mode, tide-mode etc.
Also another api is created to make prefix for minor mode:
spacemacs/declare-prefix-for-minor-mode.
Usage:
(spacemacs/declare-prefix-for-minor-mode 'tide-mode "E" "errors")"
* [tide] improve prefix
* [lsp] improve prefix
* [core] add z$ as Evil keybinding for set-selective-display
This is a feature whose equivalent I had looked for previously and not found. I
bumped into it in [this excellent
article](https://karthinks.com/software/batteries-included-with-emacs/) which is
a survey of "batteries included" parts of Emacs. He mentions Spacemacs (in a
positive light) in the article, but the article is a lot about what you can do
_without_ distributions like Spacemacs, Doom, or Prelude. As such, this seems
like an opportunity to make Spacemacs even better---i.e. by making these
relatively unknown batteries that are already present in Emacs more discoverable
in Spacemacs.
I put it in the folding menu `z` because that fits its usecase. I used `$`
because:
* the out-of-the-box Emacs keybindings is `C-x $`.
* the menu is already fairly saturated
* I didn't know what else to base the mnemonic on because
* I'm not aware of a Vim equivalent
* The name of the Emacs function itself is nondescriptive of its behavior
I couldn't find any keybinding documentation table to add it to. Please let me
know if I missed something.
* [core] DWIM in z$ as suggested by @lebensterben
It builds around graphql-mode
- Syntax highlight and graphql calls with graphql-mode
- Autocomplete with comapy-dabbrev
- Format buffer with prettier
- Go to definition with ahs
Having to manually press i after using any of these commands is annoying to say
the least. This commit affects the following commands:
- org-insert-drawer
- org-insert-heading
- org-insert-item
- org-insert-structure-template
Change to org-insert-heading also affects other commands that use it
internally (e.g. org-insert-subheading).
This avoids more problems found by @duianto.
Also:
* Use more descriptive variable names
* Print message explaining lack of narrowing in visual block mode
* Apply @duianto's fix to only activate visual selection it if it was active
previous to the creation of the indirect buffer
* Block use of visual block mode because of continuing problems in that mode,
and its questionable usefulness in this case
* Extract commonalities out of the narrowing functions
* Make the new keybindings into a list in the changelog for readability, per
@duianto
Based on http://xenodium.com/search-bash-history-with-emacs-helm/
Add new helm/ivy functions `spacemacs/helm-vterm-search-history`,
spacemacs/counsel-vterm-search-history to search bash history and insert to
vterm/shell
Bind this function to M-r for vterm
New layer variable spacemacs-vterm-history-file-locatition to customize bash file
Default is nil.
Also bind add counsel-shell-history to `, H` for shell-mode in the same
convention as helm counterpart.
[shell] wip
Searching for information about configuration layers is confusing because both
the overview and development info pages have the same title (try it with
google). Specifying those info pages title names and adding cross links makes
the docs friendlier.
Added 'ranger as an option to the variable: ranger-enter-with-minus
Changed the default value from: t to: 'deer.
Bound the key to evil-motion-state-map instead of evil-normal-state-map
so that - also works from the Spacemacs home buffer.
* Added `helm-ag-success-exit-status` when using `rg`
It's been advised by the upstream of `helm-ag` to set
`helm-ag-success-exit-status` to `'(0 2)`.
This commit adds this.
ref: https://github.com/emacsorphanage/helm-ag#helm-agel-with-other-searching-tools
Signed-off-by: Lucius Hu <lebensterben@users.noreply.github.com>
* Use `magit-status-setup-buffer` instead of `vcr-dir`
This is suggested by the package itself.
Ref: 4da1a53f2f/helm-ls-git.el (L184-L189)
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
I chose to go this way rather than the other way because:
* Whenever you can avoid holding down a modifier key, great!
* It seems like the more specific should yield to the more general
This may be a controversial change, because it could break some folks' finger
memory. However I consider this a very unpleasant inconsistency that inhibits
the development of finger memory, so I thought I would at least suggest it as
the default for Spacemacs.
"SPC d" was used for documentation related keybindings, such as in `dash`
layer.
But it's now used for `dap` layer exclusively.
Removing this won't cause any issue as `dap` layer would correctly set
the keybindings once it's loaded.
* Bind typescript-format to "==" or "=" depending on backend
This fixes a problem when using 'lsp backend: the lsp layer binds its own
formatting functions under "=" as a prefix. The spacemacs/typescript-format
function which the typescript layer defines has advantages over these, mainly
it respects the typescript-fmt-tool variable (uses the formatting tool that
theuser specified).
This patch solves this by keybinding leader+"==" to the function when
typescript-backend is set to 'lsp and binding to leader+"=" in any other case.
* Fix an accidentally deleted keybinding in table in documentation
* use getter for backend variable
Co-authored-by: nanashi0x74 <rian.lindenberger@mpq.se>
This enables navigating up in the `ivy-reverse-i-search` list with `C-k`.
The same rebinding from `C-k` to `C-M-k` to kill a list entry,
is also done in the `ivy-switch-buffer`.
By default Ivy uses `find-file` which uses Emacs `abort-if-file-too-large`
function to check/warn before opening large files. That function however does
not take into account Spacemacs its `spacemacs-large-file-modes-list`. Instead
ivy should use `find-file-noselect` to skip Emacs it large file warning and let
it to Spacemacs its `spacemacs/check-large-file` function. Additionally [Emacs
tips on
comments](https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html)
recommends to use 3 semicolons for comments that function as headings.
Fsharp-mode has recently undergone some major changes. FSAutocomplete is
no longer distributed with Fsharp-mode. Instead Eglot is used a language
server that pulls in FSAutocomplete. To get auto-completion working
again eglot-fsharp has to be required and an instance of Eglot has to be
started once an F# file is opened.
* Group `line-number` funcs under SPC t n
* Better name: absolute-line-numbers
Keep the old symbols around for backwards compatibility
Co-authored-by: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
- Added documentation for the following minor modes:
- lsp-headerline-breadcrumb-mode
- lsp-lens-mode
- lsp-modeline-diagnostics-mode
- lsp-modeline-code-actions-mode
- Added description of Code Lens feature.
- Added description of default values of any variablese introduced in the
commit.
- Added a section to brief mention the DAP integration of lsp-mode, which
leads users the DAP layer for more details.
- Re-formatted the document, inline codes are quoted by '~' instead of '='.
The PR fixes an issue where spacemacs is in a bad state after upgrading. I
suppose what happens is that `evil-set-undo-system` is invoked before `evil` is necessarily the correct version.
org-jira is typically used from org major mode - new keybindings add a more
convenient way of invoking its functions.
The new org-jira submenu is available under "mj" - using the same pattern as
org-trello.
Add org-roam support along with keybindings under new menu prefix "SPC a o r".
Assign layer search keybinding ("SPC a o /") to helm-org-rifle, falling back to
previously assigned function (org-occur-in-agenda-files) when using ivy.
Creating another keybinding for org-occur-in-agenda-files is not necessary,
as it can be accessed with another existing keybinding ("SPC a o o /").
problem:
The following error messages are shown.
When trying to move, select or swap the current buffer,
to a window nr greater than the total number of open windows.
For example:
With only one window open.
`SPC b 2`
>ad-Advice-select-window: Wrong type argument: window-live-p, nil
In the Buffer Transient State (`SPC b .`):
- `C-2` (`spacemacs/buffer-transient-state/winum-select-window-2`)
>Wrong type argument: window-valid-p, #<window 12>
- `2` (`spacemacs/buffer-transient-state/move-buffer-window-no-follow-2`)
>Wrong type argument: window-live-p, #<window 14>
- `M-2` (`spacemacs/buffer-transient-state/swap-buffer-window-no-follow-2`)
>Wrong type argument: stringp, nil
Solution:
Show a descriptive message, if the target window nr is greater than the number
of open windows. And ignore the LV buffer (hydra).
Helm already has spacemacs/resume-last-search-buffer bound to it and is in my
muscle memory. spacemacs/resume-last-search-buffer doesn't work with ivy, so
just use ivy-resume.
Spacemacs uses spacemacs/swiper functions that use the less sophisticated
spacemacs//counsel-current-region-or-symbol instead of ivy's native
ivy-thing-at-point function. This commit removes those spacemacs functions and
rebinds the shortcuts to their better native equivalents.
problem:
The internal link:
- See [[info:auth#The Unix password store][its info page]] for more details on using it.
Caused an issues with travis-ci:
https://travis-ci.org/github/syl20bnr/spacemacs/jobs/732236190#L332
error: Link "info:auth#The Unix password store" has unknown type "info"
Solution:
Linked to the same page in the online manual.
New command added to CIDER in version 0.26 to evaluate the list around the
current point, different to evaluate sexp around point which also evaluates
symbols.
https://github.com/clojure-emacs/cider/pull/2881
Resolves#13948
problem:
The p key tries to paste in the read-only magit buffer,
instead of calling magit-push.
After toggling text-mode on and off (C-t or \),
because evil-mc-mode becomes enabled when text-mode is enabled.
* [core] Fix evil keybindings when a link is selected in Custom-mode
This uses a separate keymap bound directly to the widget and circumvents the
existing evil keybindings.
This fixes the bug found by @duianto, which he posted
[here](https://github.com/syl20bnr/spacemacs/pull/13949#issuecomment-694685304).
* [core] Fix q and u to work everywhere in a Custom-mode buffer
* [markdown] Anchor auto-mode-alist entries
A file named foo.mkd.patch should use diff-mode, not markdown-mode.
* [markdown] Simplify regexp in mode specifiers
Putting k in brackets here has no effect.
Looks like the provided hook statement
is not working properly with this package.
I have replaced it with the recommended
way defined in the package itself and
now it seems to work.
tab is reserved by the auto-completion layer and
shall never be overwriten in a layer. This moves
emmet-expand to a similar binding which was
originally used by emmet for non evil users.
This treats evil and non evil users alike and
avoid conflicts with company key bindings.
Still a layer changing the meaning of tab is
a bad idea, this key is reserved for auto-completion-layer.
We should add an alternative binding for it but this commit
focuses on removing the conflicts with company popup scrolling
first.
`fasd-find-file` incorrectly interprets a prefix argument of value 1
as equivalent to nil ([issue][0]).
Work around this bug by just passing another positive number instead.
We choose 2.
[0]: https://framagit.org/steckerhalter/emacs-fasd/-/issues/14
When the corrupted `elc` file is detected
`cider-jack-in-lein-plugin` has a nil value
value added already which causes `cider` to fail.
This commit removes such a row in that case.
It seems to happen from time to time that sayid is not
properly compiled after the installation. In this case
the variable `sayid-version` is `nil` causing
nRepl to fail.
This commit tries to work around this problem by
reinstalling the package if this corruption is detected.
This normally fixes the issue described in #13906.
In the documentation, it says this performs execute cell and goto next, while
the code was just executing the cell.
This desync could be fixed in either direction, but executing and going to next
feels more ergonomic while in the transient state, since we're jumping around
running rather than editing in that mode, so I've fixed it to do that.
This runs the default spacemacs elisp formatter on buffer save, with no
functional changes. I have further changes I'd like to integrate, but first
want to sweep this large but no-op diff forward.
Microsoft has released pyright language server for python. It boasts better
performance than the old Microsoft language server for python. This commit adds
supports for pyright language server in python layer
* Switch from nabero's ron mode to my own custom ron-mode (hosted on MELPA)
* Replace depreciated perl6-mode withraku-mode
* Remember to update the init function