976: Replace Display by a pretty printing trait for Ty r=matklad a=flodiebold
This allows removing the names from Adt and FnDef (and more later), as a first
step towards aligning more with chalk's Ty :)
I may have gone a bit overboard with the definition of the PrettyPrint trait...
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
973: derive Hash for ra_hir::ModuleDef r=matklad a=pcpthm
I wanted to use `HashSet` but it seems like `Hash` derive is missing for no reason.
Co-authored-by: pcpthm <pcpthm@gmail.com>
971: Point to compiler-team repo in the readme r=matklad a=detrumi
The readme still links to the old repo, which redirects to the new one
Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
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>