Giter VIP home page Giter VIP logo

Comments (6)

sno2 avatar sno2 commented on May 23, 2024

Hmm, from looking at https://github.com/ziglang/vscode-zig/blob/master/src/zigFormat.ts it seems we don't use buffered IO and it is piped through stdin to JS and then written. Would it be possible to have Zig write to the files when it knows that the current open file is an actual file (not a scratch pad) and in the other cases use stdin?

from vscode-zig.

Vexu avatar Vexu commented on May 23, 2024

I have never experienced any slowness on Linux even when formatting 26k+ line files. Are you sure you have the extension configured to use a release build of Zig? Have you tried using zls as the formatting provider?

from vscode-zig.

sno2 avatar sno2 commented on May 23, 2024

Hello, I have tried disabling all of the pertinent extensions all extensions except the Zig one and the problem still persists. I am not sure how to use zls as the formatting provider because when I do >Format Document With and then select the ZLS extension it does not do anything. Here's a video showcasing what happens every time for me:

2022-06-30_07-09-24.mp4

.

from vscode-zig.

voltflake avatar voltflake commented on May 23, 2024

@sno2 what is your CPU usage when formatting .zig file? If it's high, which process takes CPU time the most? Can it be somehow related to windows defender conflict? See #53

from vscode-zig.

sno2 avatar sno2 commented on May 23, 2024

This is no longer happening for me. Thanks

from vscode-zig.

Pyrolistical avatar Pyrolistical commented on May 23, 2024

still very slow on windows.

zig version
0.12.0-dev.2063+804cee3b9

ziglang.vscode-zig v0.5.3

from vscode-zig.

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.