Skip to content

Commit ff8b03b

Browse files
authored
fix(sql): Dont overide opts.handlers table (#1520)
* fix(pack): sql do not override all handlers * --wip--
1 parent e1e0c99 commit ff8b03b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lua/astrocommunity/pack/sql/init.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ return {
3030
optional = true,
3131
opts = function(_, opts)
3232
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "sqlfluff" })
33-
opts.handlers = {
34-
sqlfluff = function()
35-
local null_ls = require "null-ls"
36-
null_ls.register(null_ls.builtins.diagnostics.sqlfluff.with {
37-
extra_args = { "--dialect", "ansi" },
38-
})
39-
null_ls.register(null_ls.builtins.formatting.sqlfluff.with {
40-
extra_args = { "--dialect", "ansi" },
41-
})
42-
end,
43-
}
33+
opts.handlers = opts.handlers or {}
34+
35+
opts.handlers.sqlfluff = function()
36+
local null_ls = require "null-ls"
37+
null_ls.register(null_ls.builtins.diagnostics.sqlfluff.with {
38+
extra_args = { "--dialect", "ansi" },
39+
})
40+
null_ls.register(null_ls.builtins.formatting.sqlfluff.with {
41+
extra_args = { "--dialect", "ansi" },
42+
})
43+
end
4444
end,
4545
},
4646
{

0 commit comments

Comments
 (0)