From d169551792fc3c51bf44ec02abd0244ec053c5eb Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 12 Apr 2022 20:50:45 +0200 Subject: Improve the db with completition and status line --- after/plugin/completition.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'after/plugin/completition.lua') diff --git a/after/plugin/completition.lua b/after/plugin/completition.lua index 6b3dd22..1b403f1 100644 --- a/after/plugin/completition.lua +++ b/after/plugin/completition.lua @@ -73,6 +73,7 @@ cmp.setup { nvim_lua = "[api]", path = "[path]", luasnip = "[snip]", + ["vim-dadbod-completion"] = "[DB]", -- copilot = "[copilot]", } } @@ -84,6 +85,17 @@ cmp.setup { ghost_text = true, } } + +vim.api.nvim_create_autocmd( + "FileType", + { + pattern = "sql,mysql,plsql", + callback = function() + require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} }) + end + } +) + -- Setup lspconfig. local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) -- Replace with each lsp server you've enabled. -- cgit v1.2.3