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 True
language
: Set editor language for example python
. Default None
markers
: Enable/Disable markers panel. Used to show elements like Code Analysis. Default False
font
: Base font for the Editor to use. Default None
color_scheme
: Initial color scheme for the Editor to use. Default None
wrap
: Enable/Disable line wrap. Default False
tab_mode
: Enable/Disable using Tab as delimiter between word, Default True
strip_mode
: Default False
intelligent_backspace
: Default True
automatic_completions
: Enable/Disable automatic completions. The behavior of the trigger of this the completions can be stablished with the two following kwargs. Default True
automatic_completions_after_chars
: Number of charts to type to trigger an automatic completion. Default 3
automatic_completions_after_ms
: Number of milliseconds to pass before an autocompletion is triggered. Default 300
completions_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 True
code_snippets
: Enable/Disable code snippets completions. Default True
highlight_current_line
: Enable/Disable current line highlighting. Default True
highlight_current_cell
: Enable/Disable current cell highlighting. Default True
occurrence_highlighting
: Default True
scrollflagarea
: Default True
edge_line
: Enable/Disable vertical line to show max number of characters per line. Customizable number of columns in the following kwarg. Default True
edge_line_columns
: Number of columns/characters where the editor horizontal edge line will show. Default (79,)
show_blanks
: Enable/Disable blanks highlighting. Default False
underline_errors
: Enable/Disable showing and underline to highlight errors. Default False
close_parentheses
: Enable/Disable automatic parentheses closing insertion. Default True
close_quotes
: Enable/Disable automatic closing of quotes . Default False
add_colons
: Enable/Disable automatic addition of colons. Default True
auto_unindent
: Default True
indent_chars
: Characters to use for indentation. Default " "*4
tab_stop_width_spaces
: Default 4
cloned_from
: Editor instance used as template to instantiate this CodeEditor instance. Default None
filename
: Initial filename to show. Default None
occurrence_timeout
: Default 1500
show_class_func_dropdown
: Enable/Disable a Matlab like widget to show classes and functions available in the current file. Default False
indent_guides
: Enable/Disable highlighting of code indentation. Default False
scroll_past_end
: Enable/Disable possibility to scroll file passed its end. Default False
debug_panel
: Enable/Disable debug panel. Default True
folding
: Enable/Disable code folding. Default True
There 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_timeout
tab_stop_width_spaces
auto_unindent
scrollflagarea
strip_mode
-> probably related with tab_mode
?occurrence_highlighting
intelligent_backspace
Thanks @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 True
auto_unindent
: Enable/Disable automatically unindentation before else
, elif
, finally
or except
statements. Default True
scrollflagarea
: Enable/Disable flag area that shows at the left of the scroll bar. Default True
strip_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 True
Working 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.