mrmlnc/vscode-stylefmt

Stylefmt reports error whenever something is pasted in

aeschli opened this issue · 1 comments

From @smlombardi on June 6, 2017 15:4

  • VSCode Version: Code - Insiders 1.13.0-insider (eaa887c507e1614f90c9f04a30ceda775759e814, 2017-06-06T10:23:09.381Z)
  • OS Version: Darwin x64 16.6.0
  • Extensions:
Extension Author Version
ng-template Angular 0.1.3
vscode-markdownlint DavidAnson 0.9.1
code-settings-sync Shan 2.8.1
sort-lines Tyriar 1.3.0
Bookmarks alefragnani 0.15.1
project-manager alefragnani 0.18.0
vscode-eslint dbaeumer 1.2.11
vscode-html-css ecmel 0.1.5
tslint eg2 0.15.0
Angular2 johnpapa 2.3.2
vscode-icon-theme jtlowe 1.5.0
karyishlight smlombardi 1.0.0
theme-karyfoundation-themes karyfoundation 14.0.0
HTMLHint mkaufman 0.3.3
vscode-stylefmt mrmlnc 2.4.1
angular2-inline natewallace 0.0.17
typescript-hero rbbit 0.13.2
stylelint shinnn 0.24.0
darcula-extended smlombardi 3.3.2
slime smlombardi 2.6.2
theme-tesla smlombardi 6.0.0
change-case wmaurer 1.0.0

Steps to Reproduce:

  1. Open up a scss file
  2. Create a valid place (I typed the comma here) and paste a valid selector from somewhere else, e.g. a.dropdown-item
  3. The "output" panel pops open:

screen shot 2017-06-06 at 11 00 46 am

However, if you close the panel, there is no error flagged — because this never was an error.

This happens pasting code to create a new css selector or add to an old one. Any pasting into a scss file makes this happen.

This also happens when copying and pasting within the scss file. As in copy code from one place and paste further down in the same file.

This never used to happen in older versions of Code and/or Stylefmt. I frequently copy selectors from html to avoid typos, and pasting them like this should not open the panel.

Copied from original issue: microsoft/vscode#28116

Hello, @aeschli and @smlombardi,

This issue related to editor.formatOnPaste option if it is set to True. VS Code try to format code after paste, but since it is invalid code stylefmt throw error.

You can set stylefmt.showErrorMessages option to False. By default this option will be enabled.