Commit Graph

61 Commits

Author SHA1 Message Date
Aleksey Kladov f34762abb7 internal: better factoring for to_proto::completion
One source completion can produce up to two lsp completions.
Additionally, `preselct` and `sort_text` are global properties of the
whole set of completions, so the right granularity here is to convert
many completions.

As a side-benefit, we no loger allocate intermediate vec.
2021-07-04 14:08:33 +03:00
Jonas Schievink 5f13fb9db9 Add "View Crate Graph (Full)" 2021-07-02 00:10:33 +02:00
Aleksey Kladov cabb679cbb internal: explain the motivation behind early configuration 2021-05-27 11:16:14 +03:00
Jonas Schievink 3360053312 Update lsp-extensions.md 2021-05-22 00:03:36 +02:00
Aleksey Kladov 1fd31f7f4c feat: allow clients to feature detect symbol filtering 2021-05-19 13:28:58 +03:00
alcroito 1f7d2a6c22 Add new LSP extension for workspace symbol lookup
The new extension allows filtering of workspace symbool lookup
results by search scope or search kind.

Filtering can be configured in 3 different ways:

 - The '#' or '*' markers can be added inline with the symbol lookup
   query.

   The '#' marker means symbols should be looked up in the current
   workspace and any dependencies. If not specified, only current
   workspace is considered.

   The '*' marker means all kinds of symbols should be looked up
   (types, functions, etc). If not specified, only type symbols are
   returned.

 - Each LSP request can take an optional search_scope or search_kind
   argument query parameter.

 - Finally there are 2 global config options that can be set for all
   requests served by the active RA instance.

Add support for setting the global config options to the VSCode
extension.
The extension does not use the per-request way, but it's useful for
other IDEs.

The latest version of VSCode filters out the inline markers, so
currently the only reasonable way to use the new functionality is
via the global config.
2021-05-18 00:40:30 +02:00
Jonas Schievink b8d40a02a9 Document viewCrateGraph request 2021-05-11 16:45:51 +02:00
Aleksey Kladov dcb759b727 Remove confusion around serverStatusNotification 2021-04-19 18:12:25 +03:00
Aleksey Kladov e5d91e8992 Fix spec bug 2021-04-19 17:55:51 +03:00
Lukas Wirth b501b59eda Update lsp-extensions docs 2021-04-18 12:50:44 +02:00
Jonas Schievink 30aae2cefb Move cursor position when using item movers 2021-04-14 00:03:04 +02:00
Kirill Bulatov b5f3815aee Small grammar fixes 2021-04-06 21:42:27 +03:00
Aleksey Kladov 8fe20b19d4 More robust status notifications 2021-04-06 15:45:31 +03:00
sim d542a2b463 docs: Fix moveItem method name 2021-04-04 11:49:32 -07:00
ivan770 7d60458495 Item up and down movers 2021-03-18 11:22:27 +02:00
bors[bot] 7accf6bc37 Merge #7799
7799: Related tests r=matklad a=vsrs

![tests](https://user-images.githubusercontent.com/62505555/109397453-a9013680-7947-11eb-8b11-ac03079f7645.gif)
This adds an ability to look for tests for the item under the cursor: function, constant, data type, etc

The LSP part is bound to change. But the feature itself already works and I'm looking for a feedback :)



Co-authored-by: vsrs <vit@conrlab.com>
2021-03-13 13:50:35 +00:00
vsrs 49cdb2452a Fix LSP extensions documentation 2021-03-11 17:59:27 +03:00
Aleksey Kladov 5b2b310827 Clarify that all caps are experimental 2021-03-09 12:02:20 +03:00
vsrs 5e88436517 Update lsp-extensions.md 2021-02-27 21:07:58 +03:00
Aleksey Kladov 3f09e3fba6 document offsets 2021-02-16 19:22:09 +03:00
ivan770 13e9d9809a Remove CodeLensResolveData mention from lsp-extensions.md 2021-02-13 19:36:29 +02:00
ivan770 185da286d2 Moved CodeLens to ide crate 2021-02-13 13:07:47 +02:00
Peter Wischer f18fc5a0ae fix nightly warning legacy_derive_helpers
see https://github.com/rust-lang/rust/issues/79202
2021-02-12 13:57:38 +01:00
Lukas Wirth f82ce500a9 Fix spelling mistakes in docs/dev 2021-02-03 13:46:51 +01:00
Edwin Cheng d069ef60b6 Update lsp-extension.md hash 2021-01-29 01:32:31 +08:00
Edwin Cheng edcafe7865 Update doc 2021-01-29 01:04:14 +08:00
Phil Ellison db53db8046 Address review suggestion, fix tidy tests 2021-01-01 19:25:18 +00:00
kjeremy 233fdb12ce Latest LSP 3.16 protocol
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Anatol Liu b1b7727e04 add open Cargo.toml action 2020-11-12 17:48:07 -08:00
Aleksey Kladov 7d2eb000b0 Switch to upstream protocol for resolving code action
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
2020-11-10 18:48:46 +01:00
Igor Aleksanov d718366567 Document change of 'cargo' Runnable kind in lsp-extensions.md 2020-10-16 20:58:57 +03:00
Aleksey Kladov d852189e56 Add reminder to update lsp-extensions.md 2020-10-14 13:30:06 +02:00
Zac Pullar-Strecker f1decfc110 Fix send->sent typo 2020-10-08 15:04:57 +13:00
Zac Pullar-Strecker 62b76e7004 Document the protocol extension 2020-10-08 15:04:20 +13:00
Aleksey Kladov af8063fe37 Extend **Status** command to also show dep info for the file
This should help with troubleshooting wrong project configuration
2020-09-29 22:13:23 +02:00
vsrs 1eed036a6e Fix StatusNotification 2020-08-17 14:56:27 +03:00
David Lattimore 3975952601 SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
Jeremy Kolb 9c0ead30b9 Clarify initializationOptions 2020-07-22 10:05:36 -04:00
Aleksey Kladov 3ef7676076 Implement StatusBar 2020-07-02 15:32:14 +02:00
Aleksey Kladov c9f878962a Add reload workspace command 2020-07-01 14:57:59 +02:00
vsrs da7ec4b339 Add hover actions LSP extension documentation. 2020-06-05 15:00:28 +03:00
Mikhail Rakhmanov 1f7de306f5 Add documentation 2020-06-03 18:57:50 +02:00
Aleksey Kladov a83ab820a4 Spec better runnables 2020-06-02 17:34:18 +02:00
bors[bot] 131ccd9540 Merge #4580
4580: Fix invoking cargo without consulting CARGO env var or standard installation paths r=matklad a=Veetaha

Followup for #4329

The pr essentially fixes [this bug](https://youtu.be/EzQ7YIIo1rY?t=2189)

cc @lefticus

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-06-02 11:58:28 +00:00
Aleksey Kladov 6370de444d Subscribe to protocol changes 2020-06-01 17:51:15 +02:00
Aleksey Kladov aaa288126b Document initilizationOptions used by rust-analyzer 2020-06-01 17:42:46 +02:00
veetaha d605ec9c32 Change Runnable.bin -> Runnable.kind
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
2020-05-31 05:21:45 +03:00
Stephan Seitz 49f674480a Fix typo in docs/dev/lsp-extensions.md: automagiacally -> automagically 2020-05-29 23:43:14 +02:00
Veetaha bfdcf73b9b typo 2020-05-27 14:04:57 +03:00
Aleksey Kladov bb415c1818 Document inlay hints and runnables
We want to change those, but let's document what we have in meantime
2020-05-27 12:20:47 +02:00