positron icon indicating copy to clipboard operation
positron copied to clipboard

Raw notebook cells are showing syntax error diagnostics

Open petetronic opened this issue 1 year ago • 1 comments

Describe the issue:

Following on from #3668, we also should suppress language diagnostics on raw cells.

Steps to reproduce the issue:

  1. Take the notebook example from issue 3668, with a raw cell:
---
echo: false
warning: false
fig-cap-localization: top
title: AI for financial stability
---
  1. Note the diagnostic Python syntax error reported on the first line of the raw cell.
Screenshot 2024-07-26 at 11 49 37 AM

Expected or desired behavior:

No Python syntax errors reported for raw cells.

petetronic avatar Jul 26 '24 15:07 petetronic

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.

seeM avatar Jul 26 '24 16:07 seeM

Thanks, I updated the issue to reflect the "change to raw" flow causes the issue.

petetronic avatar Jul 31 '24 16:07 petetronic

I think this will also be addressed by https://github.com/posit-dev/positron/issues/4263#issuecomment-2413370656.

seeM avatar Oct 15 '24 09:10 seeM

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:

testlabauto avatar Jan 21 '25 17:01 testlabauto