Commit graph

2298 commits

Author SHA1 Message Date
Maximilian Wolff 80e2fd4279 [python] Add instruction to install pyls-memestra
for detecting of deprecated apis
2021-05-14 17:37:17 +00:00
emacspace 5c214e5160
documentation formatting: Thu May 13 22:33:42 UTC 2021 (#14773) 2021-05-13 18:51:36 -04:00
Daniel Nicolai f8301056c9
Update python layer to use pylsp (new maintained fork of pyls) (#14772) 2021-05-13 18:30:32 -04:00
Maximilian Wolff 104ce94389 [json] Fix "void variable" in init-json-navigator
which was caused by lazy loading.
2021-05-12 05:13:29 +00:00
Aaron Zeng 76133f86f7
[csv] Make tsv-mode inherit csv-mode's leader key bindings (#14763) 2021-05-11 20:45:45 -04:00
Maximilian Wolff 346b7a8a12
[json] Fix functions optionally working on regions
so that they work if no region has even been
selected in the current emacs section.
2021-05-11 21:24:52 +02:00
Maximilian Wolff 060f558530 [json] Avoid changing default evil state for tabulated-list-modes
See #14645
2021-05-09 21:14:26 +00:00
Maximilian Wolff ad8acf6d51 [latex] Add missing binding for 'org-ref-insert-cite-key with lsp 2021-05-09 20:37:02 +00:00
Zach Pearson d2e9730acb
Update pyls install command to use quotes (#14741) 2021-05-05 13:28:52 -04:00
Richard Kim efbf4c5fb5 set initial evil state of ccls-tree-mode to be emacs
Emacs mode is clearly better than vim mode, because j and k keys are already
bound to down/up motion. In addition as the tree mode is traversed, the
matching code pops up on the left in emacs mode but not in vim mode.
2021-05-04 20:50:23 +02:00
Aaron Zeng e15dbdc036
[ocaml] Fix name of layer variable in defvar (#14736) 2021-05-04 00:34:51 -04:00
n-raymond 1136a61645 [ocaml] Fix variable name to make ocamlformat properly working on save 2021-05-03 22:11:32 +02:00
Carlos Ferney Clavijo Rendón d24249b759
[erlang] fix run-prog-mode-hooks function call (#14725) 2021-04-28 10:31:59 -04:00
Lucius Hu 117f4b73ab
squash! Removed legacy codes for emacs-version < 25.1 (#14497) 2021-04-28 01:17:17 -04:00
Lucius Hu bc27203615
Removed legacy codes for emacs-version < 25.1 (#14497) 2021-04-28 05:04:53 +00:00
Benj 6b135c5a69 [scheme] Fix geiser company backends 2021-04-26 22:06:13 -04:00
emacspace 3dbe66dda7
documentation formatting: Mon Apr 26 13:46:02 UTC 2021 (#14718) 2021-04-26 09:53:56 -04:00
Daniel Nicolai 557fc0efab
Scheme layer, add REPL keybindings (#14708) 2021-04-26 09:42:48 -04:00
Lucius Hu c8b914c8de erlang: Fix local vars
- Labelled `erlang-backend` as safe local variable.
- Added local variable hooks of erlang modes:
  - `spacemacs//erlang-setup-backend`
  - `spacemacs//erlang-setup-company`

See: https://github.com/syl20bnr/spacemacs/issues/14653
2021-04-22 13:03:38 -04:00
Lucius Hu 983ace0097 elixir: Fix file local vars
- Labelled `elixir-backend` as safe local variable.
- Added local variable hooks of elixir mode:
  - `spacemacs//elixir-setup-backend`

All other setup functions are already added to local variable hook.

See: https://github.com/syl20bnr/spacemacs/issues/14653
2021-04-22 12:54:03 -04:00
Lucius Hu 870b2c9e5d dart: Fix local vars
- Labelled `dart-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: https://github.com/syl20bnr/spacemacs/issues/14653
2021-04-22 12:53:11 -04:00
Aaron Zeng 433f6729e7
[ocaml] Fix typo (#14692) 2021-04-21 14:37:55 -04:00
Aaron Zeng 7e03196280
[ocaml] Fix for merlin package split (#14691) 2021-04-21 13:38:18 -04:00
ralph-cheng a6fc48dba4
bug fix - eslint not available for typescript-tsx-mode (#14685) 2021-04-21 11:04:51 -04:00
Daniel Nicolai 866c362d06 configure racket-describe-mode keybindings
Racket describe mode comes with its own keybinding (i.e. `q` for quit).
Additionally it contains links, so this PR binds `o` to `link-hint-open-link`
(`ace-link` does not support this mode)
2021-04-19 21:43:17 +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
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 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
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
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
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
duianto 4262e01f11 [doc] Fix links 2021-04-13 11:38:33 +02: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
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
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
Lucius Hu 49d1eaed50 rust and lsp: better integration of lsp-rust-analyzer-reload-workspace
- 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` |
2021-04-09 21:56:22 +02:00
emacspace 95a703b684 documentation formatting: Fri Apr 9 11:56:19 UTC 2021 2021-04-09 21:41:03 +02:00
Benjamin Sorenson d2b7399958 Fix bug in spacemacs//python-setup-backend () 2021-04-09 21:39:07 +02:00
Julien Debon e817e0faae
[Python layer] Add links to the LSP implementations (#14562)
* [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
2021-04-08 22:10:33 +02:00
Lucius Hu b0dc044885 fixup! purescript: refactor 2021-04-05 22:33:26 +02:00
Lucius Hu 5d39ffe98b fixup! fixup! perl5: refactor 2021-04-05 12:11:42 +02:00
Lucius Hu 145f469ec1 fixup! nim: refactor 2021-04-05 11:56:28 +02:00
Lucius Hu 79952251b4 fixup! lua: refactor 2021-04-05 11:47:53 +02:00
Lucius Hu a03585c4b5 fixup! latex: refactor 2021-04-05 11:36:54 +02:00
Lucius Hu 65f24d40d0 fixup! elm: refactor 2021-04-05 11:32:15 +02:00
German Lashevich 97a238f429 Fix packages missed in Melpa 2021-04-04 22:14:05 +02:00
Lucius Hu f7c2ce8fb6 fixup! python: refactor 2021-04-04 21:23:01 +02:00
Lucius Hu 5e641394f4 fixup! c-c++: refactor
This reverts commit e62d55b4fd.

This fixs https://github.com/syl20bnr/spacemacs/pull/14509#issuecomment-813023508
2021-04-04 19:21:46 +02:00
Lucius Hu 6e3ee5ae16 fixup! haskell: refactor 2021-04-04 19:00:40 +02:00
duianto e62d55b4fd Revert "c-c++: refactor"
This reverts commit dae0231fed.

c-c++-backend is void on startup:
https://github.com/syl20bnr/spacemacs/pull/14509#issuecomment-813023508
2021-04-04 14:43:51 +02:00
Lucius Hu 3b7650e8c3 fixup! perl5: refactor 2021-04-04 12:48:21 +02:00
Lucius Hu bec971d061 vimscript: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu b1f54b3371 typescript: refactor
- 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)`
2021-04-04 12:48:21 +02:00
Lucius Hu 9b36cf2d85 sql: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu 2c22a8a697 shell-scripts: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu fd3fd46224 scala: refactor
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu 8f47d285a6 rust: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 652de66ab2 ruby: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 26eb3df294 python: refactor
- 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))`
2021-04-04 12:48:21 +02:00
Lucius Hu 2fbe8cd3a3 purescript: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
- Refactored function
2021-04-04 12:48:21 +02:00
Lucius Hu ecf7a91619 php: refactor
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu 99aad0d957 perl5: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 2b2b068792 nim: refactor
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Refactored function
- Removed unnecessary `progn`
2021-04-04 12:48:21 +02:00
Lucius Hu e55bf5e495 lua: refactor
- 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))`
2021-04-04 12:48:21 +02:00
Lucius Hu cd0c914ba1 latex: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 4ff5027b80 kotlin: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu 40c72dc437 julia: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 64a349576b json: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu b395671066 javascript: refactor
- 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))`
2021-04-04 12:48:21 +02:00
Lucius Hu 701ec57df9 java: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 2eda5371d8 haskell: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu e8e99500d4 groovy: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 0ef957b529 go: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 925e3a8265 fsharp: refactor
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Moved function from `packages.el` to `func.el`
2021-04-04 12:48:21 +02:00
Lucius Hu a427fa10df ess: refactor
- Moved backend determination to `config.el`
2021-04-04 12:48:21 +02:00
Lucius Hu b265984d17 erlang: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu f126f3e093 elm: refactor
- Moved backend determination to `config.el`
- Refactored function
- Replaced unnecessary backquote construct with simple quotation
2021-04-04 12:48:21 +02:00
Lucius Hu 9b6ffd7c22 elixir: refactor
- 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`
2021-04-04 12:48:21 +02:00
Lucius Hu 43c4fa8772 dart: refactor
- Replaced unnecessary backquote construct with simple quotation
2021-04-04 12:48:21 +02:00
Lucius Hu bb3bb404a8 csharp: refactor
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu 1d7d9db490 crystal: refactor
- 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
2021-04-04 12:48:21 +02:00
Lucius Hu 03da968a98 squash! clojure: refactor
- Replaced `(when (not foo) bar)` with `(unless foo bar)`
2021-04-04 12:48:21 +02:00
Lucius Hu 4bf3501488 clojure: refactor
- Moved backend determination to `config.el`
- Replaced `pcase` form with only one-arm with `when` or `unless` form
2021-04-04 12:48:21 +02:00
Lucius Hu dae0231fed c-c++: refactor
- 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`
2021-04-04 12:48:21 +02:00