fixed dap lazy loading

This commit is contained in:
Oliver Hartmann 2022-12-09 12:15:44 +01:00
parent 74c87cee88
commit d7705f1dec
2 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,9 @@ cmp.setup({
}, },
enabled = function() enabled = function()
return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt" return vim.api.nvim_buf_get_option(0, "buftype") ~= "prompt"
or require("cmp_dap").is_dap_buffer() or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl'
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches'
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover'
end, end,
completion = { completeopt = 'menu,menuone,noinsert, noselect' }, completion = { completeopt = 'menu,menuone,noinsert, noselect' },
window = { window = {

View File

@ -1,5 +1,7 @@
dap = require('dap') dap = require('dap')
require("cmp_dap").is_dap_buffer()
-- make sure we can exit the terminal with esc -- make sure we can exit the terminal with esc
vim.api.nvim_create_autocmd({ "TermOpen" }, { vim.api.nvim_create_autocmd({ "TermOpen" }, {