File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 44
55local M = {}
66local formatter = require (" sql-formatter.formatter" )
7+ local utils = require (" sql-formatter.utils" )
78
89M .config = {}
910
1415
1516function M .create_autocmds ()
1617 local group = vim .api .nvim_create_augroup (" SQLFormatter" , { clear = true })
17-
18+
1819 -- Format on save
1920 vim .api .nvim_create_autocmd (" BufWritePre" , {
2021 group = group ,
@@ -24,17 +25,17 @@ function M.create_autocmds()
2425 formatter .format_buffer ()
2526 end
2627 end ,
27- desc = " Format SQL on save"
28+ desc = " Format SQL on save" ,
2829 })
29-
30+
3031 -- Set up buffer-local settings for SQL files
3132 vim .api .nvim_create_autocmd (" FileType" , {
3233 group = group ,
3334 pattern = table.concat (M .config .filetypes , " ," ),
3435 callback = function (args )
3536 vim .api .nvim_buf_set_option (args .buf , " commentstring" , " -- %s" )
3637 end ,
37- desc = " Set up SQL buffer settings"
38+ desc = " Set up SQL buffer settings" ,
3839 })
3940end
4041
@@ -54,4 +55,4 @@ function M.should_format_on_save(buf)
5455 return M .config .format_on_save
5556end
5657
57- return M
58+ return M
You can’t perform that action at this time.
0 commit comments