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

Language detection disappears when this extension kernel is enabled #3119

Closed
symisz opened this issue Aug 4, 2023 · 8 comments
Closed

Language detection disappears when this extension kernel is enabled #3119

symisz opened this issue Aug 4, 2023 · 8 comments

Comments

@symisz
Copy link

symisz commented Aug 4, 2023

creating a notebook file *.ipynb enables a language mode selection, this work when the extension is disabled.
once enabled, renders the selection to only two options which are "code" and markdown.

environment & screenshots

.NET Interactive 7

  • OS
    Windows 11
  • Frontend
    Visual Studio Code

Screenshots

Without kernel active:
image

With kernel active:
image

@jonsequitur
Copy link
Contributor

This is intentional, The language list in your first screenshot is the complete list of languages supported by VS Code, most of which don't work in notebooks. Polyglot Notebooks presents a list of languages that are actually supported when you click the cell kernel chooser in the lower-right corner of a cell:

image

@symisz
Copy link
Author

symisz commented Aug 4, 2023

so is the lack of code completion or void of syntax highlight is suppose to be this way as well, this makes it less appealing to work with.

@symisz
Copy link
Author

symisz commented Aug 7, 2023

I found the solution from another user @akselkvitberg
Issue dating from December 2022 rose-pine/vscode#76

you have to manual enable it in the settings,
code completion settings still not fully working.
feel free to share the settings to make code completion fully working in polyglot notebooks.

    "editor.semanticHighlighting.enabled": true,
    "editor.suggestSelection": "first",
    "editor.suggest.snippetsPreventQuickSuggestions": true,
    "editor.acceptSuggestionOnEnter": "smart",
    "editor.quickSuggestions": {
        "comments": "on",
        "strings": "on",
        "other": "on"
    },
    "editor.suggestOnTriggerCharacters": true,

this issue also involves issue #3113 @leet0rz

@leet0rz
Copy link

leet0rz commented Aug 7, 2023

@symisz Thank you, but how is there not a fix for this yet if the problem has been around since 2022. @jonsequitur - can something be done here?

@jonsequitur
Copy link
Contributor

If you're not seeing syntax highlighting and code completion, that is a bug and it's unrelated to the language chooser details above.

I'm unable to repro the lack of syntax highlighting described in #3113.

Completions work for most languages but not currently for JavaScript.

@leet0rz
Copy link

leet0rz commented Aug 8, 2023

If you're not seeing syntax highlighting and code completion, that is a bug and it's unrelated to the language chooser details above.

I'm unable to repro the lack of syntax highlighting described in #3113.

Completions work for most languages but not currently for JavaScript.

Highlighting seems to work now for some reason, completion works for C# but not JavaScript. Do yo you plan on implementing it for JS at some point considering you are have it select-able in polyglot but it's not working as intended?

@jonsequitur
Copy link
Contributor

Yes, we do plan to fix this.

@jonsequitur
Copy link
Contributor

The main issue raised here is about the kernel chooser behavior which is intentionally different for Polyglot Notebooks than from other notebook extensions, so I'm closing this issue.

For JavaScript code completions, please refer to #3123.

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

No branches or pull requests

3 participants