-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
autocomplete for log
should be first console.log
#49308
Comments
This suggestion comes from emmet. You can set Adding @ramya-rao-a to see if there's anything we should tweak about when emmet completions show up |
@mjbvz Thanks Talking about Emmet, I'll keep it for tags autocompletion, something else I'd like is that suggestions work both from, for example, |
When I type I get the same result even after changing the mode to javascriptreact Can you share a screen shot where I am using VS Code version 1.23 |
@ramya-rao-a Thanks, I should have made the captures first sorry First how it was initially: Second, I put Full settings: {
"explorer.openEditors.visible": 0,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
// "eslint.autoFixOnSave": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"[javascript]": {
"editor.formatOnSave": true
},
"[json]": {
// "editor.formatOnSave": true
},
"[typescript]": {
"editor.formatOnSave": true
},
"files.associations": {
"*.js": "javascriptreact"
},
"editor.snippetSuggestions": "top",
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.printWidth": 110,
"prettier.requireConfig": true,
"prettier.ignorePath": "/home/caub/.prettierignore",
"code-runner.saveAllFilesBeforeRun": true,
"code-runner.runInTerminal": false,
"code-runner.clearPreviousOutput": true,
"code-runner.defaultLanguage": "shellscript",
"code-runner.enableAppInsights": false,
"code-runner.showExecutionMessage": true,
"code-runner.executorMap": {
"sql": "psql postgres://postgres:pg@localhost:5432/postgres -f",
"bash": "bash",
"javascript": "node",
"javascriptreact": "babel-node --presets ~/.npm-global/lib/node_modules/@babel/preset-env",
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
// "cwd": "${workspaceFolder}"
}
]
},
"editor.multiCursorModifier": "ctrlCmd",
"docker.showExplorer": false,
"emmet.triggerExpansionOnTab": true,
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"workbench.startupEditor": "newUntitledFile",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/package-lock.json": true,
"**/yarn.lock": true,
"**/.nyc_output": true,
"**/coverage": true,
"**/node_modules": true
},
"files.autoSave": "off",
"git.ignoreLimitWarning": true,
"explorer.confirmDragAndDrop": false,
"window.zoomLevel": 0,
"explorer.confirmDelete": false,
"search.exclude": {
"**/node_modules": true,
"**/node_modules/**": true,
"**/bower_components": true,
"**/build": true,
"**/dist": true
},
"extensions.ignoreRecommendations": false,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/node_modules": true,
"**/dist": true,
"**/build": true
},
"window.newWindowDimensions": "inherit"
} |
@mjbvz In the below screenshot, do you know from where is the first entry coming? The second is a snippet. @caub So the You mentioned that lowercase words are not valid react component or web component. Is there any documentation you can point us to that says the same? |
@ramya-rao-a Thanks, sure:
Yes, I was using tab for completion, because that's how I like to trigger it. I'm not so familiar with the concept of emmet, even if I tried to learn it. I'd prefer like I said previously, a way to distinguish clearly JSX/HTML completion, by just putting the opening example I type:
then the key for completion (TAB) here, will propose to complete it to This would really great for me, honestly Thanks again much for this wonderful editor and your efforts |
Its common to use tab for selecting an item from the auto-completion list, not to trigger the completion itself.
In this case, I would suggest to remove the setting
Emmet abbreviations don't work that way. For emmet in general see https://emmet.io. For your purpose, I would suggest the extension auto close tag |
Thanks, I wish this feature was handled in vscode core, because this extension, after 1 day of intense usage, has some issues, and made vscode process overclock a CPU. I couldn't reproduce those issues deterministically though, when I will, I'll report along with the many other pending issues, and probably try to help closing. I still wish a more reliable way for tags autocomplete/close in the future |
Thanks, that would be great, the difficulty can come with typescript generics for example, but it's surely possible to distinguish them with context |
I'm trying to fix auto-close-tag extension: formulahendry/vscode-auto-close-tag#86 But it's quite nasty to use regexes there, vscode core has surely an AST, and could do this pretty easily cc: @formulahendry |
I'm using
Javascript React
language mode by default, since I have jsx code anywhere in my .js filesI often need
console.log
but typinglog
then TAB always gives<log><log>
,console.log
comes in second position, which isn't handy.since
<log>
isn't a valid HTML5 tag anyway, (and can't be a component since lower-cased, not even a web-component, is it possible to remove it? I tried to customize this, but didn't find a wayWith
Javascript
language mode, it's fine of course, but as I said, I needJavascript React
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: