From kwrite-devel Tue Feb 13 09:02:54 2024 From: Marc Serra Date: Tue, 13 Feb 2024 09:02:54 +0000 To: kwrite-devel Subject: Re: PHP code validation Message-Id: X-MARC-Message: https://marc.info/?l=kwrite-devel&m=170781492513806 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. 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 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 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 serve= r. > > > > 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 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-ls= pclient.html > >> > >> On Mon, Feb 12, 2024 at 3:59=E2=80=AFPM Marc Serra = wrote: > >>> > >>> Hi, > >>> > >>> Kate supports code validation for PHP language? > >>> > >>> For example, if I write: > >>> >>> 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 > >>> --=20 =20 =20 =20 Manxa 1876, S.L. Ctra. Les=20 Tries, 85.17800 Olot (Girona) *Tel. 972 27 45 30 www.manxa.com=20 *=20 *Manxa=20 Industrial * =20 *Manxa Ferros * *Manxa Ferreteria i Parament de la Llar= =20 * =20 =20 --=20 El contingut d=E2=80=99aquest correu electr=C3=B2nic i els seus annexos =C3= =A9s=20 estrictament confidencial. En el cas que no siguis el destinatari i hagis= =20 rebut aquest missatge per error, preguem que ho comuniquis al remitent i=20 procedeixis a la seva eliminaci=C3=B3, sense difondre, emmagatzemar o copia= r el=20 seu contingut. Imprimeix aquest correu nom=C3=A9s si =C3=A9s necessari. El contenido=20 de este correo electr=C3=B3nico y sus anexos es estrictamente confidencial.= En=20 el caso de que no seas el destinatario y hayas recibido este mensaje por=20 error, rogamos lo comuniques al remitente y procedas a su eliminaci=C3=B3n,= sin=20 difundir, almacenar o copiar su contenido. Imprimir este correo solo si es= =20 necesario. The content of this email and its attachments is strictly=20 confidential. If you are not the recipient and you have received this=20 message by mistake, please notify the sender and proceed to its=20 elimination, without spreading, storing or copying its content. Print this= =20 email only if necessary. Le contenu de cet e-mail et de ses pi=C3=A8ces jointes=20 est strictement confidentiel. Dans le cas o=C3=B9 vous n'=C3=AAtes pas le= =20 destinataire et avez re=C3=A7u ce message par erreur, veuillez en informer= =20 l'exp=C3=A9diteur et proc=C3=A9der =C3=A0 sa suppression, sans diffuser, st= ocker ou copier=20 son contenu. Imprimez cet e-mail uniquement si n=C3=A9cessaire.