diff options
| author | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2023-01-18 12:09:21 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2023-01-18 12:09:21 +0100 |
| commit | b3b19c488dfd8688fb3813f553b509cd87ad8462 (patch) | |
| tree | ca7b243912e5904f6ea49e28789974d006de285f /lua/alpha/plugins/dap.lua | |
| parent | a04f9cd914055244f29e9ff17aa7a723f5db2405 (diff) | |
| download | nvim-conf-b3b19c488dfd8688fb3813f553b509cd87ad8462.tar.gz nvim-conf-b3b19c488dfd8688fb3813f553b509cd87ad8462.zip | |
feat: improve lazy configuration on how loading plugins
Diffstat (limited to 'lua/alpha/plugins/dap.lua')
| -rw-r--r-- | lua/alpha/plugins/dap.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lua/alpha/plugins/dap.lua b/lua/alpha/plugins/dap.lua index 6f33484..f8a7b17 100644 --- a/lua/alpha/plugins/dap.lua +++ b/lua/alpha/plugins/dap.lua @@ -6,9 +6,26 @@ return { "leoluz/nvim-dap-go", "mxsdev/nvim-dap-vscode-js", "anuvyklack/hydra.nvim", + "nvim-telescope/telescope-dap.nvim", + "rcarriga/cmp-dap", }, keys = { { "<leader>d" } }, config = function() require("alpha.dap") + local ok_telescope, telescope = pcall(require, "telescope") + if ok_telescope then + telescope.load_extension("dap") + end + + local ok_cmp, cmp = pcall(require, "cmp") + if ok_cmp then + cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { + sources = cmp.config.sources({ + { name = "dap" }, + }, { + { name = "buffer" }, + }), + }) + end end } |