Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

syntax highlighting #41

Closed
TestUser013 opened this issue Dec 21, 2015 · 7 comments
Closed

syntax highlighting #41

TestUser013 opened this issue Dec 21, 2015 · 7 comments

Comments

@TestUser013
Copy link

Hello,
How to use own syntax highlighting schema? I can modify user lang OpenEdgeABL , but all my changes had been rolling back after restarting np++ .

@jcaillon
Copy link
Owner

Hello,

I'm not sure exactly what you intend to do;
The way the syntax highlighting works at the moment is :
at each start of the plugin, it will try to modify the file : userDefineLang.xml to add a user language called OpenEdgeABL (as of v1.0.0.0 the plugin will crash if it can't access the file in writing!!! You must have the rights to write in this file with your windows user, this will be fixed in v1.1).

If you manually edit the language definition in the userDefineLang.xml it will be erased, because the plugin overwrite the userLanguage with the name OpenEdgeABL at each shutdown of npp.

So at the moment, you are FORCED to use the syntax i defined; but as i see it can be problematic, i will find an alternative solution for the stable release.

Please tell me if i didn't understand your question right.

and make sure userDefineLang.xml is accessible (Right click on file > Security > Check what's needed to allow total control to current user) or you won't even be able to load the plugin! :)

@TestUser013
Copy link
Author

Thanks for the quick response. You understand my question correctly. I want be able to edit standard color scheme :)

And I think, you should add in to folding code 2 style "DO FOR" and "EDITING" keywords.

For examle bloks editing:end and do for:end shoud be able to folding:
prompt-for {..........}
editing:
{..........}
{..........}
end.
{..........}
do for buffer_name:
{..........}
end.

ps: your plugin is the best of the best, thank you! :)

@jcaillon
Copy link
Owner

Thank you very much for the support, i appreciate it! I'm glad this can be useful to you :)

I will make sure to add an option to not overwrite the User Defined Language at each shutdown so you can modify it as you wish (this modification will come with release v1.1).

Also note that using a UDL is only a temporary solution, i'm working toward a custom lexer inside the plugin, but as it is not a priority i don't know when i'll implement it!

Thanks for the EDITING keyword, i never used it so i missed it, i added it to the UDL so you can fold the code! As for the DO FOR BUFFER, it already work with the UDL i defined :

image

I'm closing the issue, see you in v1.1.0! ^^

jcaillon added a commit that referenced this issue Dec 21, 2015
- Fix several minor bugs (from the auto generated report)
- Fixed lexer to correctly read end of statement again (was broken at the last commit)
- Corrected issues : #32, #29, #33, #27, #36, #35, #32,
- Now correctly handles errors if 3P failed to write in userDefineLang.xml (which would cause 3P to fail loading)
- #41 : adding support for the key word EDITING (code folding + correct block indentation
- #39 : you can now open the main application window from any file (instead of only progress files before)
@jcaillon
Copy link
Owner

FYI,

The behavior in v1.1.0 will be :
Install UDL if it doesn't exist in the userdefinedlang.xml,
Update it only when 3P updates and only if the option is set :

image

That way you can modify to whatever you like.
I'm curious tho, what modifications do you want to make? :)

@TestUser013
Copy link
Author

I just wanted use colors and font from other colors scheme.
It`s color scheme (dark) created by J-Fobos http://rghost.ru/8wjXxHxqx and I like to use this scheme.
If you want, you can include this scheme in to your plugin, J-Fobos will not mind.

This color scheme based on https://github.com/ccleaud/ProgressABL-for-Notepad-plusplus

@jcaillon
Copy link
Owner

Ok! I already have everything needed to create new themes for the application and syntax highlighting, ill make sure to include this theme asap ^^

This guy's name ccleaud sounds familiar ;P

@ccleaud
Copy link

ccleaud commented Dec 31, 2015

^^

jcaillon referenced this issue Oct 21, 2017
- missing keyword : "FILE-INFO" as an abbreviation of "FILE-INFORMATION"
- Corrected a bug that caused the plugin to be enable to run normally when the user modified a file from an external editor and then reloaded it in npp

**New features**

Adding a disclaimer in the about page
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants