Fix kts files not being recognized

This commit is contained in:
Pierce Thompson 2022-11-01 00:24:59 -04:00
parent b80fc412cf
commit 8c9a6aa68d
No known key found for this signature in database
GPG Key ID: DE7B142038838B49
3 changed files with 4 additions and 2 deletions

View File

@ -47,6 +47,7 @@
- [#1477](https://github.com/lapce/lapce/pull/1477): Now use `esc` to close searchbar regarless of the current focus
- [#1507](https://github.com/lapce/lapce/pull/1507): Fixed a crash when scratch buffer is closed
- [#1547](https://github.com/lapce/lapce/pull/1547): Fix infinite cycle in workspace symbol search
- [#1628](https://github.com/lapce/lapce/pull/1541): Fix kts files not being recognized
## 0.2.1

View File

@ -515,7 +515,7 @@ pub enum LapceLanguage {
indent: " ",
code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST),
sticky_headers: &[],
extensions: &["kt"],
extensions: &["kt", "kts"],
},
#[cfg(feature = "lang-latex")]
SyntaxProperties {
@ -1187,7 +1187,7 @@ fn test_latex_lang() {
}
#[cfg(feature = "lang-kotlin")]
fn test_kotlin_lang() {
assert_language(LapceLanguage::Kotlin, &["kt"]);
assert_language(LapceLanguage::Kotlin, &["kt", "kts"]);
}
#[cfg(feature = "lang-vue")]
fn test_vue_lang() {

View File

@ -204,6 +204,7 @@ pub fn language_id_from_path(path: &Path) -> Option<&'static str> {
"jsx" => "javascriptreact",
"json" => "json",
"jl" => "julia",
"kt" | "kts" => "kotlin",
"less" => "less",
"lua" => "lua",
"makefile" | "gnumakefile" => "makefile",