Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = "phpls" Version = "0.0.1-dev" SchemaLocation = "https://raw.githubusercontent.com/laytan/phpls/main/internal/config/phpls.schema.json" )
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(args []string)
Parse loads the configuration from all the config files, environment variables, cli flags, and defaults. Validates it and sets it co Current. Parse exits on its own when there were errors or invalid configuration values. args should be all the flags, not the program name or any subcommand name.
Types ¶
type Analyzer ¶
type Analyzer struct { Method DiagnosticsMethod `` /* 191-byte string literal not displayed */ Enabled bool `json:"enabled,omitempty" default:"true"` }
type Diagnostics ¶
type DiagnosticsMethod ¶
type DiagnosticsMethod string
const ( DiagnosticsOnSave DiagnosticsMethod = "ON_SAVE" DiagnosticsOnChange DiagnosticsMethod = "ON_CHANGE" )
type Schema ¶
type Schema struct { // TODO: implement usage of this. Php Php `json:"php,omitempty"` // TODO: implement usage of this. Phpcbf Phpcbf `json:"phpcbf,omitempty"` Diagnostics Diagnostics `json:"diagnostics,omitempty"` Extensions []string `` /* 237-byte string literal not displayed */ IgnoredDirectories []string `` /* 315-byte string literal not displayed */ Server Server `json:"server,omitempty"` Statsviz Statsviz `json:"statsviz,omitempty"` CachePath string `` /* 306-byte string literal not displayed */ DumpConfig bool `` /* 307-byte string literal not displayed */ LogsPath string `json:"-" flag:"-"` StubsPath string `json:"-" flag:"-"` PhpVersion *phpversion.PHPVersion `json:"-" flag:"-"` }
var Current *Schema
func DefaultWithoutComputed ¶
func DefaultWithoutComputed() *Schema
Click to show internal directories.
Click to hide internal directories.