Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dpp#source#_source is broken #3

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading