blob: 2fed31e4d54390da68ff4271640fab7ebd51f73e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)
}
}
|