Git Product home page Git Product logo

Comments (6)

vemoo avatar vemoo commented on August 27, 2024

Should this be closed by #415?

from rust-analyzer.

matklad avatar matklad commented on August 27, 2024

There are two bits I'd love to investigate with the new implementation: If I now type mod frobnicate; and apply a fix to create frobnicate.rs, the file gets created, but

  • editor is not focused to it (that is, file with mod frobnicate; is still opened, not the new file)
  • language server does not receive notification that file is created.

The second is a "bug" in the server implementation: it should listen to file system events, but it doesn't at this point.

The first one looks like something does not work on the typescript side of things. I expect that fixing first should also be a work-around for the second.

from rust-analyzer.

matklad avatar matklad commented on August 27, 2024

My current suspicions is that created/moved are not assigned for some reason: https://github.com/rust-analyzer/rust-analyzer/blob/481713a0e17e1557288e88a6b1a173b111792998/editors/code/src/commands/apply_source_change.ts#L17-L21

from rust-analyzer.

vemoo avatar vemoo commented on August 27, 2024

It turns out that there's multiple overloads of vscode.workspace.openTextDocument and we should use https://code.visualstudio.com/api/references/vscode-api#2280 but if a string is passed it means something different.

from rust-analyzer.

vemoo avatar vemoo commented on August 27, 2024

Now that that's working a textDocument/didOpen and then a textDocument/publishDiagnostics notification is recieved for the new file, should there be others?

from rust-analyzer.

matklad avatar matklad commented on August 27, 2024

It turns out that there's multiple overloads of vscode.workspace.openTextDocument and we should use https://code.visualstudio.com/api/references/vscode-api#2280 but if a string is passed it means something different.

😨

Now that that's working a textDocument/didOpen and then a textDocument/publishDiagnostics notification is recieved for the new file, should there be others?

No, that's all that is expected. It would still be good to fix underlying vfs issue, but that can be tricky. Opened #433 for that.

from rust-analyzer.

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.