Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
PedramNavid committed Sep 2, 2024
1 parent e031b58 commit 8bdbe19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion lua/dbtpal/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function M.setup(options)
end
end


M.options = vim.tbl_deep_extend("force", M.defaults, options or {})
end

Expand Down
7 changes: 2 additions & 5 deletions lua/dbtpal/files.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ local projects = require "dbtpal.projects"
local config = require "dbtpal.config"
vim.api.nvim_create_augroup("dbtPal", {})


if config.options.custom_dbt_syntax_enabled then
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
group = "dbtPal",
pattern = { "*.sql" },
callback = function()
vim.bo.filetype = "sql"
vim.cmd("runtime syntax/dbt.vim")
vim.cmd "runtime syntax/dbt.vim"
end,
desc = "Enable custom dbt syntax on top of SQL",
})
else
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
group = "dbtPal",
pattern = { "*.sql" },
callback = function()
vim.bo.filetype = "sql"
end,
callback = function() vim.bo.filetype = "sql" end,
desc = "Set filetype to SQL without custom dbt syntax",
})
end
Expand Down

0 comments on commit 8bdbe19

Please sign in to comment.