diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 59b27d8..be3da3c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -124,10 +124,10 @@ return { -- { name = 'emoji' }, }, enabled = function() - return vim.api.nvim_buf_get_option(0, 'buftype') ~= 'prompt' - 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' + return vim.api.nvim_get_option_value('buftype', { buf = 0 }) ~= 'prompt' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dap-repl' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_watches' + or vim.api.nvim_get_option_value('filetype', { buf = 0 }) == 'dapui_hover' end, -- completion = { -- completeopt = 'menu,menuone,noinsert, noselect',