@guy038, said in About attributes of the language node, in langs.xml:
Regarding the Lua language, the first line is :
I hope that it still works with this layout. Personally, I would expect this syntax :
… For the two languages mssql and sql, the commentLine attribute is moved at end of current line, after the commentStart and commentEnd attributes
Order of attributes is irrelevant to XML (even when parsed by the outdated tinyxml library used in N++)
The embedded Javascript and SearchResult languages do not have any extension ! I suppose that it’s on purpose ?
Since embedded Javascript is only for JavaScript embedded in HTML and similar files, it makes sense to not populate the ext attribute. And SearchResult even more so.
More generally, for a specific attribute, is the attribute="" syntax identical to the total absence of this attribute ?
As far as I know or can determine.
Regarding the backspaceUnindent attribute, it doesn’t seem used, by default, even for the two languages python and yaml which use the four space indentation
Don didn’t bother updating the XML to include the default value for all languages, because the code already assumes the default value.
That attribute will only show up on languages that you change the state of that option – or perhaps on languages where you change any of the langs.xml-related options in the GUI (I haven’t tested that).
Thus, the no status, for the powershell language seems useless, too !
If you toggle it on and then back off (there might have to be an exit/reload between; again, I haven’t tested specifically), it will first populate the attribute with the yes when you toggle it on (and then save settings), then it will populate with no when you toggle it back off (and then save settings).
Once Notepad++ has started tracking a given attribute in its XML settings, it will always write that value when it writes the associated XML on exit; the attribute-is-missing case is just to simplify handling installations that are being upgraded (so a person doesn’t have to re-create their langs.xml in order to be able to toggle that option), and Don made use of this to save the effort of adding that attribute to every language in the model XML file.
… however, looking at the langs.model.xml file, for the powershell language, I just see :
…
So, this may be a mistake on my part, although I don’t use the powershell language, yet !
Right now, the most recent commit for langs.model.xml is here, and it shows that powershell does not include that attribute. Which means for the no value to have shown up in your XML, you either toggled that option or you made some other change for powershell (knowingly or unknowingly).