mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
[ty] Invert ty_ide
and ty_project
dependency (#19501)
This commit is contained in:
parent
53d795da67
commit
c281891b5c
9 changed files with 27 additions and 143 deletions
|
@ -5,14 +5,15 @@ use lsp_types::Location;
|
|||
use ruff_db::files::FileRange;
|
||||
use ruff_db::source::{line_index, source_text};
|
||||
use ruff_text_size::Ranged;
|
||||
use ty_ide::{Db, NavigationTarget};
|
||||
use ty_ide::NavigationTarget;
|
||||
use ty_project::Db;
|
||||
|
||||
pub(crate) trait ToLink {
|
||||
fn to_location(&self, db: &dyn ty_ide::Db, encoding: PositionEncoding) -> Option<Location>;
|
||||
fn to_location(&self, db: &dyn Db, encoding: PositionEncoding) -> Option<Location>;
|
||||
|
||||
fn to_link(
|
||||
&self,
|
||||
db: &dyn ty_ide::Db,
|
||||
db: &dyn Db,
|
||||
src: Option<FileRange>,
|
||||
encoding: PositionEncoding,
|
||||
) -> Option<lsp_types::LocationLink>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue