The current implementation of the built-in format functionality relies on fs::write, which negatively impacts LSP performance.
Instead of writing the entire formatted file through the filesystem, it should be modified to support an internal overwrite mode, directly replacing the content in memory.
This change would reduce unnecessary I/O operations and significantly improve overall LSP responsiveness during formatting.
The current implementation of the built-in
formatfunctionality relies onfs::write, which negatively impacts LSP performance.Instead of writing the entire formatted file through the filesystem, it should be modified to support an internal overwrite mode, directly replacing the content in memory.
This change would reduce unnecessary I/O operations and significantly improve overall LSP responsiveness during formatting.