kwerle/ide-ruby

Outline duplicates root/parent elements

kwerle opened this issue · 1 comments

In the example below you can see RubyLanguageServer is repeated. This happens for all parent scopes - they are duplicated at the root level and their children appear as children of that root element.

image

Here is the debug output of the JSON response to the textDocument/documentSymbol request :

[
  {
    "name": "RubyLanguageServer",
    "kind": 5,
    "location": {
      "uri": "file:///Users/kurt/Source/ruby_language_server/lib/ruby_language_server/version.rb",
      "range": {
        "start": {
          "line": 0,
          "character": 1
        },
        "end": {
          "line": 0,
          "character": 1
        }
      }
    }
  },
  {
    "name": "VERSION",
    "kind": 14,
    "location": {
      "uri": "file:///Users/kurt/Source/ruby_language_server/lib/ruby_language_server/version.rb",
      "range": {
        "start": {
          "line": 1,
          "character": 1
        },
        "end": {
          "line": 1,
          "character": 1
        }
      }
    },
    "containerName": "RubyLanguageServer"
  }
]

This will be resolved by #3