fix: use correct python identation (#1666)

* Fix python identation bug caused by #1411

* Added entry to CHANGELOG.md

* Update python indentation to pep8 and fix comment

* Updated CHANGELOG.md to match
This commit is contained in:
Assistant 2022-11-08 15:10:21 -04:00 committed by GitHub
parent fd361abf6b
commit 9026987880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -12,6 +12,7 @@
### Bug Fixes
- [#1588](https://github.com/lapce/lapce/issues/1588): Fixed an issue where new windows would never be created after closing all windows on macOS.
- [#1637](https://github.com/lapce/lapce/issues/1637): Fix python using 7 spaces instead of 4 spaces to indent
## 0.2.2

View File

@ -84,7 +84,7 @@ struct SyntaxProperties {
injection: Option<&'static str>,
/// The comment token. "#" for python, "//" for rust for example.
comment: &'static str,
/// The indent unit. "\t" for python, " " for rust, for example.
/// The indent unit. " " for javascript, " " for rust, for example.
indent: &'static str,
/// TODO: someone more knowledgeable please describe what the two lists are.
/// Anyway, the second element of the tuple is a "ignore list". See
@ -626,7 +626,7 @@ pub enum LapceLanguage {
highlight: tree_sitter_python::HIGHLIGHT_QUERY,
injection: None,
comment: "#",
indent: " ",
indent: " ",
code_lens: (
&[
"source_file",
@ -676,7 +676,6 @@ pub enum LapceLanguage {
indent: " ",
code_lens: (DEFAULT_CODE_LENS_LIST, DEFAULT_CODE_LENS_IGNORE_LIST),
sticky_headers: &["module", "class", "method", "do_block"],
extensions: &["rb"],
},
#[cfg(feature = "lang-rust")]