interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Extension setting Default Notebook Language doesn't work

Open sassdawe opened this issue 1 year ago • 3 comments

Describe the bug

The Polyglot-notebook: Default Notebook Language setting on the User level is not being respected.

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

  • OS
    • [x] Windows 11
    • [ ] Windows 10
    • [x] macOS
    • [ ] Linux (Please specify distro)
    • [ ] iOS
    • [ ] Android
  • Browser
    • [ ] Chrome
    • [ ] Edge
    • [ ] Firefox
    • [ ] Safari
  • Frontend
    • [ ] Jupyter Notebook
    • [ ] Jupyter Lab
    • [ ] nteract
    • [x] Visual Studio Code
    • [ ] Visual Studio Code Insiders
    • [ ] Visual Studio
    • [ ] Other (please specify)

Screenshots

If applicable, add screenshots to help explain your problem. image Clicking the + code button is not creating a PowerShell block: image

sassdawe avatar Jul 08 '24 15:07 sassdawe

For some reason the metadata of the .ipynb files stay .net C# specific, and I need to edit them, so it would look like this:

"metadata": {
  "kernelspec": {
   "display_name": ".NET (PowerShell)",
   "language": "PowerShell",
   "name": ".net-powershell"
  },
  "language_info": {
   "file_extension": ".ps1",
   "mimetype": "text/x-powershell",
   "name": "PowerShell",
   "pygments_lexer": "powershell",
   "version": "7.4"
  }
 }

sassdawe avatar Jul 25 '24 14:07 sassdawe

I'm experiencing the same problem with F#:

  • every cell I add to the notebook defaults to C#,
  • if I [Ctrl][Enter] run a F# cell, the next it creates is C#. image

Initially it works ok, but after a while, the notebook's metadata gets set to:


 "metadata": {
  "kernelspec": {
   "display_name": ".NET (C#)",
   "language": "C#",
   "name": ".net-csharp"
  },
  "polyglot_notebook": {
   "kernelInfo": {
    "defaultKernelName": "csharp",
    "items": [
     {
      "aliases": [],
      "name": "csharp"
     },
     {
      "aliases": [],
      "languageName": "fsharp",
      "name": "fsharp"
     },
     {
      "aliases": [
       "js"
      ],
      "languageName": "JavaScript",
      "name": "javascript"
     }
    ]
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

pkese avatar Oct 05 '24 15:10 pkese

Yeah, this is super annoying.

sassdawe avatar Oct 05 '24 20:10 sassdawe