Add source root

This commit is contained in:
Aleksey Kladov 2018-09-02 20:08:58 +03:00
parent e98d8cd255
commit 440dc41dd8
5 changed files with 167 additions and 132 deletions

View file

@ -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)