REditorSupport / REditorSupport/languageserver

Show nested functions in Document Symbols

Open
#559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
675
Forks
118
Avg merge
1d 37m
Merged PRs (30d)
11

Description

A child function does not appear in Document Symbol treeview.

Compare the Document Symbol treeview (Ctrl+Shift+.) results between test.py and test.R.

bar() function is shown as a child symbol under foo() function in test.py whereas test.R only shows the first level symbol (i.e., foo()).

test.py

def foo():
    def bar():
        print("Hello world!")

test.R

foo <- function() {
    bar <- function() {
        print("Hello worl!")
    }
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the Document Symbol treeview results for the nested-function examples in test.py and test.R, using Ctrl+Shift+.. Start by tracing how the R language server builds document symbols for foo() and its nested bar(). Done means bar() appears as a child symbol under foo(), matching the Python example.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.