mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add source root
This commit is contained in:
parent
e98d8cd255
commit
440dc41dd8
5 changed files with 167 additions and 132 deletions
|
@ -14,6 +14,7 @@ mod symbol_index;
|
|||
mod module_map;
|
||||
mod imp;
|
||||
mod job;
|
||||
mod roots;
|
||||
|
||||
use std::{
|
||||
sync::Arc,
|
||||
|
@ -146,10 +147,10 @@ pub struct Analysis {
|
|||
|
||||
impl Analysis {
|
||||
pub fn file_syntax(&self, file_id: FileId) -> File {
|
||||
self.imp.file_syntax(file_id)
|
||||
self.imp.file_syntax(file_id).clone()
|
||||
}
|
||||
pub fn file_line_index(&self, file_id: FileId) -> LineIndex {
|
||||
self.imp.file_line_index(file_id)
|
||||
self.imp.file_line_index(file_id).clone()
|
||||
}
|
||||
pub fn extend_selection(&self, file: &File, range: TextRange) -> TextRange {
|
||||
libeditor::extend_selection(file, range).unwrap_or(range)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue