Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use the full path of a tool with sqlformat-command? #7

Open
bbigras opened this issue Oct 7, 2021 · 1 comment
Open

Can I use the full path of a tool with sqlformat-command? #7

bbigras opened this issue Oct 7, 2021 · 1 comment

Comments

@bbigras
Copy link

bbigras commented Oct 7, 2021

I would like to do this with nix instead of adding sqlfluff in my path.

{
  sqlformat = {
    enable = true;
    hook = [
      "(sql-mode-hook . sqlformat-on-save-mode)"
    ];
    config = ''
    (setq sqlformat-command "${pkgs.sqlfluff}/bin/sqlfluff")
    (setq sqlformat-args '("fix" "-f" "-"))
  '';
  };
}
@purcell
Copy link
Owner

purcell commented Oct 7, 2021

Hey! Currently - somewhat embarrassingly - that's not possible because the executable is just found off the path. What I do personally with Nix is to have a per-project shell.nix for tools, and then I use envrc.el and direnv to ensure that tools like sqlfluff are found via the current nix environment.

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

No branches or pull requests

2 participants