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

Disable auto-removal of empty line #65

Open
legal90 opened this issue Jan 21, 2025 · 0 comments
Open

Disable auto-removal of empty line #65

legal90 opened this issue Jan 21, 2025 · 0 comments

Comments

@legal90
Copy link

legal90 commented Jan 21, 2025

General Question

Hi! Thank you for your amazing work on KCL and the VSCode extension!

I have a question related to the code auto-formatting. I noticed that the formatter (invoked by Format Document) removes empty lines before comments. Is it possible to disable this behavior ?

Here is an example:

  • Before formatting:
# ------------------------------
# Some comment
# ------------------------------

# This is a comment
foo = "bar"

# This is another comment
fizz = "bazz"
  • After formatting:
# ------------------------------
# Some comment
# ------------------------------
# This is a comment
foo = "bar"
# This is another comment
fizz = "bazz"

Versions

$ kcl --version
kcl version v0.10.0

$ kcl-language-server --version
kcl-language-server Version: 0.10.8-c020ab3eb4b9179219d6837a57f5d323
Platform: aarch64-apple-darwin
GitCommit: 2aa8feac72df509fa7b48cd6d339cc68038644d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant