Skip to content

Conversation

@Andriamanitra
Copy link
Owner

@Andriamanitra Andriamanitra commented Nov 10, 2025

closes #71

TODO:

  • Create a method for formatting request that both preSave and formatAction can use
  • Deserializing null in json.lua should give json.null instead of nil #66 causes "[µlsp] No results" to be logged when saving a file that doesn't require any formatting, so that should be fixed before this can be merged
  • Test with different language servers and big files that require lots of formatting to make sure there are no catastrophic bugs
  • Change default value of formatOnSave in config to false

@Andriamanitra Andriamanitra added enhancement New feature or request experimental Experimental feature, good for testing but not to be merged labels Nov 10, 2025
@Andriamanitra Andriamanitra mentioned this pull request Nov 10, 2025
@Andriamanitra
Copy link
Owner Author

I tested this with pylsp and a 10k line file that required bunch of formatting and was not happy with the results. With a big file like that it takes multiple seconds to get back a response and handle it. In that time you may easily edit the document without realizing the formatting is not yet done, which leads to the document getting out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request experimental Experimental feature, good for testing but not to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format on save

2 participants