Disable For orgMode #575
-
Feature DescriptionHello, This is all I have for the config. But if I add it inside the opts {} then autoComplete is disabled for everything. I need autoComplete to be turned off for .org and .txt files. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
What are the filetype? enabled = function()
return not vim.tbl_contains({ "lua", "markdown" }, vim.bo.filetype) and vim.bo.buftype ~= "prompt"
end You can change the filetype list. |
Beta Was this translation helpful? Give feedback.
-
I can place the function in for example "init.lua" ? |
Beta Was this translation helpful? Give feedback.
-
I can't seem to get the function of: opts = {
-- the function should be here
enabled = function()
return not vim.tbl_contains({ "org", "txt" }, vim.bo.filetype) and vim.bo.buftype ~= "prompt"
end,
}, to work. What happens is that, in orgmode, it still tries to use the cmdline autocomplete. I was hoping to disable that and have nvim-orgmode take over so I can refile. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your detailed write up, @captcapslock . Unfortunately I am stuck at part 1 as I don't get "org" returned at all: |
Beta Was this translation helpful? Give feedback.
-
Yeah. I currently have that as false right now and nvim-orgmode works. Ideally, I would like a way to have the best of both worlds: cmdline completion, but NOT when nvim-orgmode is enabled. |
Beta Was this translation helpful? Give feedback.
You need to put the function inside
opts
for blink's PluginSpecYou don't need to make a new function; just replace the filetypes in the function given by @Shougo.