Skip to content

feat: implement textDocument/formatting#401

Open
steeve wants to merge 1 commit intowithered-magic:mainfrom
zml:steeve/formatting
Open

feat: implement textDocument/formatting#401
steeve wants to merge 1 commit intowithered-magic:mainfrom
zml:steeve/formatting

Conversation

@steeve
Copy link

@steeve steeve commented Aug 11, 2025

This is done by spawning a buildifier process.

Buildifier can be configured in the initialization options:

{
    "buildifier": {
        "path": "...",
        "args": ["...", "...."]
     }
}

Closes #267

PS: note that this was done at 99% by Gemini Pro 2.5

@steeve steeve force-pushed the steeve/formatting branch 2 times, most recently from 3bd5630 to d7e75f4 Compare August 11, 2025 11:15
@steeve steeve force-pushed the steeve/formatting branch from d7e75f4 to 7ee86d2 Compare August 19, 2025 10:07
This is done by spawning a `buildifier` process.

Buildifier can be configured in the initialization options:
```json
{
    "buildifier": {
        "path": "...",
        "args": ["...", "..."]
     }
}
```

Closes withered-magic#267
@steeve steeve force-pushed the steeve/formatting branch from 7ee86d2 to 2d7da47 Compare August 19, 2025 10:16
@steeve
Copy link
Author

steeve commented Aug 20, 2025

Gentle ping @withered-magic :)

@withered-magic
Copy link
Owner

sorry for late movement here, I'll try to get this in soon!

@steeve
Copy link
Author

steeve commented Jan 14, 2026

gentle ping !

@withered-magic
Copy link
Owner

Sorry, forgot to reply here! Can we gate this behind a flag, e.g. starpls server --enable_formatting just so it doesn't conflict with things like the Bazel extensions auto-formatting? Otherwise LGTM!

@steeve
Copy link
Author

steeve commented Jan 20, 2026

sure!

@withered-magic
Copy link
Owner

great! lmk if you'd like me to make that change too and then I can just merge

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

Successfully merging this pull request may close these issues.

Implement textDocument/formatting

2 participants