Skip to content

Instantly share code, notes, and snippets.

@kkiyama117
Last active January 5, 2021 15:09
Show Gist options
  • Save kkiyama117/fda8e271801a2e34ef2409c167e1ebdb to your computer and use it in GitHub Desktop.
Save kkiyama117/fda8e271801a2e34ef2409c167e1ebdb to your computer and use it in GitHub Desktop.
We can use it as taplo's config
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "dein.nvim",
"type": "object",
"description": "A schema for config of dein.nvim (https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L963)",
"x-taplo-info": {
"authors": [
"kkiyama117 (https://github.com/kkiyama117)"
],
"version": "0.1.0",
"patterns": [
"^(.*(/|\\\\)\\.*dein.*\\.toml|\\.*dein.*\\.toml)$"
]
},
"required": [
"plugins"
],
"additionalProperties": false,
"properties": {
"plugins": {
"title": "Definition properties table for installing a vim plugin",
"description": "Definition properties table for installing a vim plugin.\nIt is converted to |dein#add()|.",
"type": "array",
"uniqueness": true,
"additionalItems": false,
"items": {
"$ref": "#/definitions/Plugin"
},
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L955"
}
}
},
"ftplugin": {
"title": "ftplugin definition",
"description": "'_' key is executed after all ftplugin.\n'{filetype}' key is executed {filetype} ftplugin.\n You can define multiple filetypes by '{filetype1}_{filetype2}' key.",
"type": "object",
"additionalProperties": false,
"properties": {
"_": {
"title": "all filetypes",
"description": "'_' key is executed after all ftplugin.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L944"
}
}
}
},
"patternProperties": {
"^[0-9a-zA-Z].+$": {
"title": "filetype",
"description": "'{filetype}' key is executed {filetype} ftplugin.\nYou can define multiple filetypes by '{filetype1}_{filetype2}' key.\n'b:undo_ftplugin' is defined automatically.",
"type": "string"
}
},
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L943"
}
}
},
"hook_add": {
"title": "hook_add definition",
"description": "It is the global |dein-options-hook_add|.\nIt is executed in |dein#end()|.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L950"
}
}
}
},
"definitions": {
"Plugin": {
"title": "Pattern for a definition of vim plugin",
"type": "object",
"required": [
"repo"
],
"additionalProperties": false,
"properties": {
"repo": {
"title": "repository. ",
"description": "The repository URI or local repository directory path.",
"oneOf": [
{
"$ref": "#/definitions/Url"
},
{
"$ref": "#/definitions/Path"
},
{
"$ref": "#/definitions/repo-string-pattern"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L116"
}
}
},
"augroup": {
"description": "An augroup name that the plugin uses for |VimEnter| or |GUIEnter| autocmd events.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L607"
}
}
},
"build": {
"description": "Specify the build script. This command is executed by |system()| in the plugin runtimepath. Note: In previous versions of dein, build could also be of type dictionary, but that is now deprecated. Please use |dein-options-hook_post_update| instead.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L612"
}
}
},
"depends": {
"description": "Specify a list of plugins a plugin depends on. List items are '{plugin-name}'. Those specified in the list are NOT installed automatically. Note: The loading order is not guaranteed in non lazy plugins.",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L631"
}
}
},
"frozen": {
"description": "If set to 1, dein doesn't update it automatically. It is useful for outdated plugins that can no longer be updated.",
"type": "integer",
"enum": [
0,
1
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L638"
}
}
},
"ftplugin": {
"description": "'_' key is executed after all ftplugin. '{filetype}' key is executed {filetype} ftplugin.",
"type": "object",
"additionalProperties": false,
"properties": {
"_": {
"title": "all filetypes",
"description": "'_' key is executed after all ftplugin.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L944"
}
}
}
},
"patternProperties": {
"^[0-9a-zA-Z].+$": {
"title": "filetype",
"description": "'{filetype}' key is executed {filetype} ftplugin.\nYou can define multiple filetypes by '{filetype1}_{filetype2}' key.\n'b:undo_ftplugin' is defined automatically.",
"type": "string"
}
},
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L643"
}
}
},
"if": {
"description": "If set to zero, dein doesn't register the plugin, i.e. the plugin will be disabled. If it is String, dein will eval it. If you don't set it, dein will register (enable) the plugin",
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L648"
}
}
},
"lazy": {
"description": "If set to non-zero, dein doesn't add the path to 'runtimepath' automatically. If you don't set it, dein will set it automatically when the conditions are met. Note: You should not specify the plugins which have no 'plugin/' directory as lazy load plugins. It is meaningless and just increases the overhead. You can get the no meaning lazy plugins by |dein#check_lazy_plugins()|.",
"type": "integer",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L655"
}
}
},
"merged": {
"description": "If set to 0, dein doesn't merge the plugin directory. It is useful for the plugin files conflicts.",
"type": "integer",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L666"
}
}
},
"name": {
"description": "Specify the name of the plugin. This is used for dein management and other functions. If it is omitted, the tail of the repository name will be used. Note: Must be unique across the all plugin. If the plugin name conflicts with another plugin, dein will overwrite the previous settings with the new one. If the repo tail is bound to conflict, you can set the 'name' option manually to prevent overwriting an existing plugin setting.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L671"
}
}
},
"normalized_name": {
"description": "Specify the normalized name of the plugin. If omitted, dein will normalize the tail of the repository name. Note: Must be unique across all plugins.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L682"
}
}
},
"on_event": {
"description": "dein will call |dein#source()| on the events.",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L694"
}
}
},
"on_func": {
"description": "If it is matched to the called function, dein will call |dein#source()|.",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L703"
}
}
},
"on_ft": {
"description": "If it is matched to 'filetype', dein will call |dein#source()|.",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L708"
}
}
},
"on_i": {
"description": "If set to non-zero, dein will call |dein#source()| on |InsertEnter| autocmd. Note: This is deprecated option. You should use |on_event| instead.",
"type": "integer",
"x-taplo": {
"hidden": true,
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L713"
}
}
},
"on_idle": {
"description": "If set to non-zero, dein will call |dein#source()| on|FocusLost| or |CursorHold| autocmd. Note: This is deprecated option. You should use|on_event| instead.",
"type": "integer",
"x-taplo": {
"hidden": true,
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L720"
}
}
},
"on_if": {
"description": "If it is evaluated and it is non-zero, dein will call|dein#source()|.The default evaluate timings are 'BufRead', 'BufNewFile','VimEnter' and 'FileType'.If |dein-options-on_event| exists, it is evaluated when|dein-options-on_event|.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L727"
}
}
},
"on_map": {
"description": "If it is the Dictionary, the key is {mode} and the items are{mapping} or [{mapping1}, {mapping2}, ...].If it is the List, the items are {mapping} or [{mode},{mapping1}, [{mapping2}, ...]].If {mode} is omitted, 'nx' is used.",
"oneOf": [
{
"$ref": "#/definitions/on_map-dict"
},
{
"$ref": "#/definitions/on_map-array"
},
{
"$ref": "#/definitions/on_map-string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L740"
}
}
},
"on_path": {
"description": "If set to '.*', dein will call |dein#source()| on editing allfiles. Otherwise, dein will call |dein#source()| if thebuffer name is matched to the string pattern.Note: It is useful for explorer behavior plugins.",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L769"
}
}
},
"on_source": {
"description": "If set to '.*', dein will call |dein#source()| on editing allfiles. Otherwise, dein will call |dein#source()| if thebuffer name is matched to the string pattern.Note: It is useful for explorer behavior plugins. ",
"oneOf": [
{
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
{
"type": "string"
}
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L776"
}
}
},
"path": {
"description": "Specify the plugin downloaded path.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L781"
}
}
},
"rev": {
"description": "Specify a revision number or branch/tag name.If it is '*' in 'git' type, dein will use latest released tag.You can specify the wildcards like '0.*'.Note: If the type is 'raw', rev must be hash number.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L785"
}
}
},
"rtp": {
"description": "Specify the runtime path. You can use it when the repository has the Vim plugin in a subdirectory.For example: https://github.com/rstacruz/sparkup If it is empty string, dein will not add the path to'runtimepath'",
"type": "string",
"default": "vim",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L796"
}
}
},
"script_type": {
"description": "Specify the script type. It is useful for non-official categorized plugins. For example: 'indent', 'plugin', 'ftplugin', ... Note: You must not specify it for categorized plugins.",
"type": "string",
"enum": [
"indent",
"plugin",
"colors",
"ftplugin"
],
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L809"
}
}
},
"timeout": {
"description": "The time of timeout seconds when updating/installing plugins. If omit it, |g:dein#install_process_timeout| will be used.",
"type": "integer",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L825"
}
}
},
"trusted": {
"description": "If set to non-zero, dein will load the plugin in 'sudo' mode. If you don't set it, dein won't load it.",
"type": "integer",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L830"
}
}
},
"type": {
"description": "Specify the repository type. If it is omitted, a guess is made based on {repository}.",
"type": "string",
"enum": [
"none",
"raw",
"git"
],
"x-taplo": {
"docs": {
"enumValues": [
"None repository",
"Raw plugin file ('script_type' attribute is needed)",
"git"
]
},
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L835",
"enumValues": [
"https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L840",
"https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L841",
"https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L843"
]
}
}
},
"type__depth": {
"description": "The history depth for 'git clone'.\n If omitted, |g:dein#types#git#clone_depth| is used. If it is than 0, dein clones the repository by shallow clone. Shallow clone feature saves your repository clone time. But it has problems in some repository.\n Note: This attribute is available in git type only.\n\n https://github.com/Shougo/neobundle.vim/issues/81 https://github.com/Homebrew/homebrew/issues/12024",
"type": "integer",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L846"
}
}
},
"hook_add": {
"description": "It is executed after the line is parsed. Note: You cannot call plugin function in 'hook_add'. Because the plugin is not sourced when 'hook_add'.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L893"
}
}
},
"hook_done_update": {
"description": "It is executed after the all plugins are updated.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L893"
}
}
},
"hook_post_source": {
"description": "It is executed after plugins are sourced. Note: In Vim initializing, you must call the 'hook_post_source' hooks manually in |VimEnter| if needed. ",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L897"
}
}
},
"hook_post_update": {
"description": "It is executed after the plugins are updated.",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L906"
}
}
},
"hook_source": {
"description": "It is executed before plugins are sourced. Note: The 'sourced' means after |dein#end()| or when |VimEnter| or autoloaded. 'type': 'string',",
"type": "string",
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L910"
}
}
}
},
"x-taplo": {
"links": {
"key": "https://github.com/Shougo/dein.vim/blob/master/doc/dein.txt#L116"
},
"initKeys": [
"repo"
]
}
},
"Url": {
"title": "path",
"type": "string",
"pattern": "^https://[0-9a-zA-Z-_\\.]+(?:\\.[0-9a-zA-Z-_\\.]+)+[0-9a-zA-Z-_\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$"
},
"Path": {
"title": "path",
"type": "string",
"pattern": "^[~|/][a-zA-Z-_0-9/\\.~]+$"
},
"repo-string-pattern": {
"title": "repo name pattern",
"description": "If {repo} starts with github user name (ex:'Shougo/dein.vim'), dein will install github plugins.",
"type": "string",
"pattern": "^[a-zA-Z-_0-9]+\/[a-zA-Z-_0-9\\.]+$"
},
"vim-mode-key-pattern-string": {
"type": "string",
"pattern": "^[nvxsomilct]+$"
},
"vim-mode-key-mapping-string": {
"type": "string"
},
"on_map-string": {
"type": "string",
"oneOf": [
{
"$ref": "#/definitions/vim-mode-key-pattern-string"
},
{
"$ref": "#/definitions/vim-mode-key-mapping-string"
}
]
},
"on_map-array1": {
"type": "array",
"additionalItems": false,
"items": {
"$ref": "#/definitions/on_map-string"
}
},
"on_map-array2": {
"type": "array",
"additionalItems": false,
"items": {
"$ref": "#/definitions/vim-mode-key-mapping-string"
}
},
"on_map-array": {
"oneOf": [
{
"$ref": "#/definitions/on_map-array1"
},
{
"$ref": "#/definitions/on_map-array2"
}
]
},
"on_map-dict": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[nvxsomilct]+$": {
"description": "Pattern for vim key binding. You can use plugin prefix mappings. You can use '<Plug>' keyword as {mapping}. If{mapping} is '<Plug>', '<Plug>(normalized_name' isused. linter support is now under developping",
"oneOf": [
{
"$ref": "#/definitions/vim-mode-key-mapping-string"
},
{
"$ref": "#/definitions/on_map-array2"
}
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment