-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
725 additions
and
14 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Actions, BaseExt, Plugin } from "../dpp/types.ts"; | ||
|
||
type Params = Record<string, never>; | ||
|
||
type MakeStateArgs = { | ||
plugins: Plugin[]; | ||
}; | ||
|
||
const StateLines = [ | ||
"augroup dpp", | ||
" autocmd FuncUndefined *", | ||
" \\ : if '<afile>'->expand()->stridx('remote#') != 0", | ||
" \\ | call dpp#ext#lazy#_on_func('<afile>'->expand())", | ||
" \\ | endif", | ||
" autocmd BufRead *? call dpp#ext#lazy#_on_default_event('BufRead')", | ||
" autocmd BufNew,BufNewFile *? call dpp#ext#lazy#_on_default_event('BufNew')", | ||
" autocmd VimEnter *? call dpp#ext#lazy#_on_default_event('VimEnter')", | ||
" autocmd FileType *? call dpp#ext#lazy#_on_default_event('FileType')", | ||
" autocmd BufWritePost *.lua,*.vim,*.toml,vimrc,.vimrc", | ||
" \\ call dpp#util#_check_vimrcs()", | ||
" autocmd CmdUndefined * call dpp#ext#lazy#_on_pre_cmd('<afile>'->expand())", | ||
"augroup END", | ||
"augroup dpp-events | augroup END", | ||
"if !has('nvim') | return | endif", | ||
"lua <<END", | ||
"table.insert(package.loaders, 1, (function()", | ||
" return function(mod_name)", | ||
" mod_root = string.match(mod_name, '^[^./]+')", | ||
" if vim.g['dpp#_on_lua_plugins'][mod_root] then", | ||
" vim.fn['dpp#ext#lazy#_on_lua'](mod_name)", | ||
" end", | ||
" if package.loaded[mod_name] ~= nil then", | ||
" local m = package.loaded[mod_name]", | ||
" return function()", | ||
" return m", | ||
" end", | ||
" end", | ||
" return nil", | ||
" end", | ||
"end)())", | ||
"END", | ||
]; | ||
|
||
export class Ext extends BaseExt<Params> { | ||
override actions: Actions<Params> = { | ||
makeState: { | ||
description: "Make stateLines", | ||
callback: (args: { | ||
actionParams: unknown; | ||
}) => { | ||
const params = args.actionParams as MakeStateArgs; | ||
|
||
// TODO: Support dummy mappings/commands | ||
|
||
return StateLines; | ||
}, | ||
}, | ||
}; | ||
|
||
override params(): Params { | ||
return {}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,11 @@ export { | |
assertEquals, | ||
equal, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
export { parse, toFileUrl } from "https://deno.land/[email protected]/path/mod.ts"; | ||
export { | ||
extname, | ||
parse, | ||
toFileUrl, | ||
} from "https://deno.land/[email protected]/path/mod.ts"; | ||
export { | ||
deadline, | ||
DeadlineError, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
*dpp-ext-lazy.txt* lazy ext for dpp.vim | ||
|
||
Author: Shougo <Shougo.Matsu at gmail.com> | ||
License: MIT license | ||
|
||
CONTENTS *dpp-ext-lazy-contents* | ||
|
||
Introduction |dpp-ext-lazy-introduction| | ||
Install |dpp-ext-lazy-install| | ||
Examples |dpp-ext-lazy-examples| | ||
Actions |dpp-ext-lazy-actions| | ||
Preview params |dpp-ext-lazy-preview-params| | ||
Params |dpp-ext-lazy-params| | ||
Compatibility |dpp-ext-lazy-compatibility| | ||
|
||
|
||
============================================================================== | ||
INTRODUCTION *dpp-ext-lazy-introduction* | ||
|
||
This ext implements lazy loading. | ||
|
||
|
||
============================================================================== | ||
INSTALL *dpp-ext-lazy-install* | ||
|
||
Please install both "dpp.vim" and "denops.vim". | ||
|
||
https://github.com/Shougo/dpp.vim | ||
https://github.com/vim-denops/denops.vim | ||
|
||
|
||
============================================================================== | ||
EXAMPLES *dpp-ext-lazy-examples* | ||
> | ||
< | ||
|
||
============================================================================== | ||
ACTIONS *dpp-ext-lazy-actions* | ||
|
||
*dpp-ext-lazy-action-makeState* | ||
makeState | ||
Returns state lines for |dpp#make_state()|. | ||
|
||
params: | ||
{plugins}: plugins list. | ||
(Required) | ||
|
||
============================================================================== | ||
PARAMS *dpp-ext-lazy-params* | ||
|
||
============================================================================== | ||
COMPATIBILITY *dpp-ext-lazy-compatibility* | ||
|
||
============================================================================== | ||
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.