mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-11 21:26:31 +00:00
Merge pull request #1333 from pyrox0/feat/sqruff
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
languages/sql: support sqruff
This commit is contained in:
commit
c7fe3c1818
2 changed files with 15 additions and 1 deletions
|
|
@ -129,3 +129,5 @@
|
|||
[pyrox0](https://github.com/pyrox0):
|
||||
|
||||
- Added [rumdl](https://github.com/rvben/rumdl) support to `languages.markdown`
|
||||
|
||||
- Added [sqruff](https://github.com/quarylabs/sqruff) support to `languages.sql`
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
cfg = config.vim.languages.sql;
|
||||
sqlfluffDefault = pkgs.sqlfluff;
|
||||
sqruffDefault = pkgs.sqruff;
|
||||
|
||||
defaultServers = ["sqls"];
|
||||
servers = {
|
||||
|
|
@ -39,6 +40,10 @@
|
|||
command = getExe sqlfluffDefault;
|
||||
append_args = ["--dialect=${cfg.dialect}"];
|
||||
};
|
||||
sqruff = {
|
||||
command = getExe sqruffDefault;
|
||||
append_args = ["--dialect=${cfg.dialect}"];
|
||||
};
|
||||
};
|
||||
|
||||
defaultDiagnosticsProvider = ["sqlfluff"];
|
||||
|
|
@ -50,6 +55,13 @@
|
|||
args = ["lint" "--format=json" "--dialect=${cfg.dialect}"];
|
||||
};
|
||||
};
|
||||
sqruff = {
|
||||
package = sqruffDefault;
|
||||
config = {
|
||||
cmd = getExe sqruffDefault;
|
||||
args = ["lint" "--format=json" "--dialect=${cfg.dialect}" "-"];
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.sql = {
|
||||
|
|
@ -58,7 +70,7 @@ in {
|
|||
dialect = mkOption {
|
||||
type = str;
|
||||
default = "ansi";
|
||||
description = "SQL dialect for sqlfluff (if used)";
|
||||
description = "SQL dialect for formatters and diagnostics (if used)";
|
||||
};
|
||||
|
||||
treesitter = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue