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

C# code format not working #1140

Open
serezlan opened this issue Dec 30, 2024 · 3 comments
Open

C# code format not working #1140

serezlan opened this issue Dec 30, 2024 · 3 comments

Comments

@serezlan
Copy link

Hi,

Code formatting is not working on C# code. Tested with omnisharp and csharp-ls with emacs running with '-q' flag.

Steps to reproduce:

  • Create simple csharp hello world
  • add one line "using System.Text"with some leading spaces.
  • Run lsp-bridge-code-format

Expected result:

  • indent is set to 0 (no leading spaces)
    Actual:

  • No code changes detected.
    FYI, I tried python code format and it worked so I think this one specific to C# language servers.
    log.zip

@manateelazycat
Copy link
Owner

@serezlan Hi

Thanks for report, I have push commit b696f4f

Can you try newest version and test again? Thanks

@serezlan
Copy link
Author

serezlan commented Jan 3, 2025

I tried and still no changes.
I did try code action as well with no result.
Attached is output log.

Thx

log.zip

@manateelazycat
Copy link
Owner

Can you add print code at

(lsp-bridge-call-file-api "try_formatting"
and https://github.com/manateelazycat/lsp-bridge/blob/a8e5d67bed1e6838d307be9dacde560add2d7bdf/fileaction.py#L266?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants