Skip to content

Conversation

@xav-ie
Copy link
Contributor

@xav-ie xav-ie commented Jun 30, 2025

Previous PR (merge this first pls!): #78

  • test(update): test hover was outdated
  • test(tokenPaste.vert): disable - not yet supported

This PR:

  • feat(--format): add subcommand
  • test(--format): add cli tests

Hello, I currently have repo-wide formatting setup and have been using clangd format for glsl files. Now that glsl_analyzer has formatting, my clangd cli formatter and glsl_analyzer LSP auto-formatter have different opinions on tabs. Gah! This is causing a lot of issues for me.

I would like to set this up to use from cli just like clangd allows. This means that I need a way to meet this formatter specification:
https://treefmt.com/latest/reference/formatter-spec/

Please accept my PR so I may format with this formatter!

I am happy to accept feedback and make changes.

I actually need to extend this functionality to eventually write to the file as well. I think that should be something like --format --write. Let me know your thoughts. I am used to prettier command that operates like this.

@xav-ie xav-ie mentioned this pull request Jun 30, 2025
@xav-ie xav-ie marked this pull request as ready for review June 30, 2025 11:57
@xav-ie xav-ie mentioned this pull request Jun 30, 2025
@nolanderc
Copy link
Owner

Thanks! Seems like a nice feature to have 😸

@nolanderc nolanderc merged commit 6ec157b into nolanderc:main Oct 16, 2025
9 checks passed
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.

2 participants