6 "github.com/stretchr/testify/require"
9func TestApplyLSPDefaults(t *testing.T) {
12 // Create a config with an LSP that should get defaults
14 LSP: map[string]LSPConfig{
16 Command: "gopls", // This should get defaults from powernap
19 Command: "custom-lsp",
20 RootMarkers: []string{"custom.toml"}, // This should keep its explicit config
26 config.applyLSPDefaults()
28 // Check that gopls got defaults (it should have some root markers now)
29 goplsConfig := config.LSP["gopls"]
30 require.NotEmpty(t, goplsConfig.RootMarkers, "gopls should have received default root markers")
32 // Check that custom LSP kept its explicit config
33 customConfig := config.LSP["custom"]
34 require.Equal(t, []string{"custom.toml"}, customConfig.RootMarkers, "custom LSP should keep its explicit root markers")
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list