Commit graph

11813 commits

Author SHA1 Message Date
Daniel Nicolai 623c75d7d9 Fix: update eaf layer
The layer got broken due to some minor changes in the eaf package by the eaf
developers. This commit fixes the layer to a working state.
2021-04-19 21:40:59 +02:00
Lucius Hu 3bbc7a7d40
core-customization: improved SAFE variable handling (#14679)
* core-customization: improved SAFE variable handling

- SAFE can either be a function or t.
  - When it's t, use a default validation function
    `(lambda (val) (validate-value val TYPE t))`
  - When it's a function, use the supplied function.

* Fixed bugs in go and groovy layer

In almost any cases, it's better to supply `t` instead of a function, to
`SAFE` argument of `spacemacs|defc`.

For example,
```elisp
 (spacemacs|defc go-use-gocheck-for-testing nil
   "If using gocheck for testing when running the tests -check.f will be used instead of -run to specify the test that will be ran. Gocheck is mandatory for testing suites."
  'boolean nil #'booleanp)
```

If its value is nil, it evaluate to `nil`, which means that `nil` is not
a safe value for `go-use-gocheck-for-testing` local variable.

But clearly it is.

* core-customization: improved SAFE variable handling

- Added a function `spacemacs-customization//get-variable-validator`.
  This function is designed to be used with `safe-local-variable`
  property of spacemacs custom variables.
  See details in the docstring.

```elisp
(put 'FOO 'safe-local-variable
     (apply-partially 'spacemacs-customization//get-variable-validator
                      'FOO))
```

- This is better than a lambda since `apply-partially` returns a compiled
  function. (Though the performace gain may be tiny.)
- This is better than simply calling `validate-value`, because it returns
  nil when value is nil. But sometimes nil is a valid value.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-19 21:34:09 +02:00
Luis Ch 175840bc6e
react: fix file auto detection (#14680) 2021-04-19 17:26:19 +00:00
Sylvain Benner 4a1f0ae49f [python] Fix directory specific python-backend
With this fix it is now possible to select different backends in
different project using the directory variables mechanism of Emacs
(the file .dir-local.el)
2021-04-18 08:56:04 +02:00
Maximilian Wolff 247d059289
[go] Switch layer variables to defcustoms
and fix wrong declaration of go-mode hooks
2021-04-17 23:56:05 +02:00
Maximilian Wolff b3bf5c1fb4
[groovy] Fix wrong customization type 2021-04-17 23:13:48 +02:00
Lucius Hu bd3a7fb0b5
go: Fix local variables
- Labelled `go-backend` and `go-format-on-save` as safe local variable.
- Added local variable hooks of go mode:
  - `spacemacs//go-setup-backend`
  - `spacemacs//go-setup-eldoc`
  - `spacemacs//go-setup-format`

See: https://github.com/syl20bnr/spacemacs/issues/14653
2021-04-17 22:49:33 +02:00
Maximilian Wolff 539c7849d5
[core] Avoid setting safe-local-variable to nil in spacemacs|defc 2021-04-17 22:38:29 +02:00
Maximilian Wolff 8814329a11
[groovy] Replace defvar with spacemacs|defc
And extend spacemacs|defc to allow setting
a :safe directive.
2021-04-17 22:07:44 +02:00
Lucius Hu c83a9e76b3
groovy: Fix local vars
- Labelled `groovy-backend` as safe local variable.
- Added local variable hooks of groovy mode:
  - `spacemacs//groovy-setup-backend`
  - `spacemacs//groovy-setup-company`

See: https://github.com/syl20bnr/spacemacs/issues/14653
2021-04-17 21:02:22 +02:00
Maximilian Wolff c0525bed81 [eww] Change bindings to match its given category
Eww was wrongly classified as web-service.
It can now be found under tools hence the global
binding was changed from `SPC a w e` to
`SPC a t e`.

Also I have removed parts of the documentation
still refering to this layer not being part of
Spacemacs.
2021-04-17 14:42:25 +00:00
emacspace 9257aab154 documentation formatting: Sat Apr 17 07:08:57 UTC 2021 2021-04-17 11:32:54 +03:00
JAremko 2b92149386 Fix ewww docs 2021-04-17 10:05:33 +03:00
Maximilian Wolff bc713b1943 [eww] Fix some smaller issues in the new layer 2021-04-15 21:30:15 +00:00
Maximilian Wolff f5ae720645 [eww] Specific changes from dalanicolai/eww-layer
This commit combines all changes from the above
mentioned fork from the original author.

All praise goes to dalanicolai.
2021-04-15 21:25:18 +00:00
coljamkop 313f975a2f Add eww layer
A spacemacs layer that adds:
 - Improved spacemacs functionality to eww-mode
 - Evil keybindings to eww-mode (including eww-buffers/bookmarks/history-mode)
 - Improved eww buffer management with key bindings
2021-04-15 21:20:05 +00:00
Maximilian Wolff 347ac504d8 [helpful] Make layer alias standard describe-functions 2021-04-15 21:14:23 +00:00
Lucius Hu 59ecf6a119 fixup! windows-scripts: replaced dos.el with bat-mode, added bmx-mode 2021-04-15 22:59:10 +02:00
Maximilian Wolff 3f795aebdb [parinfer] Remove path hack and obsolete layer specific hooks 2021-04-15 20:51:31 +00:00
emacspace 4471024721
[bot] Auto-update (#14648)
* documentation formatting: Thu Apr 15 19:58:45 UTC 2021

* Built-in files auto-update: Thu Apr 15 19:57:01 UTC 2021
2021-04-15 22:16:34 +02:00
pataquets 26390c155c Search Engine layer: Allow customization of Amazon site TLD. 2021-04-15 22:10:08 +02:00
duianto 95280d15a8 [dired] Add ivy command and replace evil collection key
Fixes: vim layer key binding of "J" in dired mode #14614
https://github.com/syl20bnr/spacemacs/issues/14614

problem
The evil collection binds "J" to `dired-go-to-file`

It overrides the Spacemacs `helm` and `ivy` equivalent commands.
`spacemacs/helm-find-files' has fuzzy matching and other features
`spacemacs/counsel-find-file' has more `M-o' actions

And the `ivy` layer uses the `spacemacs/helm-find-files` command.

solution
Move the Spacemacs definitions of "J",
after the evil collection dired keys have been setup
from: `spacemacs-bootstrap/packages.el`
to: `spacemacs-evil/init-evil-collection`

And use `spacemacs/counsel-find-file` in the `ivy` layer.
2021-04-15 22:07:30 +02:00
duianto b5fb7d5376 [base] Fix void spacemacs-evil-collection-allowed-list
problem
In the `spacemacs-base` distribution.

When the `git-enable-magit-todos-plugin`
layer variable is enabled.

Then the following message appears on startup:
>An error occurred while pre-configuring magit-todos in layer git (error: (void-variable spacemacs-evil-collection-allowed-list))

cause
The `spacemacs-evil-collection-allowed-list` variable
is assigned in the `git` layer.

But it's defined in the `spacemacs-evil` layer.

The `spacemacs-evil` layer isn't used by default
in the `spacemacs-base` distribution.

solution
Check that the `spacemacs-evil` layer is used
before adding to the variable.
2021-04-15 22:05:35 +02:00
Daniel Nicolai b3c78297fb Add describe evil ex-command functionality
For introspection purposes it can be nice to have this functionality. Also this
function can be used to discover which ex-commands are available.
2021-04-15 22:03:59 +02:00
Daniel Nicolai 8345568971 Fix scheme layer support for scheme implementations
The configuration for various scheme implementations has been split out of the
geiser package, breaking the current layer support for the implementations.

This commit adds a simple fix for the scheme implementations support.
Anybody is free to improve the code, but at least the layer will be fixed.
2021-04-15 21:54:36 +02:00
Simon Virenfeldt 693a0110ff Fix call to deleted method in latex layer
In commit f136f46 spacemacs//init-jump-handlers-MODE was removed,
which is used by the latex layer. Change to call to add-to-list instead.
2021-04-15 21:49:32 +02:00
Thanh Vuong d445857178 [gtags] improve
make bindings stick to minor modes of helm/counsel-gtags-mode not major mode. so
the bindings will only be in force when ggtags-mode is enabled.

deprecate functions spacemacs/counsel-gtags-define-keys-for-mode and
spacemacs/helm-gtags-define-keys-for-mode that add ggtags bindings to major
mode. Next step is to remove these function calls from client layers.
2021-04-15 21:44:46 +02:00
Lucius Hu 2713ec8789 Fix #14641 2021-04-15 21:42:17 +02:00
Elliott Shugerman 32da42863e [c-c++] Fix "Wrong number of arguments" on Emacs 28
In Emacs 28+, `define-obsolete-variable-alias` requires the WHEN arg.
2021-04-15 07:57:00 +02:00
JAremko 9da9e3ff01 Align badges 2021-04-14 14:57:48 +03:00
JAremko f8d62d91f8 Update CI badges 2021-04-14 14:30:19 +03:00
JAremko aae6c11957 fix rest of doc links 2021-04-14 14:30:19 +03:00
JAremko 278a27d5b0 Make TravisCI happy. 2021-04-14 13:59:44 +03:00
duianto 4262e01f11 [doc] Fix links 2021-04-13 11:38:33 +02:00
Eugene Yaremenko a862d1ac5f
[CI] remove stale label when issue updated 2021-04-13 05:55:07 +03:00
Maximilian Wolff 9cb5a3f67b [core] Remove some typos in doc of new jump handlers 2021-04-12 21:13:51 +00:00
Thanh Vuong f136f465ab core: revise core-jump
spacemacs|define-jump-handlers only defines a variable
`spacemacs-jump-handlers-MODE' to which handlers can be added and sets up key
bindings for mode. MODE must be a major mode,. It won't add function to mode
hook anymore.

`jump-to-definition` will walk through the three lists of handlers in the
following order: spacemacs-jump-handlers, spacemacs-jump-handlers-MODE, and
finally spacemacs-default-jump-handlers.

Dynamic handlers like lsp, tide, ggtags use spacemacs-jump-handlers to register
(add-to-list 'spacemacs-jump-handlers 'jump-hanlder)

Conventional static handlers should use spacemacs-jump-handlers-MODE
2021-04-12 21:02:23 +00:00
Maximilian Wolff 85d0aa2b18 [c-c++] Provide an alias for c++-enable-organize-includes-on-save 2021-04-12 21:00:09 +00:00
Evan Klitzke a4eadc97fe rename {,c-}c++-enable-organize-includes-on-save 2021-04-12 20:47:11 +00:00
Mihaly Barasz bebf5c4a07 Use the standard elpa gpg homedir
Closes #13738
2021-04-12 20:15:46 +00:00
Maximilian Wolff 66d774cd67
[java] Fix not existing function
I have overlooked this while I was merging
a related PR.
2021-04-10 09:47:25 +02:00
Ray 5bd1603b65 [Fix] dotspacemacs/test-dotfile complains error on new custom vars
After new custom `dotspacemacs-*` variables being introduced in
`core/core-dotspacemacs.el`, if one has an old `.spacemacs` without these
variables set, `SPC f e R` will complain error messages like
```
Variable: "dotspacemacs-emacs-dumper-dump-file" has value: "nil" that doesn't
match its type: "string"...
```
even if these variables have already had initial value.

This is because `dotspacemacs||let-init-test` macro only locally declares these
variables without setting them with their initial value.

This pull request fix this issue by expanding (dotspacemacs/get-variable-list)
into `'((var1 value1) (var2 value2) ...)` list instead of `(var1 var2 ...)`.
2021-04-10 09:43:44 +02:00
Maximilian Wolff e54affd5a7 [java] Add back support for emacs 25.1 2021-04-09 21:04:56 +00:00
Thanh Vuong d301a88df0 [java] only download meghanada package if needed
currently toggle `:if` for meghanada with `use-package` only tells `use-package`
not to load `meghanada` but spacemacs still downloads `meghanada`.

also we shouldn't care about emacs 25 anymore.
2021-04-09 21:03:41 +00:00
Maximilian Wolff 4139300488 [zig] Adjust backend variables to match new style 2021-04-09 20:59:05 +00:00
Maximilian Wolff be6f820256 Add missing GPLv3 headers to various files 2021-04-09 20:52:24 +00:00
Maximilian Wolff 8c937e9a71 [zig] Fix some smaller issues in the docs 2021-04-09 20:32:24 +00:00
Riccardo Binetti 6bafc72697 Enhance +lang/zig layer
Add support to LSP via zls (see also
https://github.com/emacs-lsp/lsp-mode/pull/2723)
2021-04-09 22:28:08 +02:00
Maximilian Wolff dc07cdbdc3 [windows-scripts] Add missing keybinding to docs
Automatic keybinding extraction is not yet
live.
2021-04-09 20:18:42 +00:00
Lucius Hu 96008496d6 windows-scripts: replaced dos.el with bat-mode, added bmx-mode
- Replaced `dos.el` with `bat-mode`
  - `dos.el` is superseded by `bat-mode`
  - `dos.el` is localised package
  - `bat-mode` is a built-in mode
- Added `bmx-mode`
  - `bmx-mode` provided syntax highlighting, code-navigation and refactoring
    capabilities on top of `bat-mode`
2021-04-09 20:08:55 +00:00