-
Notifications
You must be signed in to change notification settings - Fork 72
Hot key for document formatting stopped working. #1283
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
Comments
The formatter does not work on Swift code with syntax errors. This code is missing the colon class Person {
var name: String
var age: Int
...
Modifying these two lines and formatting the document should work. |
The editor does not show me that there are any syntax errors in the file. You can see it in the screenshot, there are no highlighted words or operands. How do I know that there are any syntax errors without trying to run the code ? Other IDE's that I use, such as Microsoft Visual Studio and a lot of products of JetBrains company, always show me syntax errors in the editor. P. S. I have changed the text and formatting started to work. Thank you for your help. So, this issue can be renamed as |
I think the diagnostics not appearing is caused by swiftlang/sourcekit-lsp#1855. That fix should work its way into the next Swift release. |
Thank you @plemarquand |
Thanks for the report. I'm going to close out the issue, but feel free to comment or open a new one if you see anything else. |
Describe the bug
Hot key for document formatting stopped working.
To Reproduce
Steps to reproduce the behaviour:
Person.swift
with sample code, formatting stopped working.Expected behavior
Document formatting works.
Environment
Additional context
Contents of the
Person.swift
file.Below is the automatically created bug report by the VSCode editor which I sent to VSCode repository.
microsoft/vscode#236349
Type: Bug
Hot key for document formatting stopped working.
Steps to reproduce.
Person.swift
with sample code, formatting stopped working.Contents of the
Person.swift
file.VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Extensions (5)
A/B Experiments
The text was updated successfully, but these errors were encountered: