From 3ac771d1e70ec10e22c2f602dbcb51690141d231 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 24 Mar 2024 10:55:25 +0900 Subject: [PATCH] Use method --- autoload/dpp.vim | 4 ++-- autoload/dpp/source.vim | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/dpp.vim b/autoload/dpp.vim index 25a8d0a..4e6ffb8 100644 --- a/autoload/dpp.vim +++ b/autoload/dpp.vim @@ -47,8 +47,8 @@ function dpp#make_state( \ config_path=g:->get('dpp#_config_path', ''), \ name=g:->get('dpp#_name', v:progname->fnamemodify(':r')), \ ) abort - const base_path = dpp#util#_expand(a:base_path) - const config_path = dpp#util#_expand(a:config_path) + const base_path = a:base_path->dpp#util#_expand() + const config_path = a:config_path->dpp#util#_expand() if base_path ==# '' call dpp#util#_error('dpp#make_state() base_path is empty.') diff --git a/autoload/dpp/source.vim b/autoload/dpp/source.vim index 8f458f2..cf2b208 100644 --- a/autoload/dpp/source.vim +++ b/autoload/dpp/source.vim @@ -131,7 +131,8 @@ function s:source_plugin(rtps, index, plugin, sourced) abort " NOTE: on_source must be sourced before depends for source in dpp#util#_get_lazy_plugins() \ ->filter({ _, val -> - \ dpp#util#_convert2list(val->get('on_source', [])) + \ val->get('on_source', []) + \ ->dpp#util#_convert2list() \ ->index(a:plugin.name) >= 0 \ }) if s:source_plugin(a:rtps, index, source, a:sourced) @@ -186,7 +187,8 @@ function s:source_plugin(rtps, index, plugin, sourced) abort " Load on_post_source for source in dpp#util#_get_lazy_plugins() \ ->filter({ _, val -> - \ dpp#util#_convert2list(val->get('on_post_source', [])) + \ val->get('on_post_source', []) + \ ->dpp#util#_convert2list() \ ->index(a:plugin.name) >= 0 \ }) if s:source_plugin(a:rtps, index, source, a:sourced)