Skip to content

Commit

Permalink
fix: hyphen not being considered a keyword
Browse files Browse the repository at this point in the history
Closes #866
  • Loading branch information
Saghen committed Jan 3, 2025
1 parent 0ff2ed5 commit 8ca8ca4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/blink/cmp/completion/trigger/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ca8ca4

Please sign in to comment.