Outline view disappears after adding new section headers in R scripts
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Reproduce el problema en VS Code con un script de R que contenga funciones y encabezados de sección; después, añada un encabezado nuevo como # Testing ---- e inspeccione los registros de R Language Server. Verifique el comportamiento del outline antes y después de editar. Se considera completado cuando el outline continúa mostrando todos los símbolos después de añadir nuevos encabezados de sección.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug:
The outline view in VS Code initially displays symbols (functions, sections) correctly when an R file is opened. However, once I add a new section header (e.g., # Testing ----), the outline view disappears and shows "No symbols found in document". This makes it difficult to navigate larger R scripts as the document structure is lost whenever I edit the file.
To Reproduce:
Open an R script that contains some functions and section headers (# Section name ----)
Observe that the outline view correctly shows these symbols
Add a new section header (e.g., type # Testing ----)
Observe that the outline view now shows "No symbols found in document"
The only way to temporarily restore the outline is to close and reopen the file
Can you fix this issue by yourself?
No
settings.json:
{
"files.autoSave": "onFocusChange",
"terminal.integrated.inheritEnv": false,
"explorer.autoReveal": false,
"git.autofetch": true,
"r.plot.useHttpgd": false,
"r.rterm.mac": "/opt/homebrew/bin/R",
"r.bracketedPaste": true,
"r.rterm.option": ["--no-save", "--no-restore"],
"terminal.integrated.env.osx": {
"R_HOME": "/opt/homebrew/Cellar/r/4.4.3/lib/R"
},
"r.rpath.mac": "/opt/homebrew/bin/R",
"r.lsp.path": "/opt/homebrew/bin/R",
"files.exclude": {
"**/.gitattributes": true,
"**/.gitignore": true,
"**/.vscode": true
},
"settingsSync.ignoredExtensions": [],
"workbench.editor.openSideBySideDirection": "right",
"git.enableSmartCommit": true,
"git.confirmSync": false,
"editor.minimap.showSlider": "always",
"editor.find.autoFindInSelection": "always",
"git.postCommitCommand": "sync",
"git.showPushSuccessNotification": true,
"outline.collapseItems": "alwaysCollapse",
"r.alwaysUseActiveTerminal": true,
"notebook.editorOptionsCustomizations": {},
"notebook.output.scrolling": "force inline",
"terminal.integrated.shellIntegration.suggestEnabled": true,
"github.copilot.editor.enableAutoCompletions": true,
"terminal.integrated.profiles.osx": {
"bash": {
"path": "bash",
"args": ["-l"],
"icon": "terminal-bash"
},
"zsh": {
"path": "zsh",
"args": ["-l"]
},
"fish": {
"path": "fish",
"args": ["-l"]
},
"tmux": {
"path": "tmux",
"icon": "terminal-tmux"
},
"pwsh": {
"path": "pwsh",
"icon": "terminal-powershell"
}
},
"terminal.integrated.defaultProfile.osx": "zsh",
"interactiveWindow.executeWithShiftEnter": true,
"jupyter.interactiveWindow.textEditor.executeSelection": true,
"python.terminal.executeInFileDir": true,
"python.dataScience.sendSelectionToInteractiveWindow": true,
"python.dataScience.showCellInputCode": false,
"python.dataScience.textOutputLimit": 500,
"python.dataScience.notebookFileRoot": "${workspaceFolder}",
"macros": {
"runAndMoveCursor": [
"python.execSelectionInInteractiveWindow",
"cursorMove"
]
},
"workbench.editor.splitInGroupLayout": "vertical",
"r.session.viewers.viewColumn": {
"view": "Active",
"plot": "Active",
"viewer": "Active"
},
"workbench.editorAssociations": {
"*.csv": "gc-excelviewer-csv-editor"
},
"editor.codeActionsOnSave": {
"source.fixAll": "never"
},
"editor.formatOnSave": false,
"editor.formatOnType": false,
"r.linting.enabled": false,
"python.linting.enabled": false,
"eslint.enable": false,
"r.lsp.debug": false,
"r.lsp.enabled": true,
"r.lsp.diagnostics": true,
"r.sessionWatcher": true,
"files.associations": {
"*.rmd": "markdown"
},
"workbench.secondarySideBar.showLabels": false
}
Expected behavior:
The outline view should remain functional and continue to display all symbols even after editing the file or adding new section headers.
Environment:
OS: macOS
VSCode Version: 1.98.2
R Version: 4.4.3
vscode-R version: 2.8.4
Additional context:
I've tried reinstalling the R extension and configuring the language server settings, but the issue persists. The outline view works correctly with other file types (e.g., Python) but consistently breaks when editing R files. The R Language Server does appear to be running correctly according to the logs.
- Lenguaje dominante
- R
- Estrellas
- 675
- Forks
- 118
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 11
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de REditorSupport/languageserver
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
REditorSupport/languageserver#776 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
REditorSupport/languageserver#735 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
REditorSupport/languageserver#731 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
REditorSupport/languageserver#730 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
REditorSupport/languageserver#771 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de REditorSupport/languageserver
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
datacarpentry/semester-biology#1266 ·
Los mantenedores suelen responder en 1 día
-
(feat) Additional Arrow supportAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
REditorSupport/vscode-R#1785 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ImperialCollegeLondon/ve_data_science#666 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 13 días