coc-smarty
shadowwaSmarty extension for coc.nvim
Published Package Summary
coc-smarty
Smarty language server extension for coc.nvim.
Code changed from:
- Html language server extension for coc.nvim.
- Html extension of VSCode
- VSCode Smarty Language Server.
Install
In your vim/neovim, run command:
:CocInstall coc-smarty
Features
- Completion provider (smarty & html)
- Formatting
- Document Symbols & Highlights
- Document Links
- CSS mode
- Javascript mode
F.A.Q
Q: I can't select the complete item by <C-n> and <C-p>
A: Some completion item requires insert position after current cursor position
which is invalid for <C-n> and <C-p> on vim, you can use <up> and <down>
key for selection, or use api coc#_select_confirm() to select and confirm
selection which is recommended.
Additional useful plugins
- smarty.vim updated syntax, indent and ftplugin
- vim-textobj-smarty add textobj
for smarty, allowing to work on loop and conditional code with
*akand on content only with*ik(vim-textobj-user is also required) - vim-snippets is a library of
snippets for multiple languages, including Smarty. Works with:
- snipmate,
- ultisnips or
- coc-snippets if you are using coc
License
MIT
- Smarty extension for coc.nvim
- *
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
Published with coc-smarty@1.2.0 as history.md.
History
1.2.0
- update tags and attributes for Smarty 5
1.1.0
- use phpdoc as documentation for completionSuggestions
1.0.2
- npm packaging from github actions
1.0.0
- based on coc-html 1.8.0 and vscode-smarty 1.0.17
Contributed Commands
All contributes.commands entries from the published package manifest for coc-smarty@1.2.0.
This package does not declare any contributed commands.
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"default": []
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"default": [
"html",
"handlebars",
"htmldjango",
"blade",
"smarty"
]
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/microsoft/vscode-html-languageservice/blob/master/docs/customData.md).\n\ncoc-html loads custom data on startup to enhance its HTML support for the custom HTML tags, attributes and attribute values you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered."
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"default": "off",
"description": "Traces the communication between coc.nvim and the HTML language server"
}Raw JSON Schema
{
"type": "array",
"scope": "window",
"default": [],
"description": "List of directories that include Smarty plugins. By default, the “plugins” directory in the workspace root is included."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enable/disable default HTML formatter"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Configures if the built-in HTML language support suggests HTML5 tags, properties and values"
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable/disable autoClosing of HTML tags"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Configures if the built-in HTML language support validates embedded styles"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Enable/disable auto creation of quotes for HTML attribute assignment."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Show references to MDN in hover"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Configures if the built-in HTML language support validates embedded scripts"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"description": "Honor django, erb, handlebars and php templating language tags"
}Raw JSON Schema
{
"type": "array",
"scope": "window",
"default": [],
"description": "List of custom Smarty modifiers to show in completions. This is useful for plugins not defined in the plugins directory."
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"scope": "resource",
"default": "head, body, /html",
"markdownDescription": "List of tags, comma separated, that should have an extra newline before them. `null` defaults to `\"head, body, /html\"`"
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"scope": "resource",
"default": "wbr",
"description": "List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Show tag and attribute documentation in hover"
}Raw JSON Schema
{
"type": "array",
"scope": "window",
"default": [],
"description": "List of Smarty plugins that will disable XSS warning."
}Raw JSON Schema
{
"enum": [
"auto",
"force",
"force-aligned",
"force-expand-multiline",
"aligned-multiple",
"preserve",
"preserve-aligned"
],
"type": "string",
"scope": "resource",
"default": "auto",
"description": "Wrap attributes",
"enumDescriptions": [
"Wrap attributes only when line length is exceeded",
"Wrap each attribute except first",
"Wrap each attribute except first and keep aligned",
"Wrap each attribute",
"Wrap when line length is exceeded, align attributes vertically",
"Preserve wrapping of attributes",
"Preserve wrapping of attributes but align"
]
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 120,
"description": "Maximum amount of characters per line (0 = disable)"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Indent `<head>` and `<body>` sections"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Format and indent `{{#foo}}` and `{{/foo}}`"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"description": "Controls whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text"
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"scope": "resource",
"default": "pre,code,textarea",
"description": "List of tags, comma separated, where the content shouldn't be reformatted. 'null' defaults to the 'pre' tag"
}Raw JSON Schema
{
"type": [
"number",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Maximum number of line breaks to be preserved in one chunk. Use `null` for unlimited"
}Raw JSON Schema
{
"type": "number",
"scope": "resource",
"default": 1000,
"description": "Controls the maximum number of diagnostic messages (E.g. XSS warnings) to generate."
}Raw JSON Schema
{
"type": "array",
"scope": "window",
"default": [],
"description": "List of regular expressions for Smarty variables that will disable XSS warning."
}Raw JSON Schema
{
"type": [
"number",
"null"
],
"scope": "resource",
"default": null,
"markdownDescription": "Alignment size when using 'force aligned' and 'aligned multiple' in `#html.format.wrapAttributes#` or `null` to use the default indent size"
}Raw JSON Schema
{
"enum": [
"doublequotes",
"singlequotes",
"empty"
],
"type": "string",
"scope": "resource",
"default": "doublequotes",
"description": "Controls the default value for attributes when completion is accepted",
"enumDescriptions": [
"Attribute value is set to \"\"",
"Attribute value is set to ''",
"Attribute value is not set"
]
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"markdownDescription": "Keep text content together between this string"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "When completing an HTML attribute such as `class=\"...\"`, should quotes be stripped? If you like this option, please add a +1 react and comment on https://github.com/microsoft/vscode/issues/131144 to request that it be added to the standard HTML language in VS Code."
}