Skip to content

Conversation

hugiex
Copy link
Contributor

@hugiex hugiex commented Oct 16, 2025

Add Deno LSP Support

Summary

Adds Deno LSP server support with mutual exclusion from TypeScript LSP to prevent conflicting diagnostics.

Changes

• Added Deno LSP: Detects deno.json/deno.jsonc, supports .ts, .tsx, .js, .jsx, .mjs
• Enhanced NearestRoot: Added optional excludePatterns parameter
• Updated TypeScript LSP: Excludes itself when Deno markers are found

Behavior

• Deno projects (deno.json present) → Deno LSP only
• Node/Bun projects (package-lock.json, etc.) → TypeScript LSP only
• No conflicts - single LSP per file

Requirements

• Deno CLI must be pre-installed (like TypeScript)
• Uses built-in deno lsp command

Testing

Deno Project

LSP Attachment Log - filtered log on a folder that contain a deno.json file

INFO  2025-10-16T09:45:44 +2ms service=lsp serverIds=deno, typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd, svelte, jdtls enabled LSP servers
INFO  2025-10-16T09:47:03 +5ms service=lsp serverID=deno spawned lsp server
INFO  2025-10-16T09:47:03 +0ms service=lsp.client serverID=deno starting client
INFO  2025-10-16T09:47:03 +2ms service=lsp.client serverID=deno sending initialize
INFO  2025-10-16T09:47:03 +21ms service=lsp.client serverID=deno initialized
INFO  2025-10-16T09:47:03 +3ms service=lsp.client serverID=deno  textDocument/didOpen
INFO  2025-10-16T09:47:04 +410ms service=lsp.client serverID=deno  textDocument/publishDiagnostics
INFO  2025-10-16T09:47:20 +1ms service=lsp.client serverID=deno  waiting for diagnostics
INFO  2025-10-16T09:47:20 +0ms service=lsp.client serverID=deno  version=1 textDocument/didChange
INFO  2025-10-16T09:47:20 +11ms service=lsp.client serverID=deno  textDocument/publishDiagnostics
INFO  2025-10-16T09:47:20 +0ms service=lsp.client serverID=deno  got diagnostics

@hugiex hugiex marked this pull request as ready for review October 16, 2025 10:35
@rekram1-node
Copy link
Collaborator

Do you mind documenting it in lsp.mdx too?

@rekram1-node
Copy link
Collaborator

/oc read lsp.mdx use docs agent to update it to include a reference for deno lsp

Copy link
Contributor

opencode-agent bot commented Oct 16, 2025

Perfect! I've updated the lsp.mdx file to include Deno LSP support. The changes include:

  1. Added Deno LSP to the built-in servers table with:

    • Extensions: .ts, .tsx, .js, .jsx, .mjs
    • Requirements: deno command available (auto-detects deno.json/deno.jsonc)
  2. Added a note explaining the mutual exclusion behavior between Deno and TypeScript LSP servers, clarifying that Deno LSP takes precedence when deno.json/deno.jsonc files are detected.

The documentation now properly reflects the Deno LSP support that was added in the pull request.

New%20session%20-%202025-10-16T19%3A27%3A56.623Z
opencode session  |  github run

@rekram1-node
Copy link
Collaborator

/oc remove the tip / note

Copy link
Contributor

opencode-agent bot commented Oct 16, 2025

Done! I've removed the Deno LSP precedence note from the documentation.

New%20session%20-%202025-10-16T23%3A00%3A25.763Z
opencode session  |  github run

Co-authored-by: rekram1-node <[email protected]>
@rekram1-node rekram1-node changed the title feat: support Deno projects with proper LSP detection feat: deno lsp Oct 16, 2025
@rekram1-node rekram1-node merged commit 92d9a0e into sst:dev Oct 16, 2025
3 checks passed
@hugiex
Copy link
Contributor Author

hugiex commented Oct 17, 2025

Sorry for the late response — probably because of the time zone difference. Btw, many thanks for updating the doc 🥰

@rekram1-node
Copy link
Collaborator

hey no probs, I was testing to see if it would work hahaga

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