clinyong / vscode-css-modules

https://marketplace.visualstudio.com/items?itemName=clinyong.vscode-css-modules
MIT License
143 stars 39 forks source link

fix: kebab-casing should work in multicursor completion #95

Open action-hong opened 4 months ago

action-hong commented 4 months ago

When using multiple cursors to complete kebab-case class names, only the first line removes the "." , while other lines still retain the ".".

issue

According to the discussion, additionalTextEdits do not affect other lines.

Since additional text edits are "precise", e.g. naming a range and text, we cannot multiply them with each cursor location. However, the main edit of a completion will be applied for each cursor. So, ideally the c++ extension doesn't need additional text edits for this.

Therefore, instead of using additionalTextEdits, we set the range directly to include the "." for replacement.

fixed