From 43c0dba4e3302129d0af8fa9d4d4a802ffdcd7c7 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sun, 16 Mar 2025 12:10:07 +0800 Subject: [PATCH] feat: remove autocompletion in neovim for makrdown files --- users/modules/programs/nvf/input.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/users/modules/programs/nvf/input.nix b/users/modules/programs/nvf/input.nix index 6732ef4..dcd5bf8 100644 --- a/users/modules/programs/nvf/input.nix +++ b/users/modules/programs/nvf/input.nix @@ -1,4 +1,4 @@ -{ +{lib, ...}: { programs.nvf.settings.vim = { autopairs = { nvim-autopairs.enable = true; @@ -19,9 +19,22 @@ # - Scroll docs up [blink.cmp]: }; setupOpts = { + # Disable completion for markdown + enabled = + lib.generators.mkLuaInline + /* + lua + */ + '' + function() + return not vim.tbl_contains({"markdown"}, vim.bo.filetype) + and vim.bo.buftype ~= "prompt" + and vim.b.completion ~= false + end + ''; cmdline.sources = null; # use default source list sources.providers.cmdline.module = "blink.cmp.sources.cmdline"; - menu.auto_show = false; + # menu.auto_show = false; completion.documentation.auto_show_delay_ms = 0; signature.enabled = true; };