Skip to content

feat(tooling): add Language Server Protocol (LSP) implementation #7

@eddmann

Description

@eddmann

Summary

Implement a Language Server Protocol (LSP) server for santa-lang to enable IDE integration and editor support.

Description

Create an LSP server that provides rich language features for santa-lang in any LSP-compatible editor (VS Code, Neovim, Emacs, Helix, etc.).

Proposed Features

Core LSP Features

  • Syntax error diagnostics (real-time error highlighting)
  • Go to definition
  • Find references
  • Hover information (function signatures, types, documentation)
  • Auto-completion (keywords, builtins, user-defined symbols)
  • Document symbols (outline view)
  • Workspace symbols (project-wide search)

Advanced Features

  • Rename symbol (across files)
  • Code formatting (integrate with formatter when available)
  • Signature help (parameter hints)
  • Inlay hints (type annotations, parameter names)
  • Semantic highlighting
  • Code actions (quick fixes, refactorings)

Editor Extensions

  • VS Code extension packaging
  • Neovim configuration guide
  • Other editor setup documentation

CLI Interface

# Start the LSP server
santa lsp

# Start with specific transport
santa lsp --stdio
santa lsp --tcp --port 9257

Implementation Considerations

  • Build on existing parser/AST infrastructure
  • Use tower-lsp (Rust) or vscode-languageserver (TypeScript) depending on implementation
  • Incremental parsing for performance on large files
  • Consider caching for workspace-wide features

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions