hossaini310 / bootstrap-intellisense

MIT License
7 stars 2 forks source link

Manual BS version selection #14

Open stalker780 opened 2 months ago

stalker780 commented 2 months ago

Is there a way to manually select BS version for the project/folder? I am working with OpenCart4 and extension detects BS4.5, while BS5.3 is used in templates. It suggests me .float-left class instead of .float-start and other things from BS4.5

hossaini310 commented 1 month ago

Are you using bootstrap 4.5 anywhere in your project? because actually it takes the bootstrap version from node modules or from index.html

stalker780 commented 1 month ago

Nope. Only BS 5.3.3.

https://github.com/opencart/opencart

hossaini310 commented 1 month ago

I uploaded a new version 1.5.0 today, see if you still have the problem

stalker780 commented 1 month ago

@hossaini310 Was Bootstrap 4.5 now shows Bootstrap 4.5.3 in the status bar. Nothing changed so far.

hossaini310 commented 1 month ago

Unfortunately, I don't know why it isn't displayed correctly for you. Maybe you can test it in a new project.

For me, the version that I use in my project is displayed correctly.

stalker780 commented 1 month ago

As far as I understand your extension cannot recognize bs styles connected in php or twig files.

OC4: https://github.com/opencart/opencart/blob/72cdae5b3288b148b24fa7bd53a617b5445c34ab/upload/catalog/controller/common/header.php#L37

or OC3, this one does not detect BS version at all https://github.com/opencart/opencart/blob/f7006bf771fd59250c6724bdea2f81d83dbf03cf/upload/catalog/view/theme/default/template/common/header.twig#L21

That's sad. I have checked several extensions and liked yours the most. But alas it does not detect correct bs version.

As I mentioned before, perhaps you could plan a manual bs version selection for a project. This would solve this problem.

Anyway, thanks for your effort.

hossaini310 commented 1 month ago

Thank you. I will look for a solution and then let you know