Comments (3)
really though I've been searching everywhere on how to do this. ultimately trying to have the attributes for the autocompleted tag and only that tag be suggested as well as a default value for that attribute.
from vscode-custom-data.
@andreasRu
You can use snippets and doing so makes the suggested values stay at the top of the list. For example:
{
"version": 1.1,
"tags": [
{
"name": "cms:add",
"description": "```html \n <cms:add my_count '1' /> \n ``` \n===\n\n\nThe **add** tag accepts two parameters and returns as its output the value obtained after adding together the two parameters. \n\nThe parameters may be literal strings, variables or output of other tags.\n\n\n\n ```html \n<cms:add my_count '1' />\n\n ``` \nThe snippet above adds 1 to what ever value is contained within *my_count* variable and outputs the resulting value.\n\n\nParameters\n----------\n\n\nThe tag expects two parameters as the values to be added.\n\n\nVariables\n---------\n\n\nThis tag is self-closing and does not set any variables of its own.\n\n\nRelated Tags\n------------\n\n\n\n\n* [sub](sub.html)\n\n* [mul](mul.html)\n\n* [div](div.html)\n\n* [mod](mod.html)\n\n* [incr](incr.html)\n\n* [decr](decr.html)\n\n\n\n'",
"attributes": [
{
"name": "${couchVar:${1:variableName}} ",
"description": "Value may be a Couch system variable Such as k_page_id or k_template_id or k_user_id etc.\n Eg. \n > <cms:add **k_page_id** '1' />",
"valueSet": "v"
},
{
"name": "${userVar:${1:variableName}} ",
"description": "Value may be a previously set variable name. Such as if you've used a code similar to \n```html\n <cms:set myvar='1' />\n ``` \n Eg.\n > <cms:add **myvar** '1' />",
"valueSet": "v"
},
{
"name": "${number:'$1'} ",
"description": "Value may be the number you wish to add to the other value.\n Eg.\n > <cms:add myvar **'1'** />",
"valueSet": "v"
}
]
}
]
}
from vscode-custom-data.
@nickisghosty Thanks – that works. With that the attributes are on Top of all other attributes. But do not answer the question to limit the attributes of an element just to the custom defined attributes – that would be great if it would work as @andreasRu suggested with suggestOnlyPrivatAttr = true
.
Now with the snippet style the selection in autocompletion list do look a bit ugly in my opinion.
from vscode-custom-data.
Related Issues (20)
- CSS: Using the "icon" value for the "content" property is deprecated.
- Missing "r" property from attribute list
- Not able to change title of custom editor's webview panel(webViewPanel.title = 'NewName.extension') HOT 1
- Attributes description
- Missing suggestions for "white-space" in CSS HOT 2
- align-items and align-content miss various values HOT 5
- Missing suggestions for "backdrop-filter" in CSS
- [Feature] Add `contentType` property to attributes
- Ability to define custom values for existing properties / syntax for the custom properties
- Switch to use webRef as input HOT 5
- the `html.customData` configuration does not work in vue files. HOT 1
- Add `()` to CSS experimental pseudo-class functions
- Support tags in css HOT 1
- support templating languages: `gohtml`
- dynamic html custom data example
- Togochat
- Honor
- Regression of white-space values: getValuesFromSyntax no longer handles white-space's syntax
- IntelliSense is missing anywhere value from the overflow-wrap rule
- Credit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-custom-data.