Code Monkey home page Code Monkey logo

Comments (8)

monosans avatar monosans commented on June 10, 2024 1

Do you perhaps have a good recommendation what syntax highlighter to use for Django templates in VS Code?

I use batisteo.vscode-django, I have no problems with it.

the problem is the batisteo.vscode-django extension

As far as I know, snippets can require access to the clipboard, you can try digging in that direction.

from djlint-vscode.

monosans avatar monosans commented on June 10, 2024

Very strange, the extension does not use the clipboard in any way. Maybe djLint does, but I highly doubt it.

Hey, @christopherpickering, what do you think?

from djlint-vscode.

christopherpickering avatar christopherpickering commented on June 10, 2024

Hey @monosans , I was just checking this out as well. @monosans is right, there is no clipboard access in djlint through python or through the extension.

It seems like vscode in gitpod uses the clipboard. @medihack what browser + version are you using? I don't have any issues in safari, chrome, and firefix v107.

Have you tested other formatters to see if you get a similar message?

https://www.gitpod.io/docs/configure/user-settings/browser-settings

from djlint-vscode.

medihack avatar medihack commented on June 10, 2024

Hm, that's strange. I could replicate it on two different Windows 11 PCs with Firefox v111.0. It doesn't happen in Chrome. I investigated a bit further. It only happens when both batisteo.vscode-django and monosans.djlint extensions are enabled (I disabled all other extensions to be sure).
My VS Code settings file also has nothing special. See https://github.com/radexperts/adit/blob/dev/.vscode/settings.json The project is fully open source. So if you have a Gitpod account, you could simply give it a try (just spin up the dev brunch in a Gitpod container under FF, open e.g. 404.html and type some stuff in there).

from djlint-vscode.

christopherpickering avatar christopherpickering commented on June 10, 2024

Thanks for the repo - I'm testing it out.

First off, I opened an html file before the python deps finished installed an already got the message:

image

If I cancel out of the docker install (ctl+c in the terminal there) and then disable the python extension, and then install djlint with python -m pip install djlint, everything starts working:

image

image

So I'm wondering is there is something messy going on where gitpod passes into the docker python?

from djlint-vscode.

medihack avatar medihack commented on June 10, 2024

Thanks for looking into it. I will investigate it further, try to set up a minimal example and report back.

from djlint-vscode.

christopherpickering avatar christopherpickering commented on June 10, 2024

Cool! If you get closer to reproducing, I'm happy to help as well.

from djlint-vscode.

medihack avatar medihack commented on June 10, 2024

Ok, I tested it a lot now with a minimal example (https://github.com/medihack/djlint-clipboard) and the problem is indeed not the djlint extension, but the batisteo.vscode-django extension :-( I will open an issue over there, but it seems not too well maintained. Do you perhaps have a good recommendation what syntax highlighter to use for Django templates in VS Code?
And I am really sorry for wasting your time :-( Your extension works excellent.

from djlint-vscode.

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.