Skip to content

textDocument/documentSymbol support? #60

@dmitchelljackson

Description

@dmitchelljackson

Based on the readme, a document symbols provider appears to be something already supported by this project, but using LSP4J as a client and logging the raw json request and response, I am not seeing the document symbol provider being returned from the initialization call. I'm unclear if this is a protocol version mismatch issue, a misunderstanding of implemented features, or a bug. I have pasted the client request and server response below. Is this expected behavior?

Params: {
  "processId": 24553,
  "rootUri": null,
  "capabilities": {
    "workspace": {
      "workspaceFolders": true
    },
    "textDocument": {
      "documentSymbol": {
        "symbolKind": {
          "valueSet": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26
          ]
        },
        "hierarchicalDocumentSymbolSupport": true,
        "tagSupport": {
          "valueSet": [
            1
          ]
        },
        "labelSupport": true,
        "dynamicRegistration": true
      }
    }
  },
  "workspaceFolders": [
    {
      "uri": "file:/Users/mitchell.jackson/Workspace/project/",
      "name": "project"
    }
  ]
}
[Trace - 01:38:58 AM] Received response 'initialize - (1)' in 20719ms
Result: {
  "capabilities": {
    "textDocumentSync": 2,
    "hoverProvider": true,
    "completionProvider": {
      "resolveProvider": false,
      "triggerCharacters": [
        "."
      ]
    },
    "definitionProvider": true,
    "referencesProvider": true,
    "workspaceSymbolProvider": {
      "resolveProvider": false,
      "workDoneProgress": true
    },
    "codeActionProvider": {
      "codeActionKinds": [
        "",
        "quickfix",
        "refactor",
        "refactor.extract",
        "refactor.inline",
        "refactor.rewrite",
        "source",
        "source.organizeImports",
        "source.fixAll"
      ],
      "resolveProvider": false,
      "workDoneProgress": false
    },
    "executeCommandProvider": {
      "commands": [
        "decompile",
        "exportWorkspace",
        "Organize Imports",
        "inspection.applyFix",
        "kotlinDiagnostic.applyFix",
        "kotlinIntention.applyFix"
      ]
    },
    "workspace": {
      "workspaceFolders": {
        "supported": true,
        "changeNotifications": true
      }
    },
    "semanticTokensProvider": {
      "legend": {
        "tokenTypes": [
          "namespace",
          "class",
          "enum",
          "interface",
          "struct",
          "typeParameter",
          "type",
          "parameter",
          "variable",
          "property",
          "enumMember",
          "event",
          "function",
          "method",
          "macro",
          "keyword",
          "modifier",
          "comment",
          "string",
          "number",
          "regexp",
          "operator",
          "decorator"
        ],
        "tokenModifiers": [
          "declaration",
          "definition",
          "readonly",
          "static",
          "deprecated",
          "abstract",
          "async",
          "modification",
          "documentation",
          "defaultLibrary"
        ]
      },
      "range": false,
      "full": true
    },
    "diagnosticProvider": {
      "interFileDependencies": true,
      "workspaceDiagnostics": false,
      "workDoneProgress": false
    }
  },
  "serverInfo": {
    "name": "Kotlin LSP by JetBrains",
    "version": "0.1"
  }
}
Error: null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions