Git Product home page Git Product logo

Comments (10)

felixfbecker avatar felixfbecker commented on July 29, 2024 1

Don't select the code :)

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024 1

It currently is very opinionated about where you should have empty lines and where not
felixfbecker/php-language-server#29
felixfbecker/php-language-server#35

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

It would help if you could show the file you are trying to format.

from vscode-php-intellisense.

aga5tya avatar aga5tya commented on July 29, 2024

I tried it on a sample php files from the twig library trying to mess up the indentation. Doesn't work with that. Below is the link to a sample gist.

Link

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

animation

from vscode-php-intellisense.

sunverwerth avatar sunverwerth commented on July 29, 2024

@aga5tya
I just tried the gist and everything worked as expected.
I have the same configuration as you, except that I am running Windows 10.

from vscode-php-intellisense.

felixfbecker avatar felixfbecker commented on July 29, 2024

Do you have any other PHP formatter installed?

from vscode-php-intellisense.

sunverwerth avatar sunverwerth commented on July 29, 2024

Did you select the text before formatting? That is a feature that is currently not supported by this plugin.

from vscode-php-intellisense.

aga5tya avatar aga5tya commented on July 29, 2024

@felixfbecker I tried with a fresh copy of vs code with only intellisense plugin installed. Still does not work. Any specific logs i can share up? Are you on OSX ?

Also FYI, I am on this version of PHP.

PHP 7.0.11 (cli) (built: Oct 2 2016 00:32:27) ( NTS )

@madhed I tried both ways, not sure what is causing the issue. Let me check on a linux OS and see if it works there.

format-config

from vscode-php-intellisense.

aga5tya avatar aga5tya commented on July 29, 2024

@felixfbecker Thank you! That solved it. I could not get it done earlier since some portion or variable was always highlighted in mine.

Also one more concern, formatting does not preserve empty lines.

from vscode-php-intellisense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.