Giter VIP home page Giter VIP logo

vscode-smarty's Introduction

Smarty syntax highlighting

This extensions adds support for syntax highlighting and snippets for the Smarty 3 templating language.

If you see a bug or have a feature request of what could be added feel free to let me know or create an issue.

Snippets available:

  • assign
  • block
  • break
  • capture
  • case
  • comment
  • debug
  • else
  • elseif
  • extends
  • foreach
  • if
  • ifelse
  • include
  • literal

HTML Intellisense and Suggestions

This is planned as an 'out of the box' feature, but it may take some time to achieve.

As a workaround use these settings in VS Code:

"emmet.syntaxProfiles": {
  "tpl": "html"
},
"emmet.triggerExpansionOnTab": true,

vscode-smarty's People

Contributors

imperez avatar jens1o avatar matthewpizza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-smarty's Issues

emmet support

I don't know anything about vs code extensions or I would attempt this code update myself.

To add html emmet to my .tpl files, I had to add this code to my User Settings

    "emmet.includeLanguages": {
      "smarty": "html"
    }

is it possible to make this default? Thanks for this extension too!

feature request : Create a language server to handle multiple templates

php developers handle not only Smarty but also many templates.
Smarty,Twig,Blade...etc
Is it possible to handle more than one?
Smarty:
File : .tpl
range : {}
Twig:
File : .twig
range : {% %}

Especially the two are very similar
Currently, there is no extended function handling multiple templates. Also weak because it does not have a language server.

Add html autocompletion

Hi guys,

is it possible to add html autocompletion on this plugin?
This is a feature already present in the standard vscode for html.

apr-10-2018 10-04-07

or this possible to achieve via settings/configurations?

Thank you very much,
Taj

Enable "HTML mirror cursor" and "F2 to rename tag" for .tpl files

Hello! As you probably already know, the last update of VS Code added two very cool features:

"HTML mirror cursor" and "F2 to rename tag"

The problem is that right this will work only if the Language Mode is set to HTML, so I asked the devs if they could make this work with Smarty syntax too, but they said the extension's author should implement this, like they already did for the XML syntax.

Do you think it would be possible to make your extension work with these new features?

Thanks a lot for your hard work! ๐Ÿ‘

There is no document formatter for smarty files installed

Hi, thank you for this great tool!

Can you tell how I can enable code formatting (alt+shift+f) for smarty files or at least handle it like HTML?
The emmet code snippet on the module page didn't help.

I think many users will have that problem.

Limited intellisens HTML suggestions

Hi. After I start using this extension - Smarty support in TPL files - vscode never give mi suggestion for some basic HTML tag any more. Like <table> for example.
What is going on? :] Any hints? Is it normal behaviour?

{* *} Comments not highlighted in the syntax

Has anyone else had issues with comments not properly being highlighted in the window?
I work with some heavy commented out code and the plugin doesn't appear to be picking up the syntax.

The project has no license yet.

I received an e-mail from a company wondering how they can use this project.

@imperez As the original author, what do you say? Based from what I saw from your work, I'd suggest GPL?
I'd then would add a new license, include it in various locations (README, package.json) and then file a new feature release to make it (kind of) official.

Is this maintained?

Hi, I'd like to improve this, but rather then fork it and use it on my own, I'd like to contribute back so that the install base of the extension can use it. Before doing that, I'd like to know that there's still somebody on the other end interested in this. ๐Ÿ˜„

Emmet/HTML snippets don't work

It works fine in PHP files but it doesn't in smarty *.tpl

image

I even have these settings:

"emmet.syntaxProfiles": {
			"tpl": "html"
		},
		// "emmet.includeLanguages": {
		// 	"smarty": "html"
		// },
		"emmet.triggerExpansionOnTab": true,

what's the deal?

commenting delimiters in a literal block

Hello, Great plugin, glad to see smarty still gets some love. I spotted a small issue when commenting out a section in a literal block using the shortcut keys for block commenting. the plugin uses the smarty delimiters of commenting ("{*" and "*}") instead of the language specific commenting delimiters

How to change brackets setting

Sorry if this is a newb question, but how do I configure the brackets setting. I tried adding the following to my user settings:

"smarty.brackets": ["[{", "}]"]

and also

"smarty": { "brackets": ["[{", "}]"] }

but nothing seems to work. I need the smarty tags to be like

[{ assign var="foo" value="bar" }]

Unknown function "include".

Hello!
I'm trying to integrate one Smarty template into another in the Visual Code environment. Here's what the development environment itself shows me as a mistake. Would you suggest me how to solve this problem?
include-problem

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.