lsp

package
v0.0.0-...-6320ad3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLSPLanguageServer

func NewLSPLanguageServer(config *config.Config, language, rootPath string, logger *zap.Logger) (base.LSPClient, error)

Types

type BaseClient

type BaseClient struct {
	// contains filtered or unexported fields
}

func NewBaseClient

func NewBaseClient(command string, logger *zap.Logger, args ...string) (*BaseClient, error)

func (*BaseClient) Close

func (c *BaseClient) Close() error

func (*BaseClient) DidOpenFile

func (t *BaseClient) DidOpenFile(ctx context.Context, uri string) error

func (*BaseClient) GetCallHierarchy

func (t *BaseClient) GetCallHierarchy(ctx context.Context, uri string, fnName string, position base.Position, inbound bool) (*base.CallHierarchyIncomingOrgoingCalls, error)

func (*BaseClient) GetDocumentSymbols

func (t *BaseClient) GetDocumentSymbols(ctx context.Context, uri string) ([]interface{}, error)

func (*BaseClient) GetHover

func (t *BaseClient) GetHover(ctx context.Context, uri string, position base.Position) (*base.Hover, error)

func (*BaseClient) GetRootPath

func (t *BaseClient) GetRootPath() string

func (*BaseClient) Initialize

func (t *BaseClient) Initialize(ctx context.Context) (*base.InitializeResult, error)

func (*BaseClient) LanguageID

func (t *BaseClient) LanguageID(uri string) string

func (*BaseClient) SendNotification

func (c *BaseClient) SendNotification(method string, params interface{}) error

func (*BaseClient) Shutdown

func (t *BaseClient) Shutdown(ctx context.Context) error

func (*BaseClient) TestCommand

func (t *BaseClient) TestCommand(ctx context.Context)

type CSharpLanguageServerClient

type CSharpLanguageServerClient struct {
	*BaseClient
	// contains filtered or unexported fields
}

CSharpLanguageServerClient wraps the base LSP client for C# specific functionality

func NewCSharpLanguageServerClient

func NewCSharpLanguageServerClient(config *config.Config, rootPath string, logger *zap.Logger) (*CSharpLanguageServerClient, error)

NewCSharpLanguageServerClient creates a new C# language server client

func (*CSharpLanguageServerClient) GetRootPath

func (t *CSharpLanguageServerClient) GetRootPath() string

GetRootPath returns the root path for the C# project

func (*CSharpLanguageServerClient) IsExternalModule

func (t *CSharpLanguageServerClient) IsExternalModule(uri string) bool

IsExternalModule checks if the given URI points to an external module For C#, this includes NuGet packages and .NET SDK assemblies

func (*CSharpLanguageServerClient) LanguageID

func (t *CSharpLanguageServerClient) LanguageID(uri string) string

LanguageID returns the language identifier for LSP based on file extension

func (*CSharpLanguageServerClient) MatchSymbolByName

func (t *CSharpLanguageServerClient) MatchSymbolByName(name, nameInFile string) bool

MatchSymbolByName matches C# symbol names In C#, fully qualified names use dot notation (e.g., Namespace.Class.Method)

func (*CSharpLanguageServerClient) SymbolPartToMatch

func (t *CSharpLanguageServerClient) SymbolPartToMatch(name string) string

SymbolPartToMatch returns the part of the symbol name to use for matching

type GoLanguageServerClient

type GoLanguageServerClient struct {
	*BaseClient
	// contains filtered or unexported fields
}

func NewGoLanguageServerClient

func NewGoLanguageServerClient(config *config.Config, rootPath string, logger *zap.Logger) (*GoLanguageServerClient, error)

func (*GoLanguageServerClient) GetRootPath

func (t *GoLanguageServerClient) GetRootPath() string

func (*GoLanguageServerClient) IsExternalModule

func (t *GoLanguageServerClient) IsExternalModule(uri string) bool

func (*GoLanguageServerClient) LanguageID

func (t *GoLanguageServerClient) LanguageID(uri string) string

func (*GoLanguageServerClient) MatchSymbolByName

func (t *GoLanguageServerClient) MatchSymbolByName(name, nameInFile string) bool

func (*GoLanguageServerClient) SymbolPartToMatch

func (t *GoLanguageServerClient) SymbolPartToMatch(name string) string

type JavaLanguageServerClient

type JavaLanguageServerClient struct {
	*BaseClient
	// contains filtered or unexported fields
}

JavaLanguageServerClient wraps the base LSP client for Java specific functionality

func NewJavaLanguageServerClient

func NewJavaLanguageServerClient(config *config.Config, rootPath string, logger *zap.Logger) (*JavaLanguageServerClient, error)

NewJavaLanguageServerClient creates a new Java language server client (Eclipse JDT.LS)

