[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php
From: |
Vincenzo Pupillo |
Subject: |
bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php |
Date: |
Sat, 08 Jun 2024 11:31:05 +0200 |
Hi Eli,
this is the patch update. I followed Stefan's advice and removed the
modification of the 'mode-line' and the comment in the 'php-ts-mode--syntax-
table'.
Thanks!
Vincenzo
In data venerdì 7 giugno 2024 17:05:58 CEST, Vincenzo Pupillo ha scritto:
> In data venerdì 7 giugno 2024 15:44:44 CEST, Eli Zaretskii ha scritto:
> > > From: Vincenzo Pupillo <v.pupillo@gmail.com>
> > > Cc: 71380@debbugs.gnu.org
> > > Date: Fri, 07 Jun 2024 14:50:24 +0200
> > >
> > > In data venerdì 7 giugno 2024 13:12:25 CEST, Eli Zaretskii ha scritto:
> > > > > > > +(defun php-ts-mode--array-element-heuristic (node parent bol
> > > > > > > &rest _)
> > > > > > > + "Return of the position of the first element of the array.
> > > > > >
> > > > > > The "of" part should be deleted here, I think.
> > > > >
> > > > > I'm not sure how to explain it. Different indentation styles indent
> > > > > the
> > > > > elements of an array differently when written on multiple rows. For
> > > > > example. in PSR2 it is like this:
> > > > > $a = array("a" => 1,
> > > > >
> > > > > "b" => 2,
> > > > > "c" => 3);
> > > > >
> > > > > while with Zend it is like this:
> > > > > $a = array("a" => 1,
> > > > >
> > > > > "b" => 2,
> > > > > "c" => 3);
> > > > >
> > > > > What do you suggest?
> > > >
> > > > What does the function return in each of these two cases?
> > >
> > > If '$a = array(' is on the same line as '“a” => 1,' it returns the
> > > initial position of '“a”, otherwise the starting position of 'array(',
> > > like PSR2.
> > > In terms of tree-sitter-php the first case is:
> > > (treesit-node-start (treesit-node-child parent 2))
> > > while the second is: parent indentation + offset.
> >
> > Does it return a buffer position or a column? You seem to say that
> > sometimes it returns the former and sometimes the latter.
>
> The point in both cases.
>
> Vincenzo
0001-Add-php-ts-mode.patch
Description: Text Data
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/05
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/06
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/07
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/07
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/07
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/07
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/07
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php,
Vincenzo Pupillo <=
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/08
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/08
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/09
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/09
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/09
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/09
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/09
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/12
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Eli Zaretskii, 2024/06/12
- bug#71380: 30.0.50; Submitting php-ts-mode, new major mode for php, Vincenzo Pupillo, 2024/06/13