mirror of https://github.com/lapce/lapce.git
fix: add missing python file extensions
Signed-off-by: Jakub Panek <me@panekj.dev>
This commit is contained in:
parent
09680ccdff
commit
980faad454
|
@ -268,7 +268,7 @@ pub enum LapceLanguage {
|
||||||
],
|
],
|
||||||
&["source_file", "import_statement", "import_from_statement"],
|
&["source_file", "import_statement", "import_from_statement"],
|
||||||
),
|
),
|
||||||
extensions: &["py"],
|
extensions: &["py", "pyi", "pyc", "pyd", "pyw"],
|
||||||
},
|
},
|
||||||
#[cfg(feature = "lang-toml")]
|
#[cfg(feature = "lang-toml")]
|
||||||
SyntaxProperties {
|
SyntaxProperties {
|
||||||
|
@ -741,7 +741,7 @@ fn test_tsx_lang() {
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "lang-python")]
|
#[cfg(feature = "lang-python")]
|
||||||
fn test_python_lang() {
|
fn test_python_lang() {
|
||||||
assert_language(LapceLanguage::Python, &["py"]);
|
assert_language(LapceLanguage::Python, &["py", "pyi", "pyc", "pyd", "pyw"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -218,7 +218,7 @@ pub fn language_id_from_path(path: &Path) -> Option<&'static str> {
|
||||||
"php" | "phtml" | "pht" | "phps" => "php",
|
"php" | "phtml" | "pht" | "phps" => "php",
|
||||||
"ps1" | "ps1xml" | "psc1" | "psm1" | "psd1" | "pssc"
|
"ps1" | "ps1xml" | "psc1" | "psm1" | "psd1" | "pssc"
|
||||||
| "psrc" => "powershell",
|
| "psrc" => "powershell",
|
||||||
"py" => "python",
|
"py" | "pyi" | "pyc" | "pyd" | "pyw" => "python",
|
||||||
"r" => "r",
|
"r" => "r",
|
||||||
"rb" => "ruby",
|
"rb" => "ruby",
|
||||||
"rs" => "rust",
|
"rs" => "rust",
|
||||||
|
|
Loading…
Reference in New Issue