aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix handling of consuming self, refactor shared logic into a single functionPaul Daniel Faria2020-09-061-29/+33
|
* Add consuming modifier to lvalues that are passed by value and not CopyPaul Daniel Faria2020-09-061-2/+39
|
* Merge #5823bors[bot]2020-08-221-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5823: Don't underline function definition if self is &mut r=Nashenas88 a=matklad The self is right there, and is already underlined, so it makes little sense to emit even more underlines. before: ![before](https://user-images.githubusercontent.com/1711539/90672843-0d379500-e257-11ea-840f-b0caed4410f1.png) after: ![after](https://user-images.githubusercontent.com/1711539/90672840-0c9efe80-e257-11ea-9739-23af433841c6.png) Co-authored-by: Aleksey Kladov <[email protected]>
| * Don't underline function definition if self is &mutAleksey Kladov2020-08-191-6/+0
| | | | | | | | | | The self is right there, and is already underlined, so it makes little sense to emit even more underlines.
* | :arrow_up: ungrammarAleksey Kladov2020-08-211-1/+2
|/
* Remove dead codeAleksey Kladov2020-08-191-25/+15
|
* Apply couple of rule of thumbs to simplify highlighting codeAleksey Kladov2020-08-191-19/+16
| | | | | | | | | | | | | | | | | Main one: instead of adding a parameter to function to handle special case, make the caller handle it. Second main one: make sure that function does a reasonable thing. `highlight_def` picks a color for def, *regardless* of the context the def is use. Feeding an info from the call-site muddies the responsibilities here. Minor smells, flagging the function as having space for improvement in the first place: * many parameters, some of which are set as constants on most call-sites (introduce severalfunction instad) * boolean param (add two functions instead)
* Inline trivial functionAleksey Kladov2020-08-191-8/+6
|
* SimplifyAleksey Kladov2020-08-191-9/+4
|
* MinorAleksey Kladov2020-08-191-2/+1
|
* Minor cleanupsAleksey Kladov2020-08-191-1/+1
|
* Better nameAleksey Kladov2020-08-191-4/+4
|
* Better API factoring around self access modesAleksey Kladov2020-08-191-10/+16
|
* Add SelfParam to code_modelAleksey Kladov2020-08-191-12/+8
|
* Add new method to Semantics, method_receiver_kind, which returns the kind of ↵Paul Daniel Faria2020-08-161-65/+74
| | | | | | | self The options are Shared, Mutable, Consuming, and Copied. Use this to add proper highlighting to methods based on usage.
* Mark mutating functions with `mutable` modifier, and owning functions with ↵Paul Daniel Faria2020-08-161-10/+32
| | | | `consuming`.
* Rename ra_ide -> ideAleksey Kladov2020-08-131-0/+872