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 a compilation option to use KTextEditor for a built-in KSY editor #125

Open
KOLANICH opened this issue Aug 24, 2021 · 2 comments
Open

Comments

@KOLANICH
Copy link
Contributor

KOLANICH commented Aug 24, 2021

https://api.kde.org/frameworks/ktexteditor/html/

It has syntax highlighting for yaml and blocks folding. One needs to set mode (not highlight mode, but just mode) into YAML

For Windows probanly QScintilla can be used, but for KDE, I guess, it may make sense to use KTextEditor

Obstacles:

  1. there is no libqt5xml5-dev package in Debian & Ubuntu. How have they built KF* packages without that? Debian bug
  2. It seems CMake doesn't properly discover KF packages. The workaround is to provide paths to their dirs, but it is extremily strange.
@hello-adam
Copy link
Member

For a format as simple as YAML, it almost seems easier to just write a "mini-IDE" from scratch. That's probably dumb, but I might enjoy working on something like that for the fun/(rage).

@KOLANICH
Copy link
Contributor Author

I am not sure that a custom IDE for YAML (I assumme that the IDE you mean is not going to be a text editor (because for a source code editor there are already existing components and apps doing everything needed from a source code editor), but something like YAML AST editor (sokething like bencode-editor, but for yaml)) will be more convenieht to use than a generic source code editor with YAML support. AST editor has too many states, and hitting wrong keys in wrong states will break the document semantics, reapairing which will be hard using the means such an editor provides. So, more cognitive load and more stress. A text editor provides a simple generic text interface, and the document being edited is just a text, not necessarily oje of correct syntax (an AST editor gurantees the correctness of syntax, a text editor doesn't), but at least the semantics is not garbled, and the syntax is the thing that is easy to fix.

Of course, this argument doesn't apply if "mini-IDE" means just a text editor with YAML support, but in this case an another argument applies. It is a yet another dependency, which would consume disk space and ram and is a burden to maintain and even develop to the quality of existing solutions powered by big projects and multiple people.

So the best you can do is to reuse the effort of these people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants