From 0e99519500513ac6525f776722fb50a0197c54ce Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Wed, 22 Jun 2022 20:13:28 -0400 Subject: [PATCH] racket: start completion in a full keyword (#4186) The default `omni_start_map` is too restrictive for Lisps and Schemes like Racket, which permit hyphens (among other special characters). As recorded in #3870, trying to complete `file-name-from-path` when typing `file-name` would give completions like `namespace` because the hyphen is ignored to find the start of the word for completion. Now the racket filetype searches for the start using the keyword class `\k`, which is more precise. --- autoload/ale/completion.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index bb664e03..142c2e89 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -138,6 +138,7 @@ let s:should_complete_map = { " Regular expressions for finding the start column to replace with completion. let s:omni_start_map = { \ '': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', +\ 'racket': '\k\+', \} " A map of exact characters for triggering LSP completions. Do not forget to