From 4e1ae49be61bb074f7e74ac4072ed068aa144950 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Fri, 10 May 2024 13:59:15 +0900 Subject: [PATCH] Fix set_static_import_path --- autoload/ddc.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/ddc.vim b/autoload/ddc.vim index ba5bf89..72defff 100644 --- a/autoload/ddc.vim +++ b/autoload/ddc.vim @@ -68,7 +68,14 @@ function ddc#update_items(name, items) abort call ddc#denops#_notify('updateItems', [a:name, a:items]) endfunction +const s:root_dir = ''->expand()->fnamemodify(':h:h') function ddc#set_static_import_path() abort + " Clear current import path. + call writefile([ + \ '// NOTE: It is dummy module.', + \ 'export const mods = {};', + \ ], s:root_dir .. '/denops/ddc/_mods.js') + call ddc#denops#_notify('setStaticImportPath', []) endfunction