mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
somewhat better name
This commit is contained in:
parent
1ec1bd8139
commit
171f6e6d00
2 changed files with 2 additions and 2 deletions
|
@ -299,7 +299,7 @@ impl Analysis {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the syntax tree of the file.
|
/// Gets the syntax tree of the file.
|
||||||
pub fn file_syntax(&self, file_id: FileId) -> TreeArc<SourceFile> {
|
pub fn parse(&self, file_id: FileId) -> TreeArc<SourceFile> {
|
||||||
self.db.source_file(file_id).clone()
|
self.db.source_file(file_id).clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ pub fn handle_completion(
|
||||||
let mut res = false;
|
let mut res = false;
|
||||||
if let Some(ctx) = params.context {
|
if let Some(ctx) = params.context {
|
||||||
if ctx.trigger_character.unwrap_or_default() == ":" {
|
if ctx.trigger_character.unwrap_or_default() == ":" {
|
||||||
let source_file = world.analysis().file_syntax(position.file_id);
|
let source_file = world.analysis().parse(position.file_id);
|
||||||
let syntax = source_file.syntax();
|
let syntax = source_file.syntax();
|
||||||
let text = syntax.text();
|
let text = syntax.text();
|
||||||
if let Some(next_char) = text.char_at(position.offset) {
|
if let Some(next_char) = text.char_at(position.offset) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue