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

Automatically add /// markdown prefix on next line #3803

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

fbricon
Copy link
Collaborator

@fbricon fbricon commented Oct 7, 2024

Fixes #3801
Oct-07-2024 11-00-03

@mickaelistria
Copy link
Contributor

Isn't the java/languageConfiguration.json file used for such cases? Having it in this file could allow to spread value wider as the file can be reused in other IDEs/editors (while the extension.ts cannot)

Copy link
Member

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently prior to this change, the language server's textDocument/onTypeFormatting would cause this :

Screencast.from.2024-10-07.12-58-59.mp4

No longer happen with this change, but no idea why it would try to do that in the first place.

@fbricon
Copy link
Collaborator Author

fbricon commented Oct 7, 2024

Apparently prior to this change, the language server's textDocument/onTypeFormatting would cause this :
No longer happen with this change, but no idea why it would try to do that in the first place.

I'm not seeing this without my change. It just deletes white spaces before the ///

@rgrunber
Copy link
Member

rgrunber commented Oct 7, 2024

It only occurs when there's no content immediately above/below (only newlines), and typing /// followed by enter. It doesn't happen in lightweight mode which also confirmed it's the standard server.

Update: Ok weird, just tried a fresh VS Code with vscode-java pre-release and it doesn't occur.

Update 2: @fbricon I think it's the setting, "editor.formatOnType": true .

@rgrunber rgrunber merged commit a184172 into redhat-developer:master Oct 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Automatically add /// on new line when editing Markdown javadoc
3 participants