Skip to content

Allow setting a language's query path in the configuration #1075

@TLATER

Description

@TLATER

Currently, to configure a new language, both TOPIARY_LANGUAGE_DIR and a block in the configuration file need to be added. This is a bit confusing, and not quite as flexible.

It would be nice if the language section of the configuration permitted a query key, e.g.:

nickel = {
  extensions = ["ncl"],
  grammar.source.path = "/path/to/compiled/grammar/file.so",
  query.path = "/path/to/query.ncl",
},
Original issue contents **Is your feature request related to a problem? Please describe.**

I'd really like to be able to format languages without having to mess with creating separate repositories, just write a .scm file, compile it, add it to my topiary configuration, done. It'd make testing and working with formatters smoother, even if I eventually want to publish the formatter.

Describe the solution you'd like

Ideally a topiary compile command that just takes a .scm file and outputs the .so file I need to hand to my configuration.

Describe alternatives you've considered

Not using topiary, and instead just writing the parsing logic separately. This is tedious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions