Providing LSP capabilities in HTML templating (jinja2)
Posted by slassr@reddit | Python | View on Reddit | 3 comments
[removed]
Posted by slassr@reddit | Python | View on Reddit | 3 comments
[removed]
EternityForest@reddit
Lack of integration between Python and Jinja2 is currently one of most annoying developer experience issues, besides UV not supporting putting frozen dependencies in wheels.
But the issue is bigger than just the LSP. There's also no linting, no type checks... Nothing.
What would be really cool is to compile a template into a Python file as a separate build step, much as I don't like separate build steps, make the generated file readable and contain all the original templates code as comments, and then use that directly so you never have to leave just regular old Python, and all your code quality tools work.
Writing the template would still be annoying, so you'd ideally have LSP support still.
But in reality, I've been really enjoying pure client side templating with only APIs and static resources on the server.
NixonInnes@reddit
Or write your HTML with python.
https://github.com/NixonInnes/pythoml
(This is a shameless plug)
AutoModerator@reddit
Hi there, from the /r/Python mods.
It looks like you are asking for help. We suggest re-reading the r/Python rules and directing all help or "How do I...?"-type questions to r/LearnPython. Found: "I would like to"
If this is not the case, please contact a moderator to review your post.
Warm regards and all the best for your future Pythoneering,
/r/Python moderator team
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.