Skip to content
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

npm audit fix & add option to enable extension for ALL languages #14

Closed
wants to merge 6 commits into from

Conversation

kiprasmel
Copy link

@kiprasmel kiprasmel commented Feb 20, 2019

Hello,
the feature of being able to just enable this extension for ALL languages would be very useful.

If I did everything correctly, this would fix #10.

Also, if this were to be accepted - the docs would need an update too about the extra option.

Please provide additional information if there's anything I missed - I'm new to vscode's extension development.

Edit:
This works on say .txt files, but it doesn't somehow in .js and many other files (the extension doesn't give you intellisense with available emojis; it gives the emoji only when you fully type it out but doesn't delete the :foo: code). Additional fixes are needed @mattbierner

Signed-off-by: Kipras Melnikovas <sarpixo@gmail.com>
Signed-off-by: Kipras Melnikovas <sarpixo@gmail.com>
Signed-off-by: Kipras Melnikovas <sarpixo@gmail.com>
Signed-off-by: Kipras Melnikovas <sarpixo@gmail.com>
Signed-off-by: Kipras Melnikovas <sarpixo@gmail.com>
@mattbierner
Copy link
Owner

To get completions workings, you also need to update the completion provider registration:

for (const language of config.languages) {

I think you can pass * as the language identifier to register a completion provider for all languages.

package.json Outdated
"emojisense.enableEmojisInAllLanguages": {
"type": "boolean",
"description": "Lets you easily enable emoji decorators in ALL languages",
"default": true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default this to false instead. Emoji suggestions will get in the way in many languages

Copy link
Author

@kiprasmel kiprasmel Feb 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I also default the enableEmojisInAllLanguages to false in Configuration @ src/configuration.ts?

https://github.com/mattbierner/vscode-emojisense/pull/14/files/9253933e2409d2dd1214dfdb2928e806fafd41a2#diff-8b01d5598b81332eb62385d26f3ead22R8

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when you install the extension the default should be false. enableEmojisInAllLanguages should be an opt-in setting.

On further thought, a cleaner way to express this may be to support using * with the emojisense.languages setting. That way you can enable or disable completions and decorators separately and we don't need another setting:

"emojisense.languages": {
    "*": true
}

or

    "plaintext": {
        "markupCompletionsEnabled": false,
        "emojiDecoratorsEnabled": true
    }
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely agree - I've thought about having the star thingie * too, but am kinda new to extension development and it didn't seem to work with either of my approaches. I'm currently busy and won't be able to take care of this, so anyone's free to fork my fork and go from there.

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
@mattbierner
Copy link
Owner

Hey, saw you pushed a commit. Just checking in to see what you want to do with this PR? I think it is headed in the correct direction but needs a few changes

@mattbierner
Copy link
Owner

Closing this as out of date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable :emojisense in all languages
2 participants