There is not an explanation of the multiple parameters that a CodeEditor instance can receive
Following suggestion at https://github.com/spyder-ide/spyder/pull/9897#discussion_r320016309
I would like to contribute on this if possible.
Thanks @Akashtyagi08 for wanting to help us with this!
@dalthviz, please guide @Akashtyagi08 on how to do approach this task.
Hi @Akashtyagi08 you should add a docstring for the setup_editor method of the CodeEditor. The contents could be something like:
"""
Set-up configuration for the CodeEditor instance.
Usually the parameters here are related with a configurable preference in the Preference Dialog and Editor configurations:
param_1: explanation/description
param_2: explanation/description
...
"""
For the params explanation/description an initial text could be:
linenumbers: Enable/Disable line number panel. Default Truelanguage: Set editor language for example python. Default Nonemarkers: Enable/Disable markers panel. Used to show elements like Code Analysis. Default Falsefont: Base font for the Editor to use. Default Nonecolor_scheme: Initial color scheme for the Editor to use. Default Nonewrap: Enable/Disable line wrap. Default Falsetab_mode: Enable/Disable using Tab as delimiter between word, Default Truestrip_mode: Default Falseintelligent_backspace: Default Trueautomatic_completions: Enable/Disable automatic completions. The behavior of the trigger of this the completions can be stablished with the two following kwargs. Default Trueautomatic_completions_after_chars: Number of charts to type to trigger an automatic completion. Default 3automatic_completions_after_ms: Number of milliseconds to pass before an autocompletion is triggered. Default 300completions_hint: Enable/Disable documentation hints for completions. Default True,completions_hint_after_ms: Number of milliseconds over a completion item to show the documentation hint. Default 500hover_hints: Enable/Disable documentation hover hints. Default Truecode_snippets: Enable/Disable code snippets completions. Default Truehighlight_current_line: Enable/Disable current line highlighting. Default Truehighlight_current_cell: Enable/Disable current cell highlighting. Default Trueoccurrence_highlighting: Default Truescrollflagarea: Default Trueedge_line: Enable/Disable vertical line to show max number of characters per line. Customizable number of columns in the following kwarg. Default Trueedge_line_columns: Number of columns/characters where the editor horizontal edge line will show. Default (79,)show_blanks: Enable/Disable blanks highlighting. Default Falseunderline_errors: Enable/Disable showing and underline to highlight errors. Default Falseclose_parentheses: Enable/Disable automatic parentheses closing insertion. Default Trueclose_quotes: Enable/Disable automatic closing of quotes . Default Falseadd_colons: Enable/Disable automatic addition of colons. Default Trueauto_unindent: Default Trueindent_chars: Characters to use for indentation. Default " "*4tab_stop_width_spaces: Default 4cloned_from: Editor instance used as template to instantiate this CodeEditor instance. Default Nonefilename: Initial filename to show. Default Noneoccurrence_timeout: Default 1500show_class_func_dropdown: Enable/Disable a Matlab like widget to show classes and functions available in the current file. Default Falseindent_guides: Enable/Disable highlighting of code indentation. Default Falsescroll_past_end: Enable/Disable possibility to scroll file passed its end. Default Falsedebug_panel: Enable/Disable debug panel. Default Truefolding: Enable/Disable code folding. Default TrueThere are some options which explanation/description is missing, but maybe @ccordoba12 @goanpeca or @andfoy could help (pinging them to check the list to complete it, and possible corrections/improvements to the ones I did).
There are some options which explanation/description missing
What options @dalthviz?
@ccordoba12 the ones I just put Default <value> like:
occurence_timeouttab_stop_width_spacesauto_unindentscrollflagareastrip_mode -> probably related with tab_mode?occurrence_highlightingintelligent_backspaceThanks @dalthviz for the explanation.
@ccordoba12 Waiting for your response on the above comment.
@dalthviz, please dig into the code and find what the missing parameters do (I don't have time to do that myself).
@Akashtyagi08 the missing initial descriptions:
occurrence_timeout : Timeout in milliseconds to start highlighting matches/occurrences for the current word under the cursor. Default 1500 ms.tab_stop_width_spaces: Enable/Disable using tabs for indentation. Default Trueauto_unindent: Enable/Disable automatically unindentation before else, elif, finally or except statements. Default Truescrollflagarea : Enable/Disable flag area that shows at the left of the scroll bar. Default Truestrip_mode: Enable/Disable striping trailing spaces when modifying the file. Default False occurrence_highlighting: Enable/Disable highlighting of current word occurrence in the fileintelligent_backspace: Enable/Disable automatically unindenting inserted text (unindenting happens if the leading text length of the line isn't module of the length of indentation chars being use). Default TrueWorking on it.
tab_stop_width_spaces: Enable/Disable using tabs for indentation. DefaultTrue
@dalthviz This seems to be a numerical parameter rather than Boolean.
Totally right @Akashtyagi08 ! Actually for that it should be something like:
tab_stop_width_spaces: Number of spaces a tab is equivalent. Default 4
Most helpful comment
Working on it.