Documentation
¶
Overview ¶
Package config represents configuration management for language servers.
Index ¶
- type Config
- type Manager
- func (m *Manager) AddServer(name string, config *ServerConfig)
- func (m *Manager) GetServer(name string) (*ServerConfig, bool)
- func (m *Manager) GetServers() map[string]*ServerConfig
- func (m *Manager) LoadDefaults()
- func (m *Manager) LoadFromMap(data map[string]any) error
- func (m *Manager) RemoveServer(name string)
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Servers map[string]*ServerConfig `mapstructure:"servers"`
}
Config represents the overall configuration.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages configuration loading and access.
func (*Manager) AddServer ¶
func (m *Manager) AddServer(name string, config *ServerConfig)
AddServer adds or updates a server configuration.
func (*Manager) GetServer ¶
func (m *Manager) GetServer(name string) (*ServerConfig, bool)
GetServer returns a specific server configuration.
func (*Manager) GetServers ¶
func (m *Manager) GetServers() map[string]*ServerConfig
GetServers returns all server configurations.
func (*Manager) LoadDefaults ¶
func (m *Manager) LoadDefaults()
LoadDefaults loads default server configurations.
func (*Manager) LoadFromMap ¶
LoadFromMap loads configuration from a map (useful for testing).
func (*Manager) RemoveServer ¶
RemoveServer removes a server configuration.
type ServerConfig ¶
type ServerConfig struct {
Command string `mapstructure:"command"`
Args []string `mapstructure:"args"`
FileTypes []string `mapstructure:"filetypes"`
RootMarkers []string `mapstructure:"root_markers"`
Environment map[string]string `mapstructure:"environment"`
Settings map[string]any `mapstructure:"settings"`
InitOptions map[string]any `mapstructure:"init_options"`
EnableSnippets bool `mapstructure:"enable_snippets"`
SingleFileSupport bool `mapstructure:"single_file_support"`
}
ServerConfig represents the configuration for a language server.
Click to show internal directories.
Click to hide internal directories.