Skip to content

Add support for hover extensions#77

Merged
fwcd merged 26 commits intomainfrom
extensions
Dec 6, 2024
Merged

Add support for hover extensions#77
fwcd merged 26 commits intomainfrom
extensions

Conversation

@fwcd
Copy link
Owner

@fwcd fwcd commented Dec 4, 2024

Fixes #69

This implements support for adding user-defined hovers via external commands, so-called extensions, which can be configured via the config (in VSCode settings.json):

{
  "curry.languageServer.extensions": [
    {
      "name": "Example Extension",
      "extensionPoint": "hover",
      "executable": "printf",
      "args": [
        "%s\n",
        "This is an example output:",
        "Current File:   {currentFile}",
        "Current URI:    {currentUri}",
        "Current Module: {currentModule}",
        "Line:           {line}",
        "Column:         {column}",
        "Type:           {type}",
        "Identifier:     {identifier}",
        "Module:         {module}"
      ]
    }
  ]
}

Other extension points may be added in the future.

To do

  • Implement hover extensions
  • Add some basic template parameters
    • currentFile, currentUri and currentModule
    • line and column
    • identifier and type (when local type information is available)
    • module (the imported module where the identifier is from, if available)

@fwcd fwcd added the enhancement New feature or request label Dec 4, 2024
@fwcd fwcd marked this pull request as ready for review December 6, 2024 02:14
@fwcd fwcd merged commit f456a90 into main Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for configurable analysis extensions

1 participant