From cf3d54d280fdfeb583722a24e6e35f02f42aaa45 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Wed, 23 Oct 2024 09:09:13 -0400 Subject: [PATCH] improve spec --- lua/astrocommunity/pack/full-dadbod/init.lua | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lua/astrocommunity/pack/full-dadbod/init.lua b/lua/astrocommunity/pack/full-dadbod/init.lua index 48c16ab6c..5e2bd5261 100644 --- a/lua/astrocommunity/pack/full-dadbod/init.lua +++ b/lua/astrocommunity/pack/full-dadbod/init.lua @@ -10,10 +10,19 @@ return { "DBUIAddConnection", "DBUIFindBuffer", }, - init = function() - vim.g.db_ui_use_nerd_fonts = 1 - vim.g.completion_matching_ignore_case = 1 - end, + specs = { + { + "AstroNvim/astrocore", + opts = { + options = { + g = { + db_use_nerd_fonts = vim.g.icons_enabled and 1 or nil, + completion_matching_ignore_case = 1, + }, + }, + }, + }, + }, }, { "hrsh7th/nvim-cmp", @@ -29,7 +38,7 @@ return { { event = "FileType", desc = "dadbod completion", - pattern = { "sql", "mysql", "plsql", "pg" }, + pattern = { "sql", "mysql", "plsql" }, callback = function() require("cmp").setup.buffer { sources = { { name = "vim-dadbod-completion" } } } end, @@ -41,6 +50,9 @@ return { command = "set filetype=sql", }, }, + filetypes = { + extension = { pg = "sql" }, + }, }, }, },