-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
feat: CodeMirror plugin for Klipper Documentation tooltip links in editor #1898
base: develop
Are you sure you want to change the base?
Conversation
Language file analysis report:
|
Language file analysis report:
|
I have never tried to submit a PR like this to a popular repo, so please be kind if I am not doing it correctly. I didn't mean to set it for review, unless, that was correct. I will leave this as a draft for now since I assume it might need more work... |
@khill-fbmc thank you very much for this PR! I think this is a very useful function for the editor! i've only looked at it briefly so far, but what immediately caught my eye is the long list of possible Klipper modules. would it be possible to make this list “dynamic”? i.e. simply link to the Klipper docs in general, even if this module doesn't exist? this would just minimize the effort to update this list. |
Thank you! I agree that trying to maintain a list of module names was not optimal. I had ChatGPT extract them from the docs page just to see if it would work. I will work out a better solution and remove the big array of keywords. My thought process was to avoid having any tooltip generate a link that might be a 404. |
Language file analysis report:
|
I just noticed this, maybe I could use it instead of my hard-coded URL |
i had a little more time today to take a closer look at the PR and i noticed the following things:
Thank you very much and feel free to ping me, if you need help. |
I have not forgotten this. I am just ADHD and things sit longer than I realize :) |
@khill-fbmc no problem! Take the time you need for this PR. |
Description
This PR adds the following features:
printer.cfg
file, if you hover over a section heading, like[printer]
you will get native CodeMirror tooltips, with a direct link to the corresponding section in the Klipper Documentation.Editor
that enables the toggling of the tooltips if you do not want them.Desktop Screenshots
Editor Before
Editor After
Settings Before
Settings After
Note
I am not the happiest with how the actual code is written for the CodeMirror plugin in
CodeMirrorPluginKlipperDocsTooltips.ts
, so this PR is the POC / MVP of the idea to see if it has any interest.PS: I am also terrible with naming files, I apologize that it is so long, heh