summaryrefslogtreecommitdiff
path: root/autoload/ale/handlers/deno.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/ale/handlers/deno.vim')
-rw-r--r--autoload/ale/handlers/deno.vim17
1 files changed, 14 insertions, 3 deletions
diff --git a/autoload/ale/handlers/deno.vim b/autoload/ale/handlers/deno.vim
index b762f983..1770559d 100644
--- a/autoload/ale/handlers/deno.vim
+++ b/autoload/ale/handlers/deno.vim
@@ -4,7 +4,7 @@
call ale#Set('deno_executable', 'deno')
call ale#Set('deno_unstable', 0)
-call ale#Set('deno_importMap', 'import_map.json')
+call ale#Set('deno_import_map', 'import_map.json')
call ale#Set('deno_lsp_project_root', '')
function! ale#handlers#deno#GetExecutable(buffer) abort
@@ -68,8 +68,19 @@ function! ale#handlers#deno#GetInitializationOptions(buffer) abort
let l:options.unstable = v:true
endif
- if ale#Var(a:buffer, 'deno_importMap') isnot# ''
- let l:options.importMap = ale#path#FindNearestFile(a:buffer, ale#Var(a:buffer, 'deno_importMap'))
+ " Look for a value set using the historical option name.
+ let l:import_map = getbufvar(
+ \ a:buffer,
+ \ 'ale_deno_importMap',
+ \ get(g:, 'ale_deno_importMap', '')
+ \)
+
+ if empty(l:import_map)
+ let l:import_map = ale#Var(a:buffer, 'deno_import_map')
+ endif
+
+ if !empty(l:import_map)
+ let l:options.importMap = ale#path#FindNearestFile(a:buffer, l:import_map)
endif
return l:options