Skip to content

Document --stdin-filepath  #953

@notpeter

Description

@notpeter

When using Stylua as an auto-formatter in Zed (or similar editors) it is currently not possible to leverage .styluaignore or similar methods to disable autoformatting for certain paths because Zed invokes stylua via stdin/stdout, e.g. stylua -.

Other formatters, like prettier, support a --stdin-filepath parameter when operating in stdin mode which allows the formatter to still make decisions based on the path/filename, even though the actual actions are handled via stdin/stdout.

This would make it possible for .styluaignore and --g '!vendor/**/*.lua' to apply even when operating via stdin mode.

I was thinking I might take a crack at it, but wanted to post the idea first if anyone had strong opinions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions