Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 30, 2025

  • Implement auto-completion/intellisense for sing-box profile editing in LSP
  • Refactor to only provide reference completions (tags), delegate static enum completions to VSCode JSON LSP with sing-box schema (https://github.com/BlackDuty/sing-box-schema)

What this LSP now provides:

Reference completions (tags):

  • DNS server tags (dns.final, dns.servers[].address_resolver, dns.rules[].server)
  • Outbound tags (route.final, route.rules[].outbound, outbounds[].default, outbounds[].outbounds[], route.rule_set[].download_detour, dns.servers[].detour)
  • Inbound tags (route.rules[].inbound[])
  • Rule set tags (route.rules[].rule_set[])

What VSCode JSON LSP handles (via sing-box schema):

  • Static key completions
  • Enum value completions (type, log.level, dns.strategy, method, etc.)

Future:

  • Generation completions (UUID, public_key, etc.) can be added to this LSP
Original prompt

Following #file:singbox-config-internal-relations.md , implement auto-completion / intellisense in packages/lsp for editing sing-box profile.

The user has attached the following file paths as relevant context:

  • docs\singbox-config-internal-relations.md

Created from VS Code via the GitHub Pull Request extension.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 30, 2025 06:32
…n LSP

Co-authored-by: xiaoland <37663413+xiaoland@users.noreply.github.com>
Co-authored-by: xiaoland <37663413+xiaoland@users.noreply.github.com>
Copilot AI changed the title [WIP] Add auto-completion for sing-box profile editing Implement auto-completion/intellisense for sing-box profile editing in LSP Nov 30, 2025
Copilot AI requested a review from xiaoland November 30, 2025 06:36
Copy link
Owner

@xiaoland xiaoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot For key completion or static value completion, provide SingBox JSON schema (https://github.com/BlackDuty/sing-box-schema) to VSCode Json LSP. only completions like reference completion (eg. tag, outbound, server) or generation completion (eg. public_key, uuid, etc.) will requires our customize lsp.

…tatic enum completions to JSON schema

Co-authored-by: xiaoland <37663413+xiaoland@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

@copilot For key completion or static value completion, provide SingBox JSON schema (https://github.com/BlackDuty/sing-box-schema) to VSCode Json LSP. only completions like reference completion (eg. t...

Refactored in 489f811. The LSP now only provides reference completions (tags for inbound, outbound, DNS server, rule sets). Static enum completions (type, log level, DNS strategy, etc.) are delegated to VSCode's JSON LSP with the sing-box schema.

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