-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving view tests back to backend closes #4
- Loading branch information
Showing
13 changed files
with
573 additions
and
6,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016 The lime Authors. | ||
// Use of this source code is governed by a 2-clause | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
package sublime | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/limetext/sublime/textmate/theme" | ||
) | ||
|
||
// wrapper arount Theme implements backend.ColorScheme | ||
type colorScheme struct { | ||
*theme.Theme | ||
} | ||
|
||
func newColorScheme(path string) (*colorScheme, error) { | ||
if tm, err := theme.Load(path); err != nil { | ||
return nil, err | ||
} else { | ||
return &colorScheme{tm}, nil | ||
} | ||
} | ||
|
||
func (c *colorScheme) Name() string { | ||
return c.Theme.Name | ||
} | ||
|
||
func isColorScheme(path string) bool { | ||
if filepath.Ext(path) == ".tmTheme" { | ||
return true | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.