Skip to content

Conversation

@jortel
Copy link
Contributor

@jortel jortel commented Feb 3, 2025

Add support for injecting the source code path (to be analyzed) in the extension metadata. The Location field will continue to be injected. There are providers that do not honor the Location field but instead expect a workspaceFolders array populated. This is an inconsistency in providers. To support this, the location needs to be templated. A new location variable in the builtin namespace may be used by the extension writer.
Example:

metadata:
  provider:
    address: localhost:$(PORT)
    initConfig:
    - providerSpecificConfig:
        lspServerName: generic
        lspServerPath: /usr/local/bin/pylsp
        workspaceFolders:
        - $(builtin.location)                  <-------------- HERE
        dependencyFolders:
        - examples/python/__pycache__
        - examples/python/.venv
    name: python

Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Jeff Ortel <[email protected]>
@jortel jortel marked this pull request as ready for review February 4, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants