Automatically update the LSP config when rome.json
changes
#3216
Replies: 3 comments 3 replies
-
If this is too tricky to implement a clean restart of the LSP, it would be sufficiently useful for me to have a way to using stale One option might be to detect |
Beta Was this translation helpful? Give feedback.
-
This is something that we plan to enable, but not very soon. In order to add this feature, the extension needs to add support for JSON files and doing so would automatically implement the formatting of that file. Rome is not able to support formatting for JSON files. If we decided to enable it now, an an error dialog would appear and... I am not sure it would send the correct message. When Rome will be able to support JSON files, this feature will be added. I would categorize this as a feature, and the team plans to add it soon (2/3 months). |
Beta Was this translation helpful? Give feedback.
-
🥳 Definitely looking forward to something like that! |
Beta Was this translation helpful? Give feedback.
-
Environment information
What happened?
rome.json
(e.g. switch from"indentStyle": "tab"
to"indentStyle": "space"
or vice-versa)The Rome extension uses the old config.
Expected result
It would be really valuable if the extension automatically used the new
rome.json
contents immediately.This sounds a bit like a "nice to have" feature, but it's critical for smooth UX when switching between commits that have different
rome.json
contents.As a concrete example, I've just converted a project to Rome, and I've had to turn off about a dozen rules to avoid several hundred linter errors until I can tackle them one rule at a time: https://github.com/cubing/cubing.js/blob/4d4f6dbbdc4b4c69e88805edc74560ad3144abf0/rome.json#L10-L24
If I start a branch to turn the rules on one-by-one, then I need to be very careful to "Reload Window" in VSCode every time I switch to or from the branch. Otherwise, I will see false positives or false negatives in the editor based on a different
rome.json
. Even worse, any auto-formatting from the wrongrome.json
can accidentally end up applying to another branch's committed changes, which could cause a massive merge conflict.Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions