use ra_ide_api::{
Analysis, AnalysisChange, AnalysisHost, CrateGraph, FileId, LibraryData, SourceRootId,
};
-use ra_vfs::{RootEntry, Vfs, VfsChange, VfsFile, VfsRoot};
+use ra_vfs::{LineEndings, RootEntry, Vfs, VfsChange, VfsFile, VfsRoot};
use ra_vfs_glob::{Glob, RustPackageFilterBuilder};
use relative_path::RelativePathBuf;
Ok(url)
}
+ pub fn file_line_endings(&self, id: FileId) -> LineEndings {
+ self.vfs.read().file_line_endings(VfsFile(id.0))
+ }
+
pub fn path_to_uri(&self, root: SourceRootId, path: &RelativePathBuf) -> Result<Url> {
let base = self.vfs.read().root2path(VfsRoot(root.0));
let path = path.to_path(base);