Skip to content

feat: add StyLua config#6

Merged
Ttibsi merged 2 commits intoTtibsi:mainfrom
DrKJeff16:feature/stylua
Sep 8, 2025
Merged

feat: add StyLua config#6
Ttibsi merged 2 commits intoTtibsi:mainfrom
DrKJeff16:feature/stylua

Conversation

@DrKJeff16
Copy link
Copy Markdown
Contributor

@DrKJeff16 DrKJeff16 commented Sep 4, 2025

Changes

  • Added .stylua.toml according to the project's code
  • Switched from vim.notify to error

@Ttibsi
Copy link
Copy Markdown
Owner

Ttibsi commented Sep 5, 2025

Thanks for the patch. Can you please rebase this now the other PR was merged, and make sure pre-commit passes.

@DrKJeff16
Copy link
Copy Markdown
Contributor Author

DrKJeff16 commented Sep 5, 2025

@Ttibsi All done!

Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
@DrKJeff16
Copy link
Copy Markdown
Contributor Author

Aaaaand for whatever reason pyproject.toml is complaining

@DrKJeff16 DrKJeff16 changed the title feat: add StyLua config, used error() instead of notifying feat: add StyLua config Sep 5, 2025
@Ttibsi
Copy link
Copy Markdown
Owner

Ttibsi commented Sep 6, 2025

i managed to recreate the error locally -- if you run pre-commit autoupdate and then run against all files again locally, you should see that it resolves:

 ~/workspace/pre-commit.nvim (main|u=) -> pre-commit run --all-files
[INFO] Initializing environment for https://github.com/JohnnyMorganz/StyLua.
[INFO] Installing environment for https://github.com/JohnnyMorganz/StyLua.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/auri/.cache/pre-commit/repoyl37ldhj/py_env-python3.13/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /home/auri/.cache/pre-commit/repoyl37ldhj
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
      error: subprocess-exited-with-error

      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [18 lines of output]
          Prepare meta /tmp/pip-modern-metadata-8gc119zg None
          Traceback (most recent call last):
            File "/home/auri/.cache/pre-commit/repoyl37ldhj/py_env-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
              main()
              ~~~~^^
            File "/home/auri/.cache/pre-commit/repoyl37ldhj/py_env-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
              json_out["return_val"] = hook(**hook_input["kwargs"])
                                       ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
            File "/home/auri/.cache/pre-commit/repoyl37ldhj/py_env-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 175, in prepare_metadata_for_build_wheel
              return hook(metadata_directory, config_settings)
            File "/tmp/pip-build-env-wbwl920t/overlay/lib/python3.13/site-packages/pseudo_builder.py", line 98, in prepare_metadata_for_build_wheel
              metadata = read_metadata()
            File "/tmp/pip-build-env-wbwl920t/overlay/lib/python3.13/site-packages/pseudo_builder.py", line 62, in read_metadata
              remote_info = rg.parse_git_url(git_url)
            File "/tmp/pip-build-env-wbwl920t/overlay/lib/python3.13/site-packages/release_gitter.py", line 137, in parse_git_url
              if git_url.startswith("git@github.com:"):
                 ^^^^^^^^^^^^^^^^^^
          AttributeError: 'NoneType' object has no attribute 'startswith'
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    × Encountered error while generating package metadata.
    ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.
Check the log at /home/auri/.cache/pre-commit/pre-commit.log
 ~/workspace/pre-commit.nvim (main|u=) -> nvim .pre-commit-config.yaml
 ~/workspace/pre-commit.nvim (main|u=) -> pre-commit autoupdate
[https://github.com/JohnnyMorganz/StyLua] updating v0.14.2 -> v2.1.0
 ~/workspace/pre-commit.nvim (main *|u=) -> pre-commit run --all-files
[INFO] Installing environment for https://github.com/JohnnyMorganz/StyLua.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
StyLua (Github)..........................................................Passed

Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
@DrKJeff16
Copy link
Copy Markdown
Contributor Author

@Ttibsi Success!

@Ttibsi Ttibsi merged commit 5e60fc6 into Ttibsi:main Sep 8, 2025
1 check passed
@Ttibsi
Copy link
Copy Markdown
Owner

Ttibsi commented Sep 8, 2025

Merged. Thanks for the patch

@DrKJeff16 DrKJeff16 deleted the feature/stylua branch September 8, 2025 10:10
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