Re: PHP code validation
Marc Serra <[email protected]> Tue, 13 Feb 2024 10:02:54 +0100
| Newsgroups | gmane.comp.kde.devel.kwrite |
|---|---|
| Message-ID | <CAD41RFYeprM3wMV808YFr5gA9h0-N-mRFW0TMx+UiQnCyG2WbA@mail.gmail.com> |
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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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-lspclient.html > >> > >> On Mon, Feb 12, 2024 at 3:59 PM Marc Serra <[email protected]> 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.