* 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>
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)
- 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
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.
Fixes: vim layer key binding of "J" in dired mode #14614https://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.
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.
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.
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.
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.
- 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`
- Introduced a new command cargo-process-outdated
- Certain commands are known to change Cargo.toml and needs to reload workspace,
wrapper functions that automatically reload workspace are added.
- spacemacs/cargo-process-add
- spacemacs/cargo-process-rm
- spacemacs/cargo-process-outdated
- Added a layer variable for rust layer, cargo-process-reload-on-modify,
which toggle the aforementioned behaviour.
- Added a new utility function in LSP layer, which returns server ID associated
with current project.
- spacemacs//lsp-client-server-id
- Rearranged keybindings for rust layers (see table below for details)
Commands wrapped with auto-reload functionality:
|Command |Binding |
|-------------------------|-------------|
|`cargo-process-repeat` |`SPC m c .` |
|`cargo-process-add` |`SPC m c a` |
|`cargo-process-rm` |`SPC m c r` |
|`cargo-process-upgrade` |`SPC m c U` |
Commands with new bindings:
|Command |Old Binding |New Binding |
|-----------------------------------|------------|------------|
|`cargo-process-search` |`SPC m c s` |`SPC m c /` |
|`cargo-process-fmt` |`SPC m c f` |`SPC m c =` |
|`cargo-process-current-file-tests` |`SPC m c o` |`SPC m t b` |
|`cargo-process-current-test` |`SPC m c t` |`SPC m t t` |
|`cargo-process-test` |`SPC m t` |`SPC m t a` |
* Point org-journal to dalanicolai's fork (temporarily)
The Spacemacs for using org-journal are written, assuming that some PR's by
dalanicolai get merged. As the merge takes more time than expected, we
temporarily point Spacemacs to use his fork.
Additionally, a subsequent commit that adds agenda usage recommendations also
assumes these org-journal PR's got merged.
* Add to docs agenda usage recommendations
The Emacs documentation is not very clear about the best way to use org-agenda,
especially regarding integration of the diary into org. This commit adds most
sensible configuration recommendations.
- fix/improve docs for org-wild-notifier
- document how to use agenda (recommendations)
- Added `magit-todos` package, toggled by `git-enable-magit-todos-plugin`.
- Improved installation and loading of all magit-plugins:
- All magit plugins are toggled by their corresponding layer variables
PRE-INSTALLATION, instead of PRE-LOADING. That is, they are installed
only when the toggle is non nil.
- The `use-package` call is more specific now.
- Hooks goes to `:hook`.
- Removed `:defer` since it's implied by `:hook`, and it's actually not
doing anything.
- Improved the documentation.
* [Python layer] Document Nix + Microsoft LSP
* Document how to make Nix + Microsoft LSP work
* Add links to Microsoft LSP and Pyright repos
* Remove nix part
Added a new keyword to `use-package`, `:spacediminish` which calls
`spacemacs|diminish`.
Supported patterns:
- nil
- SYMBOL
- STRING
- (SYMBOL STRING)
- (STRING STRING)
- (SYMBOL STRING STRING)
- List of patterns above
When `SYMBOL` is missing, it's inferred from the package name, e.g
`(use-package foo :spacediminish nil)` becomes
`(use-package foo :spacediminish foo-mode)`.
This PR aims to replace explict calls to `spacemacs|diminish` and brings more
declarative flavour to layer configuration.
For example, the following form
```elisp
(use-package highlight-indentation
:config
(progn
(spacemacs|diminish highlight-indentation-mode " ⓗi" " hi")
(spacemacs|diminish
highlight-indentation-current-column-mode " ⓗc" " hc")))
```
can be replaced by
```elisp
(use-package highlight-indentation
:spacediminish ((" ⓗi" " hi")
(highlight-indentation-current-column-mode " ⓗc" " hc")))
```
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
- Replaccd `(cond ((eq foo) bar))` form with `(pcase (foo bar))`
- Replaced `(set (make-local-variable 'foo) bar)` with `(setq-local foo bar)`
- Replaced `(if foo bar nil)` with `(when foo bar)`
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaccd `(cond ((eq foo) bar))` form with `(pcase (foo bar))`
- Moved backend determination to `config.el`
- Refactored function
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Refactored function
- Replaccd `(cond ((eq foo) bar))` form with `(pcase (foo bar))`
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Refactored function
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
- Refactored function
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
- Replaced `(set (make-local-variable 'foo) bar)` with `(setq-local foo bar)`
- Replaccd `(cond ((eq foo) bar))` form with `(pcase (foo bar))`
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaced unnecessary backquote construct with simple quotation
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Moved function from `packages.el` to `func.el`
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Removed unnecessary `progn`
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Moved backend determination to `config.el`
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Replaced `(set (make-local-variable 'foo) bar)` with `(setq-local foo bar)`
- Removed unnecessary `progn`
- Refactored functions
- Several functions are inlined and removed from global namespace
- Moved function from `packages.el` to `func.el`
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Add `dumb-jump-xref-activate` hook to `xref-backend-functions`, which
add a fallback option, i.e. `dumb-jump`, when no better alternatives
is availabe
- Removed the obsolte interface `dumb-jump-go` from the following layers:
- clojure
- latex
- vue
- The global binding `SPC j q` requires the obsolte function
`dumb-jump-quick-look` and is therfore removed
Some parts of the README.org file for the lsp layer use Markdown syntax,
this commit fixes this. Some emphasis through equal signs are also
replaced by tildes for more coherence in the file.
Also the value of lsp-navigation is shown unquoted, this commit quotes
the possible values.
problem
The evil-collection is loaded in the spacemacs-evil layer.
The spacemacs-evil layer isn't enabled by default
on the spacemacs-base distribution.
solution
Add buff-menu to the list: spacemacs-evil-collection-allowed-list
after the evil-collection has loaded.
These try to modify the completions on a global basis.
This is causing a lot of issues with more intelligent
backends, which tend to do this in a more efficient
way already.
I have removed the global bindings for these now.
Layers should make `company-transformers` buffer local
and add specific versions of these when required.
This reverts commit 6e0f650101.
The reason for this is not that the dynamically build pylookup.py
is not found by emacs, this I have already solved locally by checking
the quelpa build directory.
However the issue is that the library is not compatible with python 3
the local version however is.
So this is effectively a fork and must be kept till python 3
compatibility for pylookup has been achieved.
Should fix#14544
When working long hours with Metals and saving and moving between buffers. This feature of automatically showing and writing in buffers breaks HELM, and buffer management stops, rendering Emacs useless. Furthermore, this feature is not that useful. In VIM LSP is off by default. The purpose of this is to make the experience of Scala Developers with Metals a nice one, rather than having Emacs breaking all the time, as has been happening to me. This has saved me hours.
PR-comments
Without this, fuel mode is reloaded needlessly on every Factor REPL restart.
Now we only do that if the Factor about to be invoked is a different one than
before.
Allows you to pick up new Cargo dependencies without a (slooow)
full server restart.
See https://github.com/emacs-lsp/lsp-mode/pull/2728
Add diagnostic messages when trying to reload RA workspace
No point restarting when trying to reload RLS