Commit Graph

96 Commits

Author SHA1 Message Date
Lin Sun 7ec7d843e0 layers/*: remove quote inside the cl-case clauses 2022-10-19 22:19:25 +02:00
Irsyad Asyhari Lubis fe01603df9
feat: add consult-imenu for Java LSP (#15758) 2022-10-05 18:21:01 +00:00
Thanh Vuong f3c73178ba [lsp] update consult-lsp init 2022-07-01 16:02:23 +02:00
Arif Er 00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
Maxi Wolff 587f584ebc
[lsp] Change default source of bindings back to spacemacs
as many bindings are not properly set from
the lsp package and the default setting should
just work out of the box.

See #15442 for details.
2022-04-02 22:04:17 +02:00
Thanh Vuong 1d45278a71 [lsp] add consult-lsp and set lsp-use-upstream-bindings to t
lsp-use-upstream-bindings is t so by default spacemacs will use lsp-mode binding
scheme. We should consider to phase our the current manual binding scheme for
lsp-mode in future
2022-01-01 15:57:32 +01:00
SpacemacsBot f06fb38a8f [bot] "documentation_updates" Thu Nov 18 05:35:20 UTC 2021 2021-11-18 22:00:53 +01:00
Wieland Hoffmann f61a7cd453
Add a keybinding for lsp-treemacs-type-hierarchy (#15163)
* lsp: Bind =~SPC m g T~ to lsp-treemacs-type-hierarchy
This allows to show the type hierarchy for the type at point.

* lsp: Goto call and type hierarchy are provided by lsp-treemacs
2021-11-18 06:33:38 +01:00
Maxi Wolff 42868141da
[lsp] Fix void variable error during startup 2021-09-10 22:23:09 +02:00
Maxi Wolff e67caf8486
[lsp] Revise lsp layer's create temp files in cache folder feature
to avoid having to add a lot of additional ignore
statements to our .gitignore file.

For now this shall reside in LSP layer if it becomes too big
we can do a more refined design based on the auto-complete
layer.
2021-09-10 22:13:14 +02:00
Ray acea332435
Move known temporary files of LSP into `spacemacs-cache-directory`.
By enabling all layers referring to lsp and searching packages they depend
on, currently I found these variables:
`lsp-server-install-dir`
`lsp-session-file`
`lsp-eslint-library-choices-file`
`lsp-yaml-schema-store-local-db`
`lsp-vetur-global-snippets-dir`
2021-09-10 22:13:13 +02:00
Michael Peyton Jones 797360a419
lsp: add call hierarchy binding (#15021) 2021-08-31 21:02:05 +00:00
Dmitry Polienko 9bb3115bce
Remove obsolete paragraph from the LSP layer documentation (#14989) 2021-08-14 19:21:30 +00:00
Thanh Vuong bc6163216c
[lsp] add keybindings for lsp-ivy/helm-lsp when use upstream bindings 2021-05-27 22:14:14 +02:00
emacspace c69458150f documentation formatting: Mon May 3 22:15:02 UTC 2021 2021-05-04 00:24:54 +02:00
Maximilian Wolff fdda1bd281
[lsp] Fix missing [ in documentation 2021-05-04 00:10:13 +02:00
Maximilian Wolff 99231d3a70
[lsp] Fix some smaller issues in documentation 2021-05-03 23:05:44 +02:00
Thanh Vuong 27f1519a5a
[lsp] add option to bind commands to lsp-command-map
`lsp-use-upstream-bindings` set to `t` then Spacemacs will bind all
`lsp-command-map` behind `SPC m`, `,` and `M-m`. This way the bidings will be
managed by upstream `lsp-mode` which is documented at
https://emacs-lsp.github.io/lsp-mode/page/keybindings/.

Spacemacs only replaces the prefix `s-l` with `SPC m`. For example:

| lsp binding | Spacemacs binding                   |
|-------------+-------------------------------------|
| `s-l w s`   | `SPC m w s` or `, w s` or `M-m w s` |
2021-05-03 22:53:11 +02: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
Lucien Cartier-Tilet 1076d5ad61 [lsp] Fix org markup
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.
2021-03-31 18:36:13 +02:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Ivan Yonchovski 32ead25c35 [lsp] Bind `SPC p E` to `helm-lsp-diagnostics`
IMHO this should be global binding, the alternative was `SPC e e` because it can
be used everywhere, e. g. from compilation buffer to find the error causing the
build breakage.
2021-03-14 00:42:56 +01:00
Maximilian Wolff b3992c61ef
[lsp] Bind lsp specific toggles from `SPC m T` to `SPC m T l`
Many lisp related modes create confliciting bindings in
`SPC m T`. To avoid these clashes I have moved the LSP
specific toggles to a different prefix now.

As this just affects toggles I hope that the negative
impact on muscel memory will be minimal.
2021-02-23 20:40:42 +01:00
Maximilian Wolff aa1051e1c8
Move lsp-ui back to be enabled by default
I don't think that setting this to a fixed value
will solve the issue. Right now we have a conflict
between feature rich and simple here.

This is similar to what we have with the search
integration (helm vs ivy) and in the tree
implementation (treemacs vs neotree).

For these we have a workflow during the initial
dotfile creation. Which we need to follow here
too.
2021-02-21 22:06:27 +01:00
winsphinx 9ecce8231a fix variable name in lsp doc 2021-02-21 17:53:53 +01:00
Ivan Yonchovski df09240229 [lsp] Do not include lsp-ui by default
- lsp-ui is very opinionated so better to have it enabled/installed on demand
2021-02-20 22:01:23 +01:00
Ray Wang f01ca9a09b Document: prompt to run `all-the-icons-install-fonts`
If both `all-the-icons` and `lsp-headerline` are enabled
2021-02-03 22:32:56 +01:00
Evan Klitzke c4ad14a73a fix some errors in the lsp readme 2020-12-26 14:59:29 +01:00
thanhvg e3b6464649
[core][tide][lsp] improve spacemacs/set-leader-keys-for-minor-mode and apply it to tide and lsp layers (#14141)
* [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
2020-11-21 07:34:55 +01:00
Maximilian Wolff 24d8d329eb
[LSP] Add documentation for missing functional area "action" 2020-11-09 23:18:57 +01:00
nanashi0x74 c8b717c9be [lsp] Add keybinding for lsp-version command 2020-10-19 11:45:53 +02:00
emacspace 598ac10337 documentation formatting: Thu Oct 15 21:23:44 UTC 2020 2020-10-15 23:33:25 +02:00
Lucius Hu edc2528590
Improved documentation for LSP layer
- 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 '='.
2020-10-15 22:20:27 +02:00
Robert O'Connor 82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
Maximilian Wolff d8260ea041
[lsp] Fix lsp-origami integration
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.
2020-09-17 23:54:22 +02:00
Elric Milon 4c6c6c2e96 [lsp] Add support for lsp-origami 2020-09-16 21:54:00 +02:00
Colin Woodbury 61a9aeb42c [lsp] Remove mention of `lsp-clients` - fixes #13857 2020-08-19 20:04:39 +02:00
Maximilian Wolff b82bc40b3c
Fix ignored popwin declarations
Popwin automatically configures pupo purposes
if properly configured. While I was checking
the existing configs I have found that the
settings will be ignored if the config is not
done via a post-config hook.

A quick search revealed a lot of popwin configs
which never had any effect.

This commit fixes these and with this also
restores the missing pupo configs.
2020-07-03 21:51:33 +02:00
Steve Lorimer 70232d9f58 [lsp] remove requirement for yasnippet 2020-07-01 20:42:51 +02:00
Maximilian Wolff d314cc7eef
Make auto-complete more configurable and efficient for lsp
To optimise performance of lsp mode in emacs 27 and above
I have introduced a new dotfile variable to define the size
of data read from external processes. The default I have
set to the recommended setting from lsp-mode.

In addition I have introduced a new layer variable for
auto-complete-layer to define the minimum prefix length.

I have also added instructions to auto-complete's readme
how to set these variables to the recommended settings
for lsp-mode.

Changes inspired from #13507
2020-05-15 22:22:28 +02:00
Ivan Yonchovski 6fbcef0648 [lsp] Use lsp-ivy when ivy layer is present 2020-04-16 21:53:31 +02:00
Ivan Yonchovski c3f13d0391 Removed company-lsp in favour of company-capf
- Also removed some cquery artifacts which accidentally ended up in this PR
instead of in https://github.com/syl20bnr/spacemacs/pull/13446
2020-04-04 08:24:44 +02:00
duianto dd8e611158
Replace obsolete lsp-prefer-flymake with lsp-diagnostic-package 2020-02-21 23:19:20 +01:00
Steven Allen 2088eb67a9
[lsp] set jump handler per lsp-managed buffer
Previously, this would try to add the lsp jump handler to the mode's jump
handler list every time lsp started managing a buffer of that mode. Now, we only
use the lsp jump handler for buffers managed by lsp.
2020-02-08 09:08:37 +00:00
duianto 53c1059582 [lsp] Change ecase to cl-ecase 2019-12-23 16:38:07 +01:00
Magnus Therning 3240c24873
Use "mgb" for jumping back
[elisp] use "mgb" for jumping back
[lsp] use "mgb"/"mGb" to jump back
[haskell] use "mgb" for jumping back
2019-11-23 21:52:13 +01:00
Sylvain Benner 6ddcf6f0a6 [c-c++] Fix typos and improve wording
Co-Authored-By: duianto <otnaiud@gmail.com>
2019-11-09 09:41:12 -05:00
syl20bnr d536b36d15 [c-c++] C/C++ layer refactor to support multiple backends 2019-11-09 09:40:56 -05:00
Ivan Yonchovski 06cf8e3842 lsp layer must depend on yasnippet
- if this line is missing yasnippets might not be loaded because lsp-mode might
load the snippets before the auto-completion layer kick in.
2019-11-02 13:39:48 +01:00