Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When pasting, the comments gets duplicated when "editor.formatOnPaste":true #220

Closed
kameshsampath opened this issue Feb 28, 2020 · 10 comments · Fixed by redhat-developer/quarkus-ls#233
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kameshsampath
Copy link

When using Quakrus Properties mode , I see the comments in the properties file gets duplicated on copy paste and I have to press Ctrl+z to get them away.

2020-02-28_20-09-19 (2)

CC: @fbricon

@kameshsampath
Copy link
Author

@fbricon - as discussed on the chat I saw it came from SB plugin and when I uninstalled it it went away.

Thank you.

@kameshsampath
Copy link
Author

I see see it . Sorry about the confusion. All starts after the Quarkus Welcome thing comes in vscode

@kameshsampath
Copy link
Author

My current extensions

AndrsDC.base16-themes
DavidAnson.vscode-markdownlint
EditorConfig.EditorConfig
googlecloudtools.cloudcode
Gruntfuggly.todo-tree
joaompinto.asciidoctor-vscode
ms-azuretools.vscode-docker
ms-kubernetes-tools.vscode-kubernetes-tools
ms-python.python
ms-vscode.Go
ms-vscode.sublime-keybindings
octref.vetur
redhat.apache-camel-extension-pack
redhat.atlasmap-viewer
redhat.java
redhat.project-initializer
redhat.vscode-apache-camel
redhat.vscode-camelk
redhat.vscode-openshift-connector
redhat.vscode-quarkus
redhat.vscode-wsdl2rest
redhat.vscode-xml
redhat.vscode-yaml
sdras.night-owl
streetsidesoftware.code-spell-checker
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscode-icons-team.vscode-icons
yzhang.markdown-all-in-one
zhuangtongfa.material-theme```

@kameshsampath
Copy link
Author

Props

## Step 5 ## 
# spring.datasource.url=jdbc:postgresql://192.168.64.22:32490/demodb
quarkus.datasource.url=jdbc:postgresql://192.168.64.23:31833/demodb
# spring.datasource.username=demo
quarkus.datasource.username=demo
# spring.datasource.password=password!
quarkus.datasource.password=password!
# spring.datasource.driver-class-name=org.org.postgresql.Driver
quarkus.datasource.driver=org.postgresql.Driver

# spring.jpa.hibernate.ddl-auto=create-drop
%dev.quarkus.hibernate-orm.log.sql=true
%dev.quarkus.hibernate-orm.database.generation=drop-and-create
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
quarkus.datasource.max-size=8 
quarkus.datasource.min-size=2```

@kameshsampath
Copy link
Author

@fbricon - I found the root cause of the issue, it happens when you enable "editor.formatOnPaste": true setting. You can simulate it by installing "sublime keymap" extension and then it ask to import all settings and one time is format on copy paste. When make it false it works as expected.

@fbricon fbricon changed the title the comments gets duplicated with copy/paste When pasting, the comments gets duplicated when "editor.formatOnPaste":true Mar 2, 2020
@fbricon
Copy link
Collaborator

fbricon commented Mar 2, 2020

@kameshsampath thanks for the hint, I managed to reproduce this issue, it'll be easier to fix now, hopefully

@fbricon
Copy link
Collaborator

fbricon commented Mar 2, 2020

There's no need to install the sublime keymap BTW

@fbricon fbricon added the bug Something isn't working label Mar 2, 2020
@angelozerr
Copy link
Contributor

Thanks @kameshsampath for having take time to give us valuable information.

I can reproduce it. It's a problem on the MicroProfile LS side with range formatting. I'm working on that....

@angelozerr angelozerr added this to the 1.4.0 milestone Mar 2, 2020
@angelozerr angelozerr self-assigned this Mar 2, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 2, 2020
"editor.formatOnPaste":true

Fixes redhat-developer/vscode-quarkus#220

Signed-off-by: azerr <azerr@redhat.com>
@fbricon
Copy link
Collaborator

fbricon commented Mar 2, 2020

In the meantime, you can workaround the issue by adding this to your VS Code settings:

"[quarkus-properties]":{
    "editor.formatOnPaste": false
},
"[microprofile-properties]": {
    "editor.formatOnPaste": false
},

angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 2, 2020
"editor.formatOnPaste":true

Fixes redhat-developer/vscode-quarkus#220

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr
Copy link
Contributor

@fbricon @kameshsampath please review my PR redhat-developer/quarkus-ls#233 which should fixe this issue.

The bug occured when there have comments lines before the pasted content. Line comments was copied/pasted too.

angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 2, 2020
"editor.formatOnPaste":true

Fixes redhat-developer/vscode-quarkus#220

Signed-off-by: azerr <azerr@redhat.com>
fbricon pushed a commit to redhat-developer/quarkus-ls that referenced this issue Mar 2, 2020
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Mar 3, 2020
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Mar 3, 2020
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Mar 3, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 3, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants