kwerle / ide-ruby

Atom package used to integrate https://github.com/kwerle/ruby_language_server with Atom. Development happens on the develop branch. Production is master.
23 stars 6 forks source link

Outline duplicates root/parent elements #2

Closed kwerle closed 6 years ago

kwerle commented 6 years ago

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"
  }
]
kwerle commented 6 years ago

This will be resolved by #3