rust-analyzer/crates/ide
Aleksey Kladov b56e020077 Apply couple of rule of thumbs to simplify highlighting code
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)
2020-08-19 17:53:41 +02:00
..
src Apply couple of rule of thumbs to simplify highlighting code 2020-08-19 17:53:41 +02:00
test_data Add new method to Semantics, method_receiver_kind, which returns the kind of self 2020-08-16 10:26:16 -04:00
Cargo.toml Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00