[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode c453932f32 139/212: Added TODO item
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode c453932f32 139/212: Added TODO item |
Date: |
Wed, 26 Jan 2022 01:51:14 -0500 (EST) |
branch: externals/phps-mode
commit c453932f3200bc12d186d7885a6fe70c99940d59
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Added TODO item
---
phps-mode-indent.el | 51 +++++++++++++++++++++++++++++++++------------------
1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 420e811238..c8a4d1db39 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -215,6 +215,9 @@
(previous-line-starts-with-closing-bracket
(phps-mode-indent--string-starts-with-closing-bracket
previous-line-string))
+ (previous-line-ends-with-closing-bracket
+ (phps-mode-indent--string-ends-with-closing-bracket
+ previous-line-string))
(previous-line-starts-with-opening-doc-comment
(phps-mode-indent--string-starts-with-opening-doc-comment
previous-line-string))
@@ -828,7 +831,6 @@
new-indentation
(- new-indentation tab-width tab-width)))
- ;; TODO Fix this
;; 'name' =>
;; $myObject->getName(),
;; 'age' =>
@@ -852,11 +854,11 @@
(end-of-line)
(forward-char -1)
- (message
- "at-line-start: %S"
- (buffer-substring-no-properties
- (line-beginning-position)
- (line-end-position)))
+ ;; (message
+ ;; "at-line-start: %S"
+ ;; (buffer-substring-no-properties
+ ;; (line-beginning-position)
+ ;; (line-end-position)))
(let ((not-found t)
(reference-line)
@@ -969,17 +971,17 @@
(phps-mode-indent--string-indentation
reference-line)))
- (message "is-array: %S" is-array)
- (message "is-function: %S" is-function)
- (message "not-found: %S" not-found)
- (message "reference-line: %S" reference-line)
- (message "reference-indentation: %S" reference-indentation)
- (message
- "at-line-end: %S"
- (buffer-substring-no-properties
- (line-beginning-position)
- (line-end-position)))
- (message "is-declared-on-same-line-p: %S"
is-declared-on-same-line-p)
+ ;; (message "is-array: %S" is-array)
+ ;; (message "is-function: %S" is-function)
+ ;; (message "not-found: %S" not-found)
+ ;; (message "reference-line: %S" reference-line)
+ ;; (message "reference-indentation: %S"
reference-indentation)
+ ;; (message
+ ;; "at-line-end: %S"
+ ;; (buffer-substring-no-properties
+ ;; (line-beginning-position)
+ ;; (line-end-position)))
+ ;; (message "is-declared-on-same-line-p: %S"
is-declared-on-same-line-p)
(when reference-indentation
(setq
@@ -1364,12 +1366,25 @@
;; ölöas
;; EOD
;; ));
+ ;; TODO Should backtrack to were bracket started
+ ;; TODO and use indentation from that line
((and
current-line-starts-with-closing-bracket
(not previous-line-ends-with-opening-bracket))
(setq
new-indentation
- (- new-indentation tab-width)))
+ (- new-indentation tab-width))
+
+ ;; if (
+ ;; myFunction(
+ ;; 'random')
+ ;; ) {
+ (when (and
+ previous-line-ends-with-closing-bracket
+ (not previous-line-starts-with-closing-bracket))
+ (setq
+ new-indentation
+ (- new-indentation tab-width))))
;; /**
;; * here
- [elpa] externals/phps-mode 2ea2360c3e 091/212: Created indent helper functions, (continued)
- [elpa] externals/phps-mode 2ea2360c3e 091/212: Created indent helper functions, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode df91b8e433 117/212: More handling of string-doc indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 6fac0d5585 102/212: Passed indent test for heredoc string, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1af63142f3 127/212: Fixed incremental issue with new SDT based bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3565c7efb3 125/212: Fixed byte-compilation warnings for indent file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode dece7f242e 160/212: Added more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8c1f529f87 145/212: Passing indent for line after ending of statement / expression with trailing closing bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d7aa22d251 146/212: Added two new failing tests for indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c453932f32 139/212: Added TODO item,
Christian Johansson <=
- [elpa] externals/phps-mode 8374026917 166/212: Improved indentation on lines starting with a closing square bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2afb7dc87a 002/212: Generating basic imenu-index via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 41b1566c40 010/212: Imenu generation via parser SDT passing more tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8f9870fb9b 013/212: Parser SDT does not use global variables, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 4753734b0a 006/212: Moved syntax coloring to separate file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d037aa09bc 023/212: Added bookkeeping via parser SDT foreach ($x as $y) {}, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3d54b6ff01 022/212: Passed another test for bookkeeping generated via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 442ad93cb2 018/212: Fix for function parameter formatting in AST, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2a4d5dea37 019/212: Passed bookkeeping of function arguments, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c29e35fea2 021/212: More work on bookkeeping, Christian Johansson, 2022/01/26