diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
| commit | 5a8dbc6347b3541e84fe669b22c17ad3b715e258 (patch) | |
| tree | b148c450939688caaaeb4adac6f2faa1eaffe649 /info.go | |
| download | qwe-editor-5a8dbc6347b3541e84fe669b22c17ad3b715e258.tar.gz | |
Engage!
Diffstat (limited to 'info.go')
| -rw-r--r-- | info.go | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +package main + +// Provides a way to view all detected file types and their associated LSP +// (Language Server Protocol) configurations. + +import ( + "fmt" + "strings" +) + +// PrintInfo prints a summary table of all supported languages and their LSP setup. +func PrintInfo() { + // Table header. + fmt.Printf("%-15s %-10s %-20s\n", "Name", "LSP", "Command") + fmt.Println(strings.Repeat("-", 80)) + + for _, ft := range fileTypes { + lspEnabled := "no" + if ft.EnableLSP { + lspEnabled = "yes" + } + + lspCmd := ft.LSPCommand + // Append arguments if they exist (e.g., --stdio). + if len(ft.LSPCommandArgs) > 0 { + lspCmd += " " + strings.Join(ft.LSPCommandArgs, " ") + } + + fmt.Printf("%-15s %-10s %-20s\n", ft.Name, lspEnabled, lspCmd) + } +} |