func (*JavaLanguageServerClient) GetRootPath

func (t *JavaLanguageServerClient) GetRootPath() string

GetRootPath returns the root path for the Java project

func (*JavaLanguageServerClient) IsExternalModule

func (t *JavaLanguageServerClient) IsExternalModule(uri string) bool

IsExternalModule checks if the given URI points to an external module For Java, this includes Maven/Gradle dependencies and JDK classes

func (*JavaLanguageServerClient) LanguageID

func (t *JavaLanguageServerClient) LanguageID(uri string) string

LanguageID returns the language identifier for LSP based on file extension

func (*JavaLanguageServerClient) MatchSymbolByName

func (t *JavaLanguageServerClient) MatchSymbolByName(name, nameInFile string) bool

MatchSymbolByName matches Java symbol names In Java, fully qualified names use dot notation (e.g., com.example.MyClass.myMethod)

func (*JavaLanguageServerClient) SymbolPartToMatch

func (t *JavaLanguageServerClient) SymbolPartToMatch(name string) string

SymbolPartToMatch returns the part of the symbol name to use for matching

type LspService

type LspService struct {
	// contains filtered or unexported fields
}

func NewLspService

func NewLspService(config *config.Config, logger *zap.Logger) *LspService

func (*LspService) GetFunctionCallers

func (rs *LspService) GetFunctionCallers(ctx context.Context, repoName, relativePath, functionName string, depth int) (*model.CallGraph, error)

func (*LspService) GetFunctionCallsAndDefinitions

func (rs *LspService) GetFunctionCallsAndDefinitions(ctx context.Context,
	repoName string,
	targetFunction *model.FunctionDefinition) ([]model.FunctionDependency, error)

func (*LspService) GetFunctionDependencies

func (rs *LspService) GetFunctionDependencies(ctx context.Context, repoName, relativePath, functionName string, depth int) (*model.CallGraph, error)

func (*LspService) GetFunctionHovers

func (rs *LspService) GetFunctionHovers(ctx context.Context, repoName string, functions []model.FunctionDefinition) ([]string, error)

func (*LspService) PopulateCallGraphForFunction

func (rs *LspService) PopulateCallGraphForFunction(
	ctx context.Context,
	repoName string,
	fn *model.FunctionDefinition,
	depth int) (*model.CallGraph, error)

func (*LspService) PrepareLanguageServer

func (rs *LspService) PrepareLanguageServer(repoName string) error

PrepareLanguageServer initializes the language server for a repository upfront. This is useful for index building where we want to ensure the LSP is ready before processing begins, avoiding initialization delays during post-processing. If the language server is already initialized, this is a no-op.

type PythonLanguageServerClient

type PythonLanguageServerClient struct {
	*BaseClient
	// contains filtered or unexported fields
}

func NewPythonLanguageServerClient

func NewPythonLanguageServerClient(config *config.Config, rootPath string, logger *zap.Logger) (*PythonLanguageServerClient, error)

func (*PythonLanguageServerClient) GetRootPath

func (t *PythonLanguageServerClient) GetRootPath() string

func (*PythonLanguageServerClient) IsExternalModule

func (t *PythonLanguageServerClient) IsExternalModule(uri string) bool

func (*PythonLanguageServerClient) LanguageID

func (t *PythonLanguageServerClient) LanguageID(uri string) string

func (*PythonLanguageServerClient) MatchSymbolByName

func (t *PythonLanguageServerClient) MatchSymbolByName(name, nameInFile string) bool

func (*PythonLanguageServerClient) SymbolPartToMatch

func (t *PythonLanguageServerClient) SymbolPartToMatch(name string) string

type TypeScriptLanguageServerClient

type TypeScriptLanguageServerClient struct {
	*BaseClient
	// contains filtered or unexported fields
}

func NewTypeScriptLanguageServerClient

func NewTypeScriptLanguageServerClient(rootPath string, logger *zap.Logger) (*TypeScriptLanguageServerClient, error)

func (*TypeScriptLanguageServerClient) GetRootPath

func (t *TypeScriptLanguageServerClient) GetRootPath() string

func (*TypeScriptLanguageServerClient) IsExternalModule

func (t *TypeScriptLanguageServerClient) IsExternalModule(uri string) bool

func (*TypeScriptLanguageServerClient) LanguageID

func (t *TypeScriptLanguageServerClient) LanguageID(uri string) string

func (*TypeScriptLanguageServerClient) MatchSymbolByName

func (t *TypeScriptLanguageServerClient) MatchSymbolByName(name, nameInFile string) bool

func (*TypeScriptLanguageServerClient) SymbolPartToMatch

func (t *TypeScriptLanguageServerClient) SymbolPartToMatch(name string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL