Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyLua wrapper

Thin wrapper around stylua on PATH:

Workaround for missing global StyLua defaults in the VS Code extension JohnnyMorganz/StyLua#978 edit stylua.default.toml once next to this binary — every project without its own config gets that template as stylua.toml.

  1. If CWD has no stylua.toml / .stylua.toml → copy stylua.default.toml (next to this binary) → ./stylua.toml
  2. Forward all args to stylua, return its exit code

Never overwrites an existing config. Needs real StyLua installed.

Install

Grab a zip from Releases: windows-x64 / linux-x64 / macos-arm64 / macos-x64.

Keep binary + stylua.default.toml together, point the editor at the wrapper:

{ "stylua.styluaPath": "/path/to/stylua_wrapper" }

From source: cargo build --releasetarget/release/stylua_wrapper[.exe] (+ copy the toml next to it).

Notes

Log STYLUA_WRAPPER_LOG=1 or create stylua_wrapper.log beside the binary
Release git tag v0.1.0 && git push origin v0.1.0
FAQ faq.md

About

Drop-in StyLua wrapper that seeds a default stylua.toml — global formatter defaults for VS Code until StyLua#978 lands

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages