Git Product home page Git Product logo

Comments (10)

sigmaSd avatar sigmaSd commented on August 12, 2024

The completion only work when you press Tab, maybe you're expecting it to show up automatically ? (not currently implemented)

If that's not the case, Just to double check you should have enable_rust_analyzer = true and then you can test with something like std::process::Com<TAB>

Then I guess the second thing to check is does a rust-analyze process gets created when you run irust ? you can check after starting it , in top or similar utility.

If that's the case , I guess the next step to add some dbg! here https://github.com/sigmaSd/IRust/blob/master/crates/irust/src/irust/ra/rust_analyzer.rs

from irust.

feribg avatar feribg commented on August 12, 2024

Tried tab and shift and tab but nothing, not just for use statements nothing gets autocomplete at all.

2023-12-07_16-40

from irust.

sigmaSd avatar sigmaSd commented on August 12, 2024

That's weird, rust analyzer seem to have spawned so it's an issue in the cominucation for some reason

Can you dbg! completion_request line, character here https://github.com/sigmaSd/IRust/blob/master/crates/irust/src/irust/ra/rust_analyzer.rs#L157 after you press tab (while having some input to complete)

If you're a flatpak user , can you try the flatpak just for testing (link in the readme)

from irust.

sigmaSd avatar sigmaSd commented on August 12, 2024

Also you should comment this line out to see if the lsp server is complaining https://github.com/sigmaSd/IRust/blob/master/crates/irust/src/irust/ra/rust_analyzer.rs#L28

from irust.

vsndev3 avatar vsndev3 commented on August 12, 2024

Also you should comment this line out to see if the lsp server is complaining https://github.com/sigmaSd/IRust/blob/master/crates/irust/src/irust/ra/rust_analyzer.rs#L28

By this, i could saw the rust-analyzer was not installed and after installing it, completion works.

However unlike evcxr, only the functions are autocompleted and the variables are not auto completed. I see there is an option in rust-analyzer called "rust-analyzer.completion.privateEditable.enable", so I tried setting that in rust_analyzer.rs but still getting filled only with the functions, if it possible to fill the variables on tab?

image

from irust.

sigmaSd avatar sigmaSd commented on August 12, 2024

@vsndev3 I pushed a commit that add that feature f74f7a8

from irust.

vsndev3 avatar vsndev3 commented on August 12, 2024

@vsndev3 I pushed a commit that add that feature f74f7a8

Thanks for quick response. However I see the same behavior. In Vscode with rust-analyzer the same struct extends correctly.
Any way to print more logs to see output of rust-analyzer?

from irust.

sigmaSd avatar sigmaSd commented on August 12, 2024

weird it does work for me
image

Just for sanity check make add dbg!(&initialize_request); to make sure you're sending the new parmas

If that doesn't work make I have a small suspicion that a request workspace/didChangeConfiguration is needed, but it works for me without it

from irust.

sigmaSd avatar sigmaSd commented on August 12, 2024

you need to redirect stderr to make sense of the output cargo r 2>log

from irust.

vsndev3 avatar vsndev3 commented on August 12, 2024

weird it does work for me image

Just for sanity check make add dbg!(&initialize_request); to make sure you're sending the new parmas

If that doesn't work make I have a small suspicion that a request workspace/didChangeConfiguration is needed, but it works for me without it

Thanks, It's working for me also. Seems I have missed clean build.

from irust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.