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"],
|
||||
),
|
||||
extensions: &["py"],
|
||||
extensions: &["py", "pyi", "pyc", "pyd", "pyw"],
|
||||
},
|
||||
#[cfg(feature = "lang-toml")]
|
||||
SyntaxProperties {
|
||||
|
@ -741,7 +741,7 @@ fn test_tsx_lang() {
|
|||
#[test]
|
||||
#[cfg(feature = "lang-python")]
|
||||
fn test_python_lang() {
|
||||
assert_language(LapceLanguage::Python, &["py"]);
|
||||
assert_language(LapceLanguage::Python, &["py", "pyi", "pyc", "pyd", "pyw"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -218,7 +218,7 @@ pub fn language_id_from_path(path: &Path) -> Option<&'static str> {
|
|||
"php" | "phtml" | "pht" | "phps" => "php",
|
||||
"ps1" | "ps1xml" | "psc1" | "psm1" | "psd1" | "pssc"
|
||||
| "psrc" => "powershell",
|
||||
"py" => "python",
|
||||
"py" | "pyi" | "pyc" | "pyd" | "pyw" => "python",
|
||||
"r" => "r",
|
||||
"rb" => "ruby",
|
||||
"rs" => "rust",
|
||||
|
|
Loading…
Reference in New Issue