summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD. Ben Knoble <ben.knoble+github@gmail.com>2022-06-22 20:13:28 -0400
committerGitHub <noreply@github.com>2022-06-23 09:13:28 +0900
commit0e99519500513ac6525f776722fb50a0197c54ce (patch)
tree0907e660428b6d0651d12b5a78cd3dd880cb431a
parent91e8422d6d67f1b1139b57b8707945ea2531443e (diff)
downloadale-0e99519500513ac6525f776722fb50a0197c54ce.zip
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<C-x><C-o>` 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.
-rw-r--r--autoload/ale/completion.vim1
1 files changed, 1 insertions, 0 deletions
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 = {
\ '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$',
+\ 'racket': '\k\+',
\}
" A map of exact characters for triggering LSP completions. Do not forget to