6523: Be more pedantic when checking codeAction/resolve support r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
6521: Switch to upstream protocol for resolving code action r=matklad a=matklad
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
6472: Add `static` modifier for associated functions r=matklad a=p3achyjr
Adds static semantic token modifier to associated functions, resolves#6194
## Info
- Associated functions are more-or-less equivalent to static methods in other languages. This PR checks, for each function, whether that function has a self_param, and whether it's enclosed in a trait/impl.
## Changes
- Added method ```is_associated``` to code_model::Function. This basically gets the source from the ast, and checks whether the enclosing scope is an impl or trait.
- Added `static` to HighlightModifiers
- Added unit test
## Tests
- Ran ```cargo test```
Co-authored-by: Anatol Liu <axlui@anatols-mbp.lan>
6501: Remove text_edit_builder api from AssistBuilder r=matklad a=Veykril
Also fixes a small bug in `expand_glob_import` in regards to the very nice looking `something::{*}` import when only one item was used. Before it would duplicate the path and just append it, causing the following wrong import `something::something::UsedItem`.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
6500: Add some postfix snippet r=matklad a=pksunkara
Nothing much to explain. Just a simple addition. I was recently doing some refactoring and this would have made it a bit more faster.
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
6491: Textmate grammar: allow variables to terminate ranges r=dustypomerleau a=dustypomerleau
Variables were originally designed not to match after a dot, in order to avoid matching struct field access, however this resulted in variables that end ranges not being highlighted. In order to fix this we match a preceding dot, only if it's preceded by at least one other dot. Attempting to match on `(\.{2,})?` won't work, because the optional group allows struct field access to match even when one dot is present.
Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>