Skip to content

Commit

Permalink
fix: revert enabled logic or
Browse files Browse the repository at this point in the history
Related to #574
Closes #577
  • Loading branch information
Saghen committed Dec 15, 2024
1 parent 9f1fb75 commit cfd1b7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ MiniDeps.add({
keymap = { preset = 'default' },

-- Enables keymaps, completions and signature help when true
enabled = function() return vim.bo.buftype ~= "prompt" end,
enabled = function() return vim.bo.buftype ~= "prompt" and vim.b.completion ~= false end,
-- Example for blocking multiple filetypes
-- enabled = function()
-- return not vim.tbl_contains({ "lua", "markdown" }, vim.bo.filetype) and vim.bo.buftype ~= "prompt"
-- return not vim.tbl_contains({ "lua", "markdown" }, vim.bo.filetype)
-- and vim.bo.buftype ~= "prompt"
-- and vim.b.completion ~= false
-- end,

snippets = {
Expand Down
2 changes: 1 addition & 1 deletion lua/blink/cmp/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
local validate = require('blink.cmp.config.utils').validate
--- @type blink.cmp.ConfigStrict
local config = {
enabled = function() return vim.bo.buftype ~= 'prompt' or vim.b.completion ~= false end,
enabled = function() return vim.bo.buftype ~= 'prompt' and vim.b.completion ~= false end,
keymap = require('blink.cmp.config.keymap').default,
completion = require('blink.cmp.config.completion').default,
fuzzy = require('blink.cmp.config.fuzzy').default,
Expand Down

0 comments on commit cfd1b7f

Please sign in to comment.