Skip to content

Rust language cannot use now! #129

@sasiyaluba

Description

@sasiyaluba

Description


I wanna to use multilspy to find type definition in rust code, like:

use crate::instructions::{Launching};

impl Process {
    pub fn launching(accounts: &mut Launching) -> Result<()> {
        let buy_result = accounts.pool.test(0,0,0)?;
        Ok(())
    }
}

I need the code of test function.Actually i use tree-sitter to parse this code and i got test start point is (17,39), but when i call the request_definition or any other function, i cannot got anything, always is [] or None.

My Code

project_root = (
    Path(__file__).parent.parent
    / "examples/programs/meme-launchpad"
).resolve()
logger = MultilspyLogger()
lsp = SyncLanguageServer.create(
    MultilspyConfig.from_dict({"code_language": "rust"}),
    logger,
    str(project_root),
)
rel_path = "src/test.rs"
with lsp.start_server():
    res = lsp.request_definition(rel_path, 17, 39)

    print(res)

Somebody can help me? Thank you very much!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions