diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-04-12 20:50:45 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-04-12 20:51:09 +0200 |
| commit | d169551792fc3c51bf44ec02abd0244ec053c5eb (patch) | |
| tree | 6d3ace1eb02ade69781b1d63b9c3aaac7935afd1 /after/plugin/completition.lua | |
| parent | 2f09ab84a13e114b8a1585b55ba62e8d31c59370 (diff) | |
| download | nvim-conf-d169551792fc3c51bf44ec02abd0244ec053c5eb.tar.gz nvim-conf-d169551792fc3c51bf44ec02abd0244ec053c5eb.zip | |
Improve the db with completition and status line
Diffstat (limited to 'after/plugin/completition.lua')
| -rw-r--r-- | after/plugin/completition.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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 <YOUR_LSP_SERVER> with each lsp server you've enabled. |