959: Retrieve current working directory from workspace r=matklad a=LDSpits
This PR improves the way the language client retrieves the current working directory by using the VSCode workspace API to get the path to the currently open directory.
If we find more than one directory we show a warning that "multi root workspaces are not supported yet" and pick the root path.
Any feedback is appreciated 😄fixes#945
Co-authored-by: Lucas Spits <spits.lucas@gmail.com>
957: Fix and simplify "rustc-watch" problem matcher r=vemoo a=vemoo
Cargo watch now always ends with "[Finished running ..." and includes some extra info. Make the pattern only match "[Finished running".
Also add "cargo watch" and "cargo watch tests" that use the "rustc-watch" problem matcher.
Change the "Build Lsp" to do "cargo check" because that's faster, and I think enought in this case, and make it use "rustc" problem matcher from the extension.
Co-authored-by: Bernardo <berublan@gmail.com>
953: Don't default publishDecorations and showWorkspaceLoaded to true on the server r=matklad a=flodiebold
If the client doesn't specify these explicitly, that very likely means it
doesn't know about them and so we shouldn't send them. In particular, the recent
change to this default caused decorations to be sent to emacs, resulting in a
lot of warning spam.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
If the client doesn't specify this explicitly, that very likely means it doesn't
know about it and so we shouldn't send decorations. In particular, the recent
change to this default caused decorations to be sent to emacs, resulting in a
lot of warning spam.
955: Remove superfluous semicolons r=kjeremy a=kjeremy
Doesn't change the result of the test but it does prevent the
syntax tree from rendering.
Co-authored-by: kjeremy <kjeremy@gmail.com>
951: Fix EnumVariants not showing properly when hovering r=matklad a=vipentti
This fixes#950
This also fixes hovering over the name of an EnumVariant.
Additionally this changes the way enum variants are shown, now instead of the `Some<T>... -> Option` you just get `Some`. I'm not sure what would be the optimal display for enum variants in this case.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
948: Fix test_missing_module_code_action_in_json_project on Windows r=matklad a=vipentti
The test would fail on Windows due to the paths not being properly escaped for
JSON.
In addition adds extra braces around the fn main to actually introduce braces in
the file.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
The test would fail on Windows due to the paths not being properly escaped for
JSON.
In addition adds extra braces around the fn main to actually introduce braces in
the file.
949: Specify derive feature for serde r=matklad a=pcpthm
`ra_project_model` build will fail when no dependencies are using this feature. Reproduced by creating a crate depending on `ra_batch`.
Co-authored-by: pcpthm <pcpthm@gmail.com>
944: Add support for goto definition and hover on Self r=matklad a=vipentti
This fixes#943
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
939: Initial implementation of project-lock.json. r=davidtwco a=davidtwco
Fixes#792.
This PR adds a initial implementation of project-lock.json, a build
system agnostic method of specifying the crate graph and roots.
Co-authored-by: David Wood <david@davidtw.co>
933: Check installed extension r=matklad a=c410-f3r
Fixes#918.
Edit: Windows encoding for Unicode is UTF-16 so String::from_utf8 will probably fail unless `Vec<u8>` is already UTF-8 somehow, which I don't know for sure.
Co-authored-by: Caio <c410.f3r@gmail.com>
940: Show workspace loaded notification r=matklad a=vipentti
This fixes#935
This adds support for more `InitializationOptions` which are provided by the client.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
This allows users to control whether or not they want to see the "workspace
loaded" notification.
This is done on the server side using InitializationOptions which are provided
by the client. By default show_workspace_loaded is true, meaning the
notification is sent.