Skip to content

Commit cd61402

Browse files
committed
nvim: sort wantPaths
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 5e0e815 commit cd61402

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

nvim/api_test.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3841,33 +3841,24 @@ func testRuntime(v *Nvim) func(*testing.T) {
38413841
switch runtime.GOOS {
38423842
case "linux", "darwin":
38433843
if nvimVersion.Minor <= 5 {
3844-
home, err := os.UserHomeDir()
3845-
if err != nil {
3846-
t.Fatal(err)
3847-
}
38483844
oldRuntimePaths := []string{
3849-
filepath.Join(home, ".config", "nvim"),
38503845
filepath.Join("/etc", "xdg", "nvim"),
3851-
filepath.Join(home, ".local", "share", "nvim", "site"),
3846+
filepath.Join("/etc", "xdg", "nvim", "after"),
38523847
filepath.Join("/usr", "local", "share", "nvim", "site"),
3848+
filepath.Join("/usr", "local", "share", "nvim", "site", "after"),
38533849
filepath.Join("/usr", "share", "nvim", "site"),
38543850
filepath.Join("/usr", "share", "nvim", "site", "after"),
3855-
filepath.Join("/usr", "local", "share", "nvim", "site", "after"),
3856-
filepath.Join(home, ".local", "share", "nvim", "site", "after"),
3857-
filepath.Join("/etc", "xdg", "nvim", "after"),
3858-
filepath.Join(home, ".config", "nvim", "after"),
38593851
}
38603852
wantPaths = append(wantPaths, oldRuntimePaths...)
38613853
}
3862-
38633854
case "windows":
38643855
if nvimVersion.Minor <= 5 {
38653856
localAppDataDir := os.Getenv("LocalAppData")
38663857
oldRuntimePaths := []string{
38673858
filepath.Join(localAppDataDir, "nvim"),
3859+
filepath.Join(localAppDataDir, "nvim", "after"),
38683860
filepath.Join(localAppDataDir, "nvim-data", "site"),
38693861
filepath.Join(localAppDataDir, "nvim-data", "site", "after"),
3870-
filepath.Join(localAppDataDir, "nvim", "after"),
38713862
}
38723863
wantPaths = append(wantPaths, oldRuntimePaths...)
38733864
}

0 commit comments

Comments
 (0)