Skip to content

Commit

Permalink
fix: dpp#source#_source is broken
Browse files Browse the repository at this point in the history
rename function and bring missing element from `dpp#ext#lazy#_source()`
  • Loading branch information
kuuote committed Oct 14, 2023
1 parent f082b8c commit bd358a8
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions autoload/dpp/source.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function dpp#autoload#_source(plugins) abort
function dpp#source#_source(plugins) abort
let plugins = dpp#util#_convert2list(a:plugins)
if plugins->empty()
return []
Expand All @@ -10,7 +10,7 @@ function dpp#autoload#_source(plugins) abort
endif

let rtps = dpp#util#_split_rtp(&runtimepath)
const index = rtps->index(g:dpp#_runtime_path)
const index = rtps->index(dpp#util#_get_runtime_path())
if index < 0
return []
endif
Expand Down Expand Up @@ -200,3 +200,19 @@ function s:is_reset_ftplugin(plugins) abort

return 0
endfunction

function s:reset_ftplugin() abort
const filetype_state = 'filetype'->execute()

if 'b:did_indent'->exists() || 'b:did_ftplugin'->exists()
filetype plugin indent off
endif

if filetype_state =~# 'plugin:ON'
silent! filetype plugin on
endif

if filetype_state =~# 'indent:ON'
silent! filetype indent on
endif
endfunction

0 comments on commit bd358a8

Please sign in to comment.