Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting for pipeline config #1082

Merged

Conversation

lafriks
Copy link
Contributor

@lafriks lafriks commented Aug 8, 2022

Screenshots:

attels

attels

@6543 6543 added server ui frontend related feature add new functionality labels Aug 8, 2022
@6543 6543 added this to the 1.0.0 milestone Aug 8, 2022
@anbraten
Copy link
Member

anbraten commented Aug 9, 2022

@lafriks Can we use prismjs to highlight yaml errors? I think it would be quite nice to show errors of the configuration using our editor/view in the long term.

@lafriks
Copy link
Contributor Author

lafriks commented Aug 9, 2022

@anbraten where are yaml errors displayed? you mean my other PR?

@anbraten
Copy link
Member

anbraten commented Aug 9, 2022

@lafriks Yep. The idea to show the config file and underline / highlight the incorrect part as you can see by the screenshot in #276. We could also use that to have some kind of an editor in the long term to allow users to paste and check their config without committing it.

@lafriks
Copy link
Contributor Author

lafriks commented Aug 9, 2022

I can add that later on when this is merged

@lafriks
Copy link
Contributor Author

lafriks commented Aug 9, 2022

Only drawback would be that it would require parsing yaml parser error messages

@lafriks lafriks force-pushed the feat/pipeline_config_highlight branch from 0f92b5f to 5b14fd4 Compare August 9, 2022 12:41
@anbraten
Copy link
Member

anbraten commented Aug 9, 2022

I can add that later on when this is merged

It's definitely a task for a new PR. I just wanted to make sure prismjs supports additional highlighting like this underline wave other editors use to show errors in general. Couldn't find this exact use-case from a short search, but it seems primsjs supports some kind of plugin mechanism that could be used for it.

@anbraten anbraten enabled auto-merge (squash) August 9, 2022 15:24
@anbraten anbraten merged commit 2e8f9e1 into woodpecker-ci:master Aug 9, 2022
@lafriks lafriks deleted the feat/pipeline_config_highlight branch August 9, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add new functionality server ui frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants