summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-09-07 19:27:42 +0100
committerw0rp <devw0rp@gmail.com>2018-09-07 19:27:42 +0100
commit0ae4ea23c8573f9c693fcd5cd5ff9a3acc795b58 (patch)
treed76944974e4ed34400966d640f9fc88caaee5b0b /autoload
parente0fe97e0a8e929bef9bd4d677c066968be70e914 (diff)
downloadale-0ae4ea23c8573f9c693fcd5cd5ff9a3acc795b58.zip
#1888 Support names with minuses in Clojure and Lisp
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/completion.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index c1736678..bded12b1 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -39,10 +39,14 @@ let s:LSP_COMPLETION_COLOR_KIND = 16
let s:LSP_COMPLETION_FILE_KIND = 17
let s:LSP_COMPLETION_REFERENCE_KIND = 18
+let s:lisp_regex = '\v[a-zA-Z_\-][a-zA-Z_\-0-9]*$'
+
" Regular expressions for checking the characters in the line before where
" the insert cursor is. If one of these matches, we'll check for completions.
let s:should_complete_map = {
\ '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$',
+\ 'clojure': s:lisp_regex,
+\ 'lisp': s:lisp_regex,
\ 'typescript': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|''$|"$',
\ 'rust': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$',
\}