From 8ca8ca444e0801411e077cdee655e5efa3f77b36 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 3 Jan 2025 10:38:24 -0500 Subject: [PATCH] fix: hyphen not being considered a keyword Closes #866 --- lua/blink/cmp/completion/trigger/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/blink/cmp/completion/trigger/init.lua b/lua/blink/cmp/completion/trigger/init.lua index 3497339e..e463daf2 100644 --- a/lua/blink/cmp/completion/trigger/init.lua +++ b/lua/blink/cmp/completion/trigger/init.lua @@ -124,6 +124,9 @@ function trigger.activate() end function trigger.is_keyword_character(char) + -- special case for hyphen, since we don't consider a lone hyphen to be a keyword + if char == '-' then return true end + local keyword_start_col, keyword_end_col = require('blink.cmp.fuzzy').get_keyword_range(char, 1, 'prefix') return keyword_start_col ~= keyword_end_col end