[PR #369] [CLOSED] LSP support #526

Closed
opened 2025-12-30 01:25:07 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/369
Author: @stackoverflow
Created: 3/27/2024
Status: Closed

Base: mainHead: lsp-setup


📝 Commits (10+)

📊 Changes

60 files changed (+10870 additions, -3 deletions)

View changed files

📝 buildSrc/src/main/kotlin/pklFatJar.gradle.kts (+7 -0)
📝 gradle/libs.versions.toml (+2 -0)
📝 pkl-cli/gradle.lockfile (+3 -0)
📝 pkl-cli/pkl-cli.gradle.kts (+1 -0)
📝 pkl-cli/src/main/kotlin/org/pkl/cli/Main.kt (+2 -1)
pkl-cli/src/main/kotlin/org/pkl/cli/commands/LspCommand.kt (+39 -0)
📝 pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java (+2 -2)
pkl-lsp/gradle.lockfile (+38 -0)
pkl-lsp/pkl-lsp.gradle.kts (+27 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/Builder.kt (+129 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/CacheManager.kt (+55 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/ClientLogger.kt (+47 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/ErrorMessages.kt (+37 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/LSPUtil.kt (+113 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/NodeVisitor.kt (+26 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklBaseModule.kt (+344 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklLSP.kt (+33 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklLSPServer.kt (+110 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklTextDocumentService.kt (+80 -0)
pkl-lsp/src/main/kotlin/org/pkl/lsp/PklVisitor.kt (+422 -0)

...and 40 more files

📄 Description

This is an alpha version with limited capabilities.

Implemented:

  • Variable resolution
  • Import resolution: only files, stdlib and HTTPS
  • Hover feature
  • Go to definition feature
  • Auto completion: only dot (.) for now
  • Error/warning reporting: not as full featured as pkl-intellij

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/369 **Author:** [@stackoverflow](https://github.com/stackoverflow) **Created:** 3/27/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `lsp-setup` --- ### 📝 Commits (10+) - [`bc4ef1a`](https://github.com/apple/pkl/commit/bc4ef1a12048114c4628777c0aa10e09b8446f1c) add cst - [`eb77bbc`](https://github.com/apple/pkl/commit/eb77bbce1ec0db540e4512b8f5519a14b5f4a031) finished CST builder - [`30ffc50`](https://github.com/apple/pkl/commit/30ffc509141c5d3a874311d9bcc04624bd2218b3) add parent to CST nodes - [`42de244`](https://github.com/apple/pkl/commit/42de24417ba761840abcd5a0865430d3f72736ff) start builder - [`3df1810`](https://github.com/apple/pkl/commit/3df181086cc8976e57163638a6b6da1f55845d0c) basic diagnostics are working - [`6c89a0c`](https://github.com/apple/pkl/commit/6c89a0c6fc623af92eb8f1f4a03e5ddd97e1a9a5) resolve some todos in CstBuilder - [`8c1d989`](https://github.com/apple/pkl/commit/8c1d9898b35e3ec1477c915a70b8ff7332280c0b) remove java CST - [`b05f2c6`](https://github.com/apple/pkl/commit/b05f2c6022acc2ceff46e9fa14deab0c460e4288) Switch to adapter pattern (#453) - [`b75f1d8`](https://github.com/apple/pkl/commit/b75f1d807a72b348ecd1ef2bc42639885278a3c1) small refactor - [`1fab6de`](https://github.com/apple/pkl/commit/1fab6de3ba610919c5754d14f4035703d40273bf) start type and name resolution ### 📊 Changes **60 files changed** (+10870 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `buildSrc/src/main/kotlin/pklFatJar.gradle.kts` (+7 -0) 📝 `gradle/libs.versions.toml` (+2 -0) 📝 `pkl-cli/gradle.lockfile` (+3 -0) 📝 `pkl-cli/pkl-cli.gradle.kts` (+1 -0) 📝 `pkl-cli/src/main/kotlin/org/pkl/cli/Main.kt` (+2 -1) ➕ `pkl-cli/src/main/kotlin/org/pkl/cli/commands/LspCommand.kt` (+39 -0) 📝 `pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java` (+2 -2) ➕ `pkl-lsp/gradle.lockfile` (+38 -0) ➕ `pkl-lsp/pkl-lsp.gradle.kts` (+27 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/Builder.kt` (+129 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/CacheManager.kt` (+55 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/ClientLogger.kt` (+47 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/ErrorMessages.kt` (+37 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/LSPUtil.kt` (+113 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/NodeVisitor.kt` (+26 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/PklBaseModule.kt` (+344 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/PklLSP.kt` (+33 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/PklLSPServer.kt` (+110 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/PklTextDocumentService.kt` (+80 -0) ➕ `pkl-lsp/src/main/kotlin/org/pkl/lsp/PklVisitor.kt` (+422 -0) _...and 40 more files_ </details> ### 📄 Description This is an alpha version with limited capabilities. Implemented: - Variable resolution - Import resolution: only files, stdlib and HTTPS - Hover feature - Go to definition feature - Auto completion: only dot (`.`) for now - Error/warning reporting: not as full featured as pkl-intellij --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:25:07 +01:00
adam closed this issue 2025-12-30 01:25:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#526