Raw notebook cells are showing syntax error diagnostics
Describe the issue:
Following on from #3668, we also should suppress language diagnostics on raw cells.
Steps to reproduce the issue:
- Take the notebook example from issue 3668, with a raw cell:
---
echo: false
warning: false
fig-cap-localization: top
title: AI for financial stability
---
- Note the diagnostic Python syntax error reported on the first line of the raw cell.
Expected or desired behavior:
No Python syntax errors reported for raw cells.
I don't see syntax errors if I open a notebook and the cell was already raw. But if I create a Python cell and then change it to raw, the syntax errors don't go away.
I think in the former case, it may not be notifying the language server about the cell, and in the latter case it doesn't notify the language server that the cell "document" should be closed.
Thanks, I updated the issue to reflect the "change to raw" flow causes the issue.
I think this will also be addressed by https://github.com/posit-dev/positron/issues/4263#issuecomment-2413370656.
Verified Fixed
Positron Version(s) : 2025.02.0-79
OS Version : OSX
Test scenario(s)
No syntax errors reported for raw cells that used to be python.
Link(s) to TestRail test cases run or created: