I had a problem where the autocompletion added another period after I typed a property of a Javascript object and pressed enter.
Expected output:
const test = {
property: 1
};
// before autocompletion
test.
// after autocompletion
test.property
After output:
const test = {
property: 1
};
// before autocompletion
test.
// after autocompletion
test..property
I was following a solution from a Github issue thread. It suggested to add a setting, specifically “completionDisableFilterText”, to “initializationOptions”. I opened settings.json
and add some lines in the “javascript” entry like this:
"javascript": {
"command": ["typescript-language-server", "--stdio"],
"rootIndicationFileNames": ["package.json", "package-lock.json"],
"url": "https://github.com/theia-ide/typescript-language-server",
"highlightingModeRegex": "^JavaScript.*$",
"documentLanguageId": false,
"settings": {
"completionDisableFilterText": true,
"filterText": true
},
"initializationOptions": {
"completionDisableFilterText": true,
"filterText": true
},
"completionDisableFilterText": true,
"filterText": true
}
However, the problem is still there; it still adds another period. How do I add an “initializationOptions”?