PHP code validation

Marc Serra mserra at manxa.com
Tue Feb 13 10:31:20 GMT 2024


Thank's Kåre,

I tested your idea and it works!

I created a file with this three lines for each project:

#!/bin/bash
sshfs user at server.tld:/path/ ~/dev/path/
kate ~/dev/path/

Is this the best way to speed up the process of mount filesystem and open kate?

When I logout or shutdown my laptop, all mounts are unmounted automatically.



Missatge de Kåre Särs <kare.sars at mailbox.org> del dia dt., 13 de febr.
2024 a les 10:47:

>
> On tisdag 13 februari 2024 11:02:54 EET Marc Serra wrote:
> > I have sung victory too soon :(
> >
> > phpactor works for local files but no for sftp development [1]
> >
> > I also tried the other Language Servers listed in
> > https://langserver.org/, but not with optimal results...
> >
> > php language server [2] -> requires php7.1 and my workstation and
> > development must use php8.1
> > serenata [3] ->  requires php7.1 and my workstation and development
> > must use php8.1
> > crane [4] -> seems discountinued (latest version is more than 7 years old)
> > psalm [5] -> I cannot get it working to test it :(
> >
> > Any ideas?
> >
> > My requirements are not too complicated. I want to develop little PHP
> > projects with kate with SSH (SFTP), code linting and code auto
> > indentation.
> >
>
> The problem is probably that Language Server cannot access the files and
> environment where the files are on the remote server.
>
> I think the easiest way to get that remote project running might be to mount
> the folder somehow. Like for example with "sshfs remote.server/path local/
> path". That gives the local LS a chance to read the files.
>
> /Kåre
>
> > Thank's!
> >
> > [1] https://github.com/phpactor/phpactor/discussions/2544
> > [2] https://github.com/felixfbecker/php-language-server
> > [3] https://gitlab.com/Serenata/Serenata
> > [4] https://github.com/HvyIndustries/crane/tree/master/server
> > [5] https://github.com/vimeo/psalm
> >
> > Missatge de Marc Serra <mserra at manxa.com> del dia dt., 13 de febr.
> >
> > 2024 a les 8:47:
> > > Finally I got linting for PHP code on Kate working!
> > >
> > > I installed phpactor [1] on my workstation and added this lines to
> > > ~/.config/kate/Ispclient/settings.json
> > >
> > > {
> > >
> > >     "servers": {
> > >
> > >         "php": {
> > >
> > >             "command": ["phpactor", "language-server"],
> > >             "rootIndicationFileNames": ["composer.json", "composer.lock"],
> > >             "url": "https://github.com/phpactor/phpactor",
> > >             "highlightingModeRegex": "^PHP.*$"
> > >
> > >         }
> > >
> > >    }
> > >
> > > }
> > >
> > > Thank's for your guidance and thank's to all Kate developers!
> > >
> > >
> > > [1] https://github.com/phpactor/phpactor
> > >
> > >
> > > Missatge de Marc Serra <mserra at manxa.com> del dia dl., 12 de febr.
> > >
> > > 2024 a les 12:29:
> > > > Thank's for your quick answer,
> > > >
> > > > I'm new to LSP.
> > > >
> > > > I can see some LSP servers on kate options, but not a default PHP
> > > > server.
> > > >
> > > > Is there some PHP LSP server online? line for bash ...
> > > >
> > > > "bash": {
> > > >
> > > > "command": ["bash-language-server", "start"],
> > > >
> > > > "root": "",
> > > >
> > > > "url": "https://github.com/bash-lsp/bash-language-server",
> > > >
> > > > "highlightingModeRegex": "^Bash$"
> > > >
> > > > }
> > > >
> > > >
> > > > Or I must install a LSP PHP server on my own server?
> > > >
> > > >
> > > > Thank's
> > > >
> > > > Missatge de Waqar Ahmed <waqar.17a at gmail.com> del dia dl., 12 de febr.
> 2024 a les 12:11:
> > > >> If you use a php language server that supports linting php code, then
> > > >> yes. We have a language server plugin that can be used for
> > > >> intellisense and other helpful features. See: -
> > > >> https://langserver.org/
> > > >> -
> > > >> https://docs.kde.org/stable5/en/kate/kate/kate-application-plugin-lspc
> > > >> lient.html> >>
> > > >> On Mon, Feb 12, 2024 at 3:59 PM Marc Serra <mserra at manxa.com> wrote:
> > > >>> Hi,
> > > >>>
> > > >>> Kate supports code validation for PHP language?
> > > >>>
> > > >>> For example, if I write:
> > > >>> <?php
> > > >>> echo "hello world;
> > > >>> ?>
> > > >>>
> > > >>> I want to kate show a message or mark the line with the error because
> > > >>> there is a missing double quote.
> > > >>>
> > > >>> Thank's
>
>
>
>

-- 


   
  
  
      <https://www.manxa.com>

     Manxa 1876, S.L.
Ctra. Les 
Tries, 85.17800 Olot (Girona)
*Tel. 972 27 45 30 www.manxa.com 
<https://www.manxa.com>* 

     <https://www.manxaindustrial.com> *Manxa 
Industrial <https://www.manxaindustrial.com>*
 
<https://www.manxaferros.com>  *Manxa Ferros <https://www.manxaferros.com>*
 <https://www.manxabricolatge.com>  *Manxa Ferreteria i Parament de la Llar 
<https://www.manxabricolatge.com>*

  

  



-- 


El contingut d’aquest correu electrònic i els seus annexos és 
estrictament confidencial. En el cas que no siguis el destinatari i hagis 
rebut aquest missatge per error, preguem que ho comuniquis al remitent i 
procedeixis a la seva eliminació, sense difondre, emmagatzemar o copiar el 
seu contingut. Imprimeix aquest correu només si és necessari.

El contenido 
de este correo electrónico y sus anexos es estrictamente confidencial. En 
el caso de que no seas el destinatario y hayas recibido este mensaje por 
error, rogamos lo comuniques al remitente y procedas a su eliminación, sin 
difundir, almacenar o copiar su contenido. Imprimir este correo solo si es 
necesario.

The content of this email and its attachments is strictly 
confidential. If you are not the recipient and you have received this 
message by mistake, please notify the sender and proceed to its 
elimination, without spreading, storing or copying its content. Print this 
email only if necessary.

Le contenu de cet e-mail et de ses pièces jointes 
est strictement confidentiel. Dans le cas où vous n'êtes pas le 
destinataire et avez reçu ce message par erreur, veuillez en informer 
l'expéditeur et procéder à sa suppression, sans diffuser, stocker ou copier 
son contenu. Imprimez cet e-mail uniquement si nécessaire.


More information about the KWrite-Devel mailing list