GNOME Bugzilla – Bug 561750
Ability to access contextual information about language type from GtkSourceView (e.g. HTML lines in .php files)
Last modified: 2021-07-05 11:00:48 UTC
Please describe the problem: The "Code Comment" plugin doesn't take into account HTML lines in .php files. Steps to reproduce: 1. Open gedit. 2. Create a .php file and save it. 3. Put an HTML line in the file, for example: <p>Test.</p> 4. Comment this HTML line with Ctrl+M Actual results: The line is commented like if it was PHP code: #<p>Test.</p> Expected results: The plugin should analyse the context (PHP line or HTML line) and correctly comment. For the previous example, we should obtain with Ctrl+M: <!-- <p>Test.</p> --> Does this happen every time? Yes. Other information:
The problem is that such contextual information can at the moment not be accessed (it is not even stored afaik) from GtkSourceView. This feature is very useful for a lot of plugins (like snippets, hopefully external tools at some point) which rely on context information.
(In reply to comment #1) > The problem is that such contextual information can at the moment not be > accessed (it is not even stored afaik) from GtkSourceView. This feature is very > useful for a lot of plugins (like snippets, hopefully external tools at some > point) which rely on context information. Should I open a feature request for GtkSourceView?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/ Thank you for your understanding and your help.