Addresses two issues:
- keep the parens from dbg!() in case the call is chained or there is
semantic difference if parens are excluded
- Exclude the semicolon after the dbg!(); by checking if it was
accidentally included in the macro_call
investigated, but decided against:
fix ast::MacroCall extraction to never include semicolons at the end -
this logic lives in rowan.
Defensively shorten the macro_range if there is a semicolon token.
Deleted unneccessary temp variable macro_args
Renamed macro_content to "paste_instead_of_dbg", because it isn't a
simple extraction of text inside dbg!() anymore
5528: README: Add some instructions for running typescript tests and linter. r=matklad a=davidlattimore
Co-authored-by: David Lattimore <dml@google.com>
5541: add completion for rustc lints r=matklad a=Emilgardis
This is a very naive approach to provide completions for lints.
Preferably, this would pull from current `rustup which rustc` via `rustc -W help <crate>`, but currently `rustc` only provides human output for lints.
![image](https://user-images.githubusercontent.com/1502855/88492913-90dec880-cfae-11ea-89d8-2b494951b20c.png)
also, clippy would be really nice but I feel like for that ra should really pull from clippy
Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
It seems that Semantics::scope, if given a statement node, won't resolve
locals that were defined in the current scope, only in parent scopes.
Not sure if this is intended / expected behavior, but we work around it
for now by finding another nearby node to use as the scope (e.g. the
expression inside the EXPR_STMT).
5520: Add DocumentData to represent in-memory document with LSP info r=matklad a=kjeremy
At the moment this only holds document version information but in the near-future it will hold other things like semantic token delta info.
Co-authored-by: kjeremy <kjeremy@gmail.com>
5522: Increace tracing-tree version from 0.1.3 to 0.1.4 r=kjeremy a=vandenheuvel
Co-authored-by: Bram van den Heuvel <b.vandenheuvel@student.tudelft.nl>
5516: Better LSP conformance r=matklad a=vsrs
At the moment rust-analyzer does not fully conform to the LSP. This PR fixes two LSP related issues:
1) rust-analyzer sends predefined server capabilities and does not take supplied client capabilities in mind.
2) rust-analyzer uses dynamic `textDocument/didSave` registration even if the client does not support it.
Co-authored-by: vsrs <vit@conrlab.com>