1 /* UserPrefValues.cpp
2 *
3 * Copyright (C) 2021 by RStudio, PBC
4 *
5 * Unless you have received this program directly from RStudio pursuant
6 * to the terms of a commercial license agreement with RStudio, then
7 * this program is licensed to you under the terms of version 3 of the
8 * GNU Affero General Public License. This program is distributed WITHOUT
9 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
11 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
12 *
13 */
14
15 /* DO NOT HAND-EDIT! This file is automatically generated from the formal user preference schema
16 * JSON. To add a preference, add it to "user-prefs-schema.json", then run "generate-prefs.R" to
17 * rebuild this file.
18 */
19
20 #include <session/prefs/UserPrefValues.hpp>
21
22 namespace rstudio {
23 namespace session {
24 namespace prefs {
25
26 /**
27 * Whether to run .Rprofile again after resuming a suspended R session.
28 */
runRprofileOnResume()29 bool UserPrefValues::runRprofileOnResume()
30 {
31 return readPref<bool>("run_rprofile_on_resume");
32 }
33
setRunRprofileOnResume(bool val)34 core::Error UserPrefValues::setRunRprofileOnResume(bool val)
35 {
36 return writePref("run_rprofile_on_resume", val);
37 }
38
39 /**
40 * Whether to save the workspace to an .Rdata file after the R session ends.
41 */
saveWorkspace()42 std::string UserPrefValues::saveWorkspace()
43 {
44 return readPref<std::string>("save_workspace");
45 }
46
setSaveWorkspace(std::string val)47 core::Error UserPrefValues::setSaveWorkspace(std::string val)
48 {
49 return writePref("save_workspace", val);
50 }
51
52 /**
53 * Whether to load the workspace when the R session begins.
54 */
loadWorkspace()55 bool UserPrefValues::loadWorkspace()
56 {
57 return readPref<bool>("load_workspace");
58 }
59
setLoadWorkspace(bool val)60 core::Error UserPrefValues::setLoadWorkspace(bool val)
61 {
62 return writePref("load_workspace", val);
63 }
64
65 /**
66 * The initial working directory for new R sessions.
67 */
initialWorkingDirectory()68 std::string UserPrefValues::initialWorkingDirectory()
69 {
70 return readPref<std::string>("initial_working_directory");
71 }
72
setInitialWorkingDirectory(std::string val)73 core::Error UserPrefValues::setInitialWorkingDirectory(std::string val)
74 {
75 return writePref("initial_working_directory", val);
76 }
77
78 /**
79 * The CRAN mirror to use.
80 */
cranMirror()81 core::json::Object UserPrefValues::cranMirror()
82 {
83 return readPref<core::json::Object>("cran_mirror");
84 }
85
setCranMirror(core::json::Object val)86 core::Error UserPrefValues::setCranMirror(core::json::Object val)
87 {
88 return writePref("cran_mirror", val);
89 }
90
91 /**
92 * The name of the default Bioconductor mirror.
93 */
bioconductorMirrorName()94 std::string UserPrefValues::bioconductorMirrorName()
95 {
96 return readPref<std::string>("bioconductor_mirror_name");
97 }
98
setBioconductorMirrorName(std::string val)99 core::Error UserPrefValues::setBioconductorMirrorName(std::string val)
100 {
101 return writePref("bioconductor_mirror_name", val);
102 }
103
104 /**
105 * The URL of the default Bioconductor mirror.
106 */
bioconductorMirrorUrl()107 std::string UserPrefValues::bioconductorMirrorUrl()
108 {
109 return readPref<std::string>("bioconductor_mirror_url");
110 }
111
setBioconductorMirrorUrl(std::string val)112 core::Error UserPrefValues::setBioconductorMirrorUrl(std::string val)
113 {
114 return writePref("bioconductor_mirror_url", val);
115 }
116
117 /**
118 * Whether to always save the R console history.
119 */
alwaysSaveHistory()120 bool UserPrefValues::alwaysSaveHistory()
121 {
122 return readPref<bool>("always_save_history");
123 }
124
setAlwaysSaveHistory(bool val)125 core::Error UserPrefValues::setAlwaysSaveHistory(bool val)
126 {
127 return writePref("always_save_history", val);
128 }
129
130 /**
131 * Whether to remove duplicate entries from the R console history.
132 */
removeHistoryDuplicates()133 bool UserPrefValues::removeHistoryDuplicates()
134 {
135 return readPref<bool>("remove_history_duplicates");
136 }
137
setRemoveHistoryDuplicates(bool val)138 core::Error UserPrefValues::setRemoveHistoryDuplicates(bool val)
139 {
140 return writePref("remove_history_duplicates", val);
141 }
142
143 /**
144 * Show the result of the last expression (.Last.value) in the Environment pane.
145 */
showLastDotValue()146 bool UserPrefValues::showLastDotValue()
147 {
148 return readPref<bool>("show_last_dot_value");
149 }
150
setShowLastDotValue(bool val)151 core::Error UserPrefValues::setShowLastDotValue(bool val)
152 {
153 return writePref("show_last_dot_value", val);
154 }
155
156 /**
157 * The line ending format to use when saving files.
158 */
lineEndingConversion()159 std::string UserPrefValues::lineEndingConversion()
160 {
161 return readPref<std::string>("line_ending_conversion");
162 }
163
setLineEndingConversion(std::string val)164 core::Error UserPrefValues::setLineEndingConversion(std::string val)
165 {
166 return writePref("line_ending_conversion", val);
167 }
168
169 /**
170 * Whether to use newlines when saving Makefiles.
171 */
useNewlinesInMakefiles()172 bool UserPrefValues::useNewlinesInMakefiles()
173 {
174 return readPref<bool>("use_newlines_in_makefiles");
175 }
176
setUseNewlinesInMakefiles(bool val)177 core::Error UserPrefValues::setUseNewlinesInMakefiles(bool val)
178 {
179 return writePref("use_newlines_in_makefiles", val);
180 }
181
182 /**
183 * The terminal shell to use on Windows.
184 */
windowsTerminalShell()185 std::string UserPrefValues::windowsTerminalShell()
186 {
187 return readPref<std::string>("windows_terminal_shell");
188 }
189
setWindowsTerminalShell(std::string val)190 core::Error UserPrefValues::setWindowsTerminalShell(std::string val)
191 {
192 return writePref("windows_terminal_shell", val);
193 }
194
195 /**
196 * The terminal shell to use on POSIX operating systems (MacOS and Linux).
197 */
posixTerminalShell()198 std::string UserPrefValues::posixTerminalShell()
199 {
200 return readPref<std::string>("posix_terminal_shell");
201 }
202
setPosixTerminalShell(std::string val)203 core::Error UserPrefValues::setPosixTerminalShell(std::string val)
204 {
205 return writePref("posix_terminal_shell", val);
206 }
207
208 /**
209 * The fully qualified path to the custom shell command to use in the Terminal tab.
210 */
customShellCommand()211 std::string UserPrefValues::customShellCommand()
212 {
213 return readPref<std::string>("custom_shell_command");
214 }
215
setCustomShellCommand(std::string val)216 core::Error UserPrefValues::setCustomShellCommand(std::string val)
217 {
218 return writePref("custom_shell_command", val);
219 }
220
221 /**
222 * The command-line options to pass to the custom shell command.
223 */
customShellOptions()224 std::string UserPrefValues::customShellOptions()
225 {
226 return readPref<std::string>("custom_shell_options");
227 }
228
setCustomShellOptions(std::string val)229 core::Error UserPrefValues::setCustomShellOptions(std::string val)
230 {
231 return writePref("custom_shell_options", val);
232 }
233
234 /**
235 * Show line numbers in RStudio's code editor.
236 */
showLineNumbers()237 bool UserPrefValues::showLineNumbers()
238 {
239 return readPref<bool>("show_line_numbers");
240 }
241
setShowLineNumbers(bool val)242 core::Error UserPrefValues::setShowLineNumbers(bool val)
243 {
244 return writePref("show_line_numbers", val);
245 }
246
247 /**
248 * Highlight the selected word in RStudio's code editor.
249 */
highlightSelectedWord()250 bool UserPrefValues::highlightSelectedWord()
251 {
252 return readPref<bool>("highlight_selected_word");
253 }
254
setHighlightSelectedWord(bool val)255 core::Error UserPrefValues::setHighlightSelectedWord(bool val)
256 {
257 return writePref("highlight_selected_word", val);
258 }
259
260 /**
261 * Highlight the selected line in RStudio's code editor.
262 */
highlightSelectedLine()263 bool UserPrefValues::highlightSelectedLine()
264 {
265 return readPref<bool>("highlight_selected_line");
266 }
267
setHighlightSelectedLine(bool val)268 core::Error UserPrefValues::setHighlightSelectedLine(bool val)
269 {
270 return writePref("highlight_selected_line", val);
271 }
272
273 /**
274 * Layout of panes in the RStudio workbench.
275 */
panes()276 core::json::Object UserPrefValues::panes()
277 {
278 return readPref<core::json::Object>("panes");
279 }
280
setPanes(core::json::Object val)281 core::Error UserPrefValues::setPanes(core::json::Object val)
282 {
283 return writePref("panes", val);
284 }
285
286 /**
287 * Whether to enable the ability to add source columns to display.
288 */
allowSourceColumns()289 bool UserPrefValues::allowSourceColumns()
290 {
291 return readPref<bool>("allow_source_columns");
292 }
293
setAllowSourceColumns(bool val)294 core::Error UserPrefValues::setAllowSourceColumns(bool val)
295 {
296 return writePref("allow_source_columns", val);
297 }
298
299 /**
300 * Whether to insert spaces when pressing the Tab key.
301 */
useSpacesForTab()302 bool UserPrefValues::useSpacesForTab()
303 {
304 return readPref<bool>("use_spaces_for_tab");
305 }
306
setUseSpacesForTab(bool val)307 core::Error UserPrefValues::setUseSpacesForTab(bool val)
308 {
309 return writePref("use_spaces_for_tab", val);
310 }
311
312 /**
313 * The number of spaces to insert when pressing the Tab key.
314 */
numSpacesForTab()315 int UserPrefValues::numSpacesForTab()
316 {
317 return readPref<int>("num_spaces_for_tab");
318 }
319
setNumSpacesForTab(int val)320 core::Error UserPrefValues::setNumSpacesForTab(int val)
321 {
322 return writePref("num_spaces_for_tab", val);
323 }
324
325 /**
326 * Whether to automatically detect indentation settings from file contents.
327 */
autoDetectIndentation()328 bool UserPrefValues::autoDetectIndentation()
329 {
330 return readPref<bool>("auto_detect_indentation");
331 }
332
setAutoDetectIndentation(bool val)333 core::Error UserPrefValues::setAutoDetectIndentation(bool val)
334 {
335 return writePref("auto_detect_indentation", val);
336 }
337
338 /**
339 * Whether to show the margin guide in the RStudio code editor.
340 */
showMargin()341 bool UserPrefValues::showMargin()
342 {
343 return readPref<bool>("show_margin");
344 }
345
setShowMargin(bool val)346 core::Error UserPrefValues::setShowMargin(bool val)
347 {
348 return writePref("show_margin", val);
349 }
350
351 /**
352 * Whether to flash the cursor off and on.
353 */
blinkingCursor()354 bool UserPrefValues::blinkingCursor()
355 {
356 return readPref<bool>("blinking_cursor");
357 }
358
setBlinkingCursor(bool val)359 core::Error UserPrefValues::setBlinkingCursor(bool val)
360 {
361 return writePref("blinking_cursor", val);
362 }
363
364 /**
365 * The number of columns of text after which the margin is shown.
366 */
marginColumn()367 int UserPrefValues::marginColumn()
368 {
369 return readPref<int>("margin_column");
370 }
371
setMarginColumn(int val)372 core::Error UserPrefValues::setMarginColumn(int val)
373 {
374 return writePref("margin_column", val);
375 }
376
377 /**
378 * Whether to show invisible characters, such as spaces and tabs, in the RStudio code editor.
379 */
showInvisibles()380 bool UserPrefValues::showInvisibles()
381 {
382 return readPref<bool>("show_invisibles");
383 }
384
setShowInvisibles(bool val)385 core::Error UserPrefValues::setShowInvisibles(bool val)
386 {
387 return writePref("show_invisibles", val);
388 }
389
390 /**
391 * Whether to show indentation guides in the RStudio code editor.
392 */
showIndentGuides()393 bool UserPrefValues::showIndentGuides()
394 {
395 return readPref<bool>("show_indent_guides");
396 }
397
setShowIndentGuides(bool val)398 core::Error UserPrefValues::setShowIndentGuides(bool val)
399 {
400 return writePref("show_indent_guides", val);
401 }
402
403 /**
404 * Whether continue comments (by inserting the comment character) after adding a new line.
405 */
continueCommentsOnNewline()406 bool UserPrefValues::continueCommentsOnNewline()
407 {
408 return readPref<bool>("continue_comments_on_newline");
409 }
410
setContinueCommentsOnNewline(bool val)411 core::Error UserPrefValues::setContinueCommentsOnNewline(bool val)
412 {
413 return writePref("continue_comments_on_newline", val);
414 }
415
416 /**
417 * Whether web links in comments are clickable.
418 */
highlightWebLink()419 bool UserPrefValues::highlightWebLink()
420 {
421 return readPref<bool>("highlight_web_link");
422 }
423
setHighlightWebLink(bool val)424 core::Error UserPrefValues::setHighlightWebLink(bool val)
425 {
426 return writePref("highlight_web_link", val);
427 }
428
429 /**
430 * The keybindings to use in the RStudio code editor.
431 */
editorKeybindings()432 std::string UserPrefValues::editorKeybindings()
433 {
434 return readPref<std::string>("editor_keybindings");
435 }
436
setEditorKeybindings(std::string val)437 core::Error UserPrefValues::setEditorKeybindings(std::string val)
438 {
439 return writePref("editor_keybindings", val);
440 }
441
442 /**
443 * Whether to insert matching pairs, such as () and [], when the first is typed.
444 */
insertMatching()445 bool UserPrefValues::insertMatching()
446 {
447 return readPref<bool>("insert_matching");
448 }
449
setInsertMatching(bool val)450 core::Error UserPrefValues::setInsertMatching(bool val)
451 {
452 return writePref("insert_matching", val);
453 }
454
455 /**
456 * Whether to insert spaces around the equals sign in R code.
457 */
insertSpacesAroundEquals()458 bool UserPrefValues::insertSpacesAroundEquals()
459 {
460 return readPref<bool>("insert_spaces_around_equals");
461 }
462
setInsertSpacesAroundEquals(bool val)463 core::Error UserPrefValues::setInsertSpacesAroundEquals(bool val)
464 {
465 return writePref("insert_spaces_around_equals", val);
466 }
467
468 /**
469 * Whether to insert parentheses after function completions.
470 */
insertParensAfterFunctionCompletion()471 bool UserPrefValues::insertParensAfterFunctionCompletion()
472 {
473 return readPref<bool>("insert_parens_after_function_completion");
474 }
475
setInsertParensAfterFunctionCompletion(bool val)476 core::Error UserPrefValues::setInsertParensAfterFunctionCompletion(bool val)
477 {
478 return writePref("insert_parens_after_function_completion", val);
479 }
480
481 /**
482 * Whether to attempt completion of multiple-line statements when pressing Tab.
483 */
tabMultilineCompletion()484 bool UserPrefValues::tabMultilineCompletion()
485 {
486 return readPref<bool>("tab_multiline_completion");
487 }
488
setTabMultilineCompletion(bool val)489 core::Error UserPrefValues::setTabMultilineCompletion(bool val)
490 {
491 return writePref("tab_multiline_completion", val);
492 }
493
494 /**
495 * Whether to attempt completion of statements when pressing Tab.
496 */
tabCompletion()497 bool UserPrefValues::tabCompletion()
498 {
499 return readPref<bool>("tab_completion");
500 }
501
setTabCompletion(bool val)502 core::Error UserPrefValues::setTabCompletion(bool val)
503 {
504 return writePref("tab_completion", val);
505 }
506
507 /**
508 * Whether to show help tooltips for functions when the cursor has not been recently moved.
509 */
showHelpTooltipOnIdle()510 bool UserPrefValues::showHelpTooltipOnIdle()
511 {
512 return readPref<bool>("show_help_tooltip_on_idle");
513 }
514
setShowHelpTooltipOnIdle(bool val)515 core::Error UserPrefValues::setShowHelpTooltipOnIdle(bool val)
516 {
517 return writePref("show_help_tooltip_on_idle", val);
518 }
519
520 /**
521 * Which kinds of delimiters can be used to surround the current selection.
522 */
surroundSelection()523 std::string UserPrefValues::surroundSelection()
524 {
525 return readPref<std::string>("surround_selection");
526 }
527
setSurroundSelection(std::string val)528 core::Error UserPrefValues::setSurroundSelection(std::string val)
529 {
530 return writePref("surround_selection", val);
531 }
532
533 /**
534 * Whether to enable code snippets in the RStudio code editor.
535 */
enableSnippets()536 bool UserPrefValues::enableSnippets()
537 {
538 return readPref<bool>("enable_snippets");
539 }
540
setEnableSnippets(bool val)541 core::Error UserPrefValues::setEnableSnippets(bool val)
542 {
543 return writePref("enable_snippets", val);
544 }
545
546 /**
547 * When to use auto-completion for R code in the RStudio code editor.
548 */
codeCompletion()549 std::string UserPrefValues::codeCompletion()
550 {
551 return readPref<std::string>("code_completion");
552 }
553
setCodeCompletion(std::string val)554 core::Error UserPrefValues::setCodeCompletion(std::string val)
555 {
556 return writePref("code_completion", val);
557 }
558
559 /**
560 * When to use auto-completion for other languages (such as JavaScript and SQL) in the RStudio code editor.
561 */
codeCompletionOther()562 std::string UserPrefValues::codeCompletionOther()
563 {
564 return readPref<std::string>("code_completion_other");
565 }
566
setCodeCompletionOther(std::string val)567 core::Error UserPrefValues::setCodeCompletionOther(std::string val)
568 {
569 return writePref("code_completion_other", val);
570 }
571
572 /**
573 * Whether to always use code completion in the R console.
574 */
consoleCodeCompletion()575 bool UserPrefValues::consoleCodeCompletion()
576 {
577 return readPref<bool>("console_code_completion");
578 }
579
setConsoleCodeCompletion(bool val)580 core::Error UserPrefValues::setConsoleCodeCompletion(bool val)
581 {
582 return writePref("console_code_completion", val);
583 }
584
585 /**
586 * The number of milliseconds to wait before offering code suggestions.
587 */
codeCompletionDelay()588 int UserPrefValues::codeCompletionDelay()
589 {
590 return readPref<int>("code_completion_delay");
591 }
592
setCodeCompletionDelay(int val)593 core::Error UserPrefValues::setCodeCompletionDelay(int val)
594 {
595 return writePref("code_completion_delay", val);
596 }
597
598 /**
599 * The number of characters in a symbol that can be entered before completions are offered.
600 */
codeCompletionCharacters()601 int UserPrefValues::codeCompletionCharacters()
602 {
603 return readPref<int>("code_completion_characters");
604 }
605
setCodeCompletionCharacters(int val)606 core::Error UserPrefValues::setCodeCompletionCharacters(int val)
607 {
608 return writePref("code_completion_characters", val);
609 }
610
611 /**
612 * Whether to show function signature tooltips during autocompletion.
613 */
showFunctionSignatureTooltips()614 bool UserPrefValues::showFunctionSignatureTooltips()
615 {
616 return readPref<bool>("show_function_signature_tooltips");
617 }
618
setShowFunctionSignatureTooltips(bool val)619 core::Error UserPrefValues::setShowFunctionSignatureTooltips(bool val)
620 {
621 return writePref("show_function_signature_tooltips", val);
622 }
623
624 /**
625 * Whether to show diagnostic messages (such as syntax and usage errors) for R code as you type.
626 */
showDiagnosticsR()627 bool UserPrefValues::showDiagnosticsR()
628 {
629 return readPref<bool>("show_diagnostics_r");
630 }
631
setShowDiagnosticsR(bool val)632 core::Error UserPrefValues::setShowDiagnosticsR(bool val)
633 {
634 return writePref("show_diagnostics_r", val);
635 }
636
637 /**
638 * Whether to show diagnostic messages for C++ code as you type.
639 */
showDiagnosticsCpp()640 bool UserPrefValues::showDiagnosticsCpp()
641 {
642 return readPref<bool>("show_diagnostics_cpp");
643 }
644
setShowDiagnosticsCpp(bool val)645 core::Error UserPrefValues::setShowDiagnosticsCpp(bool val)
646 {
647 return writePref("show_diagnostics_cpp", val);
648 }
649
650 /**
651 * Whether to show diagnostic messages for other types of code (not R or C++).
652 */
showDiagnosticsOther()653 bool UserPrefValues::showDiagnosticsOther()
654 {
655 return readPref<bool>("show_diagnostics_other");
656 }
657
setShowDiagnosticsOther(bool val)658 core::Error UserPrefValues::setShowDiagnosticsOther(bool val)
659 {
660 return writePref("show_diagnostics_other", val);
661 }
662
663 /**
664 * Whether to show style diagnostics (suggestions for improving R code style)
665 */
styleDiagnostics()666 bool UserPrefValues::styleDiagnostics()
667 {
668 return readPref<bool>("style_diagnostics");
669 }
670
setStyleDiagnostics(bool val)671 core::Error UserPrefValues::setStyleDiagnostics(bool val)
672 {
673 return writePref("style_diagnostics", val);
674 }
675
676 /**
677 * Whether to check code for problems after saving it.
678 */
diagnosticsOnSave()679 bool UserPrefValues::diagnosticsOnSave()
680 {
681 return readPref<bool>("diagnostics_on_save");
682 }
683
setDiagnosticsOnSave(bool val)684 core::Error UserPrefValues::setDiagnosticsOnSave(bool val)
685 {
686 return writePref("diagnostics_on_save", val);
687 }
688
689 /**
690 * Whether to run code diagnostics in the background, as you type.
691 */
backgroundDiagnostics()692 bool UserPrefValues::backgroundDiagnostics()
693 {
694 return readPref<bool>("background_diagnostics");
695 }
696
setBackgroundDiagnostics(bool val)697 core::Error UserPrefValues::setBackgroundDiagnostics(bool val)
698 {
699 return writePref("background_diagnostics", val);
700 }
701
702 /**
703 * The number of milliseconds to delay before running code diagnostics in the background.
704 */
backgroundDiagnosticsDelayMs()705 int UserPrefValues::backgroundDiagnosticsDelayMs()
706 {
707 return readPref<int>("background_diagnostics_delay_ms");
708 }
709
setBackgroundDiagnosticsDelayMs(int val)710 core::Error UserPrefValues::setBackgroundDiagnosticsDelayMs(int val)
711 {
712 return writePref("background_diagnostics_delay_ms", val);
713 }
714
715 /**
716 * Whether to run diagnostics in R function calls.
717 */
diagnosticsInRFunctionCalls()718 bool UserPrefValues::diagnosticsInRFunctionCalls()
719 {
720 return readPref<bool>("diagnostics_in_r_function_calls");
721 }
722
setDiagnosticsInRFunctionCalls(bool val)723 core::Error UserPrefValues::setDiagnosticsInRFunctionCalls(bool val)
724 {
725 return writePref("diagnostics_in_r_function_calls", val);
726 }
727
728 /**
729 * Whether to check arguments to R function calls.
730 */
checkArgumentsToRFunctionCalls()731 bool UserPrefValues::checkArgumentsToRFunctionCalls()
732 {
733 return readPref<bool>("check_arguments_to_r_function_calls");
734 }
735
setCheckArgumentsToRFunctionCalls(bool val)736 core::Error UserPrefValues::setCheckArgumentsToRFunctionCalls(bool val)
737 {
738 return writePref("check_arguments_to_r_function_calls", val);
739 }
740
741 /**
742 * Whether to check for unexpected variable assignments inside R function calls.
743 */
checkUnexpectedAssignmentInFunctionCall()744 bool UserPrefValues::checkUnexpectedAssignmentInFunctionCall()
745 {
746 return readPref<bool>("check_unexpected_assignment_in_function_call");
747 }
748
setCheckUnexpectedAssignmentInFunctionCall(bool val)749 core::Error UserPrefValues::setCheckUnexpectedAssignmentInFunctionCall(bool val)
750 {
751 return writePref("check_unexpected_assignment_in_function_call", val);
752 }
753
754 /**
755 * Whether to generate a warning if a variable is used without being defined in the current scope.
756 */
warnIfNoSuchVariableInScope()757 bool UserPrefValues::warnIfNoSuchVariableInScope()
758 {
759 return readPref<bool>("warn_if_no_such_variable_in_scope");
760 }
761
setWarnIfNoSuchVariableInScope(bool val)762 core::Error UserPrefValues::setWarnIfNoSuchVariableInScope(bool val)
763 {
764 return writePref("warn_if_no_such_variable_in_scope", val);
765 }
766
767 /**
768 * Whether to generate a warning if a variable is defined without being used in the current scope
769 */
warnVariableDefinedButNotUsed()770 bool UserPrefValues::warnVariableDefinedButNotUsed()
771 {
772 return readPref<bool>("warn_variable_defined_but_not_used");
773 }
774
setWarnVariableDefinedButNotUsed(bool val)775 core::Error UserPrefValues::setWarnVariableDefinedButNotUsed(bool val)
776 {
777 return writePref("warn_variable_defined_but_not_used", val);
778 }
779
780 /**
781 * Whether to automatically discover and offer to install missing R package dependencies.
782 */
autoDiscoverPackageDependencies()783 bool UserPrefValues::autoDiscoverPackageDependencies()
784 {
785 return readPref<bool>("auto_discover_package_dependencies");
786 }
787
setAutoDiscoverPackageDependencies(bool val)788 core::Error UserPrefValues::setAutoDiscoverPackageDependencies(bool val)
789 {
790 return writePref("auto_discover_package_dependencies", val);
791 }
792
793 /**
794 * Whether to ensure that source files end with a newline character.
795 */
autoAppendNewline()796 bool UserPrefValues::autoAppendNewline()
797 {
798 return readPref<bool>("auto_append_newline");
799 }
800
setAutoAppendNewline(bool val)801 core::Error UserPrefValues::setAutoAppendNewline(bool val)
802 {
803 return writePref("auto_append_newline", val);
804 }
805
806 /**
807 * Whether to strip trailing whitespace from each line when saving.
808 */
stripTrailingWhitespace()809 bool UserPrefValues::stripTrailingWhitespace()
810 {
811 return readPref<bool>("strip_trailing_whitespace");
812 }
813
setStripTrailingWhitespace(bool val)814 core::Error UserPrefValues::setStripTrailingWhitespace(bool val)
815 {
816 return writePref("strip_trailing_whitespace", val);
817 }
818
819 /**
820 * Whether to save the position of the cursor when a file is closed, restore it when the file is opened.
821 */
restoreSourceDocumentCursorPosition()822 bool UserPrefValues::restoreSourceDocumentCursorPosition()
823 {
824 return readPref<bool>("restore_source_document_cursor_position");
825 }
826
setRestoreSourceDocumentCursorPosition(bool val)827 core::Error UserPrefValues::setRestoreSourceDocumentCursorPosition(bool val)
828 {
829 return writePref("restore_source_document_cursor_position", val);
830 }
831
832 /**
833 * Whether to automatically re-indent code when it's pasted into RStudio.
834 */
reindentOnPaste()835 bool UserPrefValues::reindentOnPaste()
836 {
837 return readPref<bool>("reindent_on_paste");
838 }
839
setReindentOnPaste(bool val)840 core::Error UserPrefValues::setReindentOnPaste(bool val)
841 {
842 return writePref("reindent_on_paste", val);
843 }
844
845 /**
846 * Whether to vertically align arguments to R function calls during automatic indentation.
847 */
verticallyAlignArgumentsIndent()848 bool UserPrefValues::verticallyAlignArgumentsIndent()
849 {
850 return readPref<bool>("vertically_align_arguments_indent");
851 }
852
setVerticallyAlignArgumentsIndent(bool val)853 core::Error UserPrefValues::setVerticallyAlignArgumentsIndent(bool val)
854 {
855 return writePref("vertically_align_arguments_indent", val);
856 }
857
858 /**
859 * Whether to soft-wrap R source files, wrapping the text for display without inserting newline characters.
860 */
softWrapRFiles()861 bool UserPrefValues::softWrapRFiles()
862 {
863 return readPref<bool>("soft_wrap_r_files");
864 }
865
setSoftWrapRFiles(bool val)866 core::Error UserPrefValues::setSoftWrapRFiles(bool val)
867 {
868 return writePref("soft_wrap_r_files", val);
869 }
870
871 /**
872 * Whether to soft-wrap R Markdown files (and similar types such as R HTML and R Notebooks)
873 */
softWrapRmdFiles()874 bool UserPrefValues::softWrapRmdFiles()
875 {
876 return readPref<bool>("soft_wrap_rmd_files");
877 }
878
setSoftWrapRmdFiles(bool val)879 core::Error UserPrefValues::setSoftWrapRmdFiles(bool val)
880 {
881 return writePref("soft_wrap_rmd_files", val);
882 }
883
884 /**
885 * Whether to focus the R console after executing an R command from a script.
886 */
focusConsoleAfterExec()887 bool UserPrefValues::focusConsoleAfterExec()
888 {
889 return readPref<bool>("focus_console_after_exec");
890 }
891
setFocusConsoleAfterExec(bool val)892 core::Error UserPrefValues::setFocusConsoleAfterExec(bool val)
893 {
894 return writePref("focus_console_after_exec", val);
895 }
896
897 /**
898 * The style of folding to use.
899 */
foldStyle()900 std::string UserPrefValues::foldStyle()
901 {
902 return readPref<std::string>("fold_style");
903 }
904
setFoldStyle(std::string val)905 core::Error UserPrefValues::setFoldStyle(std::string val)
906 {
907 return writePref("fold_style", val);
908 }
909
910 /**
911 * Whether to automatically save scripts before executing them.
912 */
saveBeforeSourcing()913 bool UserPrefValues::saveBeforeSourcing()
914 {
915 return readPref<bool>("save_before_sourcing");
916 }
917
setSaveBeforeSourcing(bool val)918 core::Error UserPrefValues::setSaveBeforeSourcing(bool val)
919 {
920 return writePref("save_before_sourcing", val);
921 }
922
923 /**
924 * Whether to use syntax highlighting in the R console.
925 */
syntaxColorConsole()926 bool UserPrefValues::syntaxColorConsole()
927 {
928 return readPref<bool>("syntax_color_console");
929 }
930
setSyntaxColorConsole(bool val)931 core::Error UserPrefValues::setSyntaxColorConsole(bool val)
932 {
933 return writePref("syntax_color_console", val);
934 }
935
936 /**
937 * Whether to display error, warning, and message output in a different color.
938 */
highlightConsoleErrors()939 bool UserPrefValues::highlightConsoleErrors()
940 {
941 return readPref<bool>("highlight_console_errors");
942 }
943
setHighlightConsoleErrors(bool val)944 core::Error UserPrefValues::setHighlightConsoleErrors(bool val)
945 {
946 return writePref("highlight_console_errors", val);
947 }
948
949 /**
950 * Whether to allow scrolling past the end of a file.
951 */
scrollPastEndOfDocument()952 bool UserPrefValues::scrollPastEndOfDocument()
953 {
954 return readPref<bool>("scroll_past_end_of_document");
955 }
956
setScrollPastEndOfDocument(bool val)957 core::Error UserPrefValues::setScrollPastEndOfDocument(bool val)
958 {
959 return writePref("scroll_past_end_of_document", val);
960 }
961
962 /**
963 * Whether to highlight R function calls in the code editor.
964 */
highlightRFunctionCalls()965 bool UserPrefValues::highlightRFunctionCalls()
966 {
967 return readPref<bool>("highlight_r_function_calls");
968 }
969
setHighlightRFunctionCalls(bool val)970 core::Error UserPrefValues::setHighlightRFunctionCalls(bool val)
971 {
972 return writePref("highlight_r_function_calls", val);
973 }
974
975 /**
976 * Whether to highlight parentheses in a variety of colors.
977 */
rainbowParentheses()978 bool UserPrefValues::rainbowParentheses()
979 {
980 return readPref<bool>("rainbow_parentheses");
981 }
982
setRainbowParentheses(bool val)983 core::Error UserPrefValues::setRainbowParentheses(bool val)
984 {
985 return writePref("rainbow_parentheses", val);
986 }
987
988 /**
989 * The maximum number of characters to display in a single line in the R console.
990 */
consoleLineLengthLimit()991 int UserPrefValues::consoleLineLengthLimit()
992 {
993 return readPref<int>("console_line_length_limit");
994 }
995
setConsoleLineLengthLimit(int val)996 core::Error UserPrefValues::setConsoleLineLengthLimit(int val)
997 {
998 return writePref("console_line_length_limit", val);
999 }
1000
1001 /**
1002 * The maximum number of console actions to store and display in the console scrollback buffer.
1003 */
consoleMaxLines()1004 int UserPrefValues::consoleMaxLines()
1005 {
1006 return readPref<int>("console_max_lines");
1007 }
1008
setConsoleMaxLines(int val)1009 core::Error UserPrefValues::setConsoleMaxLines(int val)
1010 {
1011 return writePref("console_max_lines", val);
1012 }
1013
1014 /**
1015 * How to treat ANSI escape codes in the console.
1016 */
ansiConsoleMode()1017 std::string UserPrefValues::ansiConsoleMode()
1018 {
1019 return readPref<std::string>("ansi_console_mode");
1020 }
1021
setAnsiConsoleMode(std::string val)1022 core::Error UserPrefValues::setAnsiConsoleMode(std::string val)
1023 {
1024 return writePref("ansi_console_mode", val);
1025 }
1026
1027 /**
1028 * Whether to only show a limited window of the total console output
1029 */
limitVisibleConsole()1030 bool UserPrefValues::limitVisibleConsole()
1031 {
1032 return readPref<bool>("limit_visible_console");
1033 }
1034
setLimitVisibleConsole(bool val)1035 core::Error UserPrefValues::setLimitVisibleConsole(bool val)
1036 {
1037 return writePref("limit_visible_console", val);
1038 }
1039
1040 /**
1041 * Whether to show a toolbar on code chunks in R Markdown documents.
1042 */
showInlineToolbarForRCodeChunks()1043 bool UserPrefValues::showInlineToolbarForRCodeChunks()
1044 {
1045 return readPref<bool>("show_inline_toolbar_for_r_code_chunks");
1046 }
1047
setShowInlineToolbarForRCodeChunks(bool val)1048 core::Error UserPrefValues::setShowInlineToolbarForRCodeChunks(bool val)
1049 {
1050 return writePref("show_inline_toolbar_for_r_code_chunks", val);
1051 }
1052
1053 /**
1054 * Whether to highlight code chunks in R Markdown documents with a different background color.
1055 */
highlightCodeChunks()1056 bool UserPrefValues::highlightCodeChunks()
1057 {
1058 return readPref<bool>("highlight_code_chunks");
1059 }
1060
setHighlightCodeChunks(bool val)1061 core::Error UserPrefValues::setHighlightCodeChunks(bool val)
1062 {
1063 return writePref("highlight_code_chunks", val);
1064 }
1065
1066 /**
1067 * Whether to save all open, unsaved files before building the project.
1068 */
saveFilesBeforeBuild()1069 bool UserPrefValues::saveFilesBeforeBuild()
1070 {
1071 return readPref<bool>("save_files_before_build");
1072 }
1073
setSaveFilesBeforeBuild(bool val)1074 core::Error UserPrefValues::setSaveFilesBeforeBuild(bool val)
1075 {
1076 return writePref("save_files_before_build", val);
1077 }
1078
1079 /**
1080 * The default editor font size, in points.
1081 */
fontSizePoints()1082 double UserPrefValues::fontSizePoints()
1083 {
1084 return readPref<double>("font_size_points");
1085 }
1086
setFontSizePoints(double val)1087 core::Error UserPrefValues::setFontSizePoints(double val)
1088 {
1089 return writePref("font_size_points", val);
1090 }
1091
1092 /**
1093 * The help panel font size, in points.
1094 */
helpFontSizePoints()1095 double UserPrefValues::helpFontSizePoints()
1096 {
1097 return readPref<double>("help_font_size_points");
1098 }
1099
setHelpFontSizePoints(double val)1100 core::Error UserPrefValues::setHelpFontSizePoints(double val)
1101 {
1102 return writePref("help_font_size_points", val);
1103 }
1104
1105 /**
1106 * The name of the color theme to apply to the text editor in RStudio.
1107 */
editorTheme()1108 std::string UserPrefValues::editorTheme()
1109 {
1110 return readPref<std::string>("editor_theme");
1111 }
1112
setEditorTheme(std::string val)1113 core::Error UserPrefValues::setEditorTheme(std::string val)
1114 {
1115 return writePref("editor_theme", val);
1116 }
1117
1118 /**
1119 * Whether to use a custom editor font in RStudio Server.
1120 */
serverEditorFontEnabled()1121 bool UserPrefValues::serverEditorFontEnabled()
1122 {
1123 return readPref<bool>("server_editor_font_enabled");
1124 }
1125
setServerEditorFontEnabled(bool val)1126 core::Error UserPrefValues::setServerEditorFontEnabled(bool val)
1127 {
1128 return writePref("server_editor_font_enabled", val);
1129 }
1130
1131 /**
1132 * The name of the fixed-width editor font to use with RStudio Server.
1133 */
serverEditorFont()1134 std::string UserPrefValues::serverEditorFont()
1135 {
1136 return readPref<std::string>("server_editor_font");
1137 }
1138
setServerEditorFont(std::string val)1139 core::Error UserPrefValues::setServerEditorFont(std::string val)
1140 {
1141 return writePref("server_editor_font", val);
1142 }
1143
1144 /**
1145 * The default character encoding to use when saving files.
1146 */
defaultEncoding()1147 std::string UserPrefValues::defaultEncoding()
1148 {
1149 return readPref<std::string>("default_encoding");
1150 }
1151
setDefaultEncoding(std::string val)1152 core::Error UserPrefValues::setDefaultEncoding(std::string val)
1153 {
1154 return writePref("default_encoding", val);
1155 }
1156
1157 /**
1158 * Whether to show the toolbar at the top of the RStudio workbench.
1159 */
toolbarVisible()1160 bool UserPrefValues::toolbarVisible()
1161 {
1162 return readPref<bool>("toolbar_visible");
1163 }
1164
setToolbarVisible(bool val)1165 core::Error UserPrefValues::setToolbarVisible(bool val)
1166 {
1167 return writePref("toolbar_visible", val);
1168 }
1169
1170 /**
1171 * The directory path under which to place new projects by default.
1172 */
defaultProjectLocation()1173 std::string UserPrefValues::defaultProjectLocation()
1174 {
1175 return readPref<std::string>("default_project_location");
1176 }
1177
setDefaultProjectLocation(std::string val)1178 core::Error UserPrefValues::setDefaultProjectLocation(std::string val)
1179 {
1180 return writePref("default_project_location", val);
1181 }
1182
1183 /**
1184 * Whether to echo R code when sourcing it.
1185 */
sourceWithEcho()1186 bool UserPrefValues::sourceWithEcho()
1187 {
1188 return readPref<bool>("source_with_echo");
1189 }
1190
setSourceWithEcho(bool val)1191 core::Error UserPrefValues::setSourceWithEcho(bool val)
1192 {
1193 return writePref("source_with_echo", val);
1194 }
1195
1196 /**
1197 * The default engine to use when processing Sweave documents.
1198 */
defaultSweaveEngine()1199 std::string UserPrefValues::defaultSweaveEngine()
1200 {
1201 return readPref<std::string>("default_sweave_engine");
1202 }
1203
setDefaultSweaveEngine(std::string val)1204 core::Error UserPrefValues::setDefaultSweaveEngine(std::string val)
1205 {
1206 return writePref("default_sweave_engine", val);
1207 }
1208
1209 /**
1210 * The default program to use when processing LaTeX documents.
1211 */
defaultLatexProgram()1212 std::string UserPrefValues::defaultLatexProgram()
1213 {
1214 return readPref<std::string>("default_latex_program");
1215 }
1216
setDefaultLatexProgram(std::string val)1217 core::Error UserPrefValues::setDefaultLatexProgram(std::string val)
1218 {
1219 return writePref("default_latex_program", val);
1220 }
1221
1222 /**
1223 * Whether to use Roxygen for documentation.
1224 */
useRoxygen()1225 bool UserPrefValues::useRoxygen()
1226 {
1227 return readPref<bool>("use_roxygen");
1228 }
1229
setUseRoxygen(bool val)1230 core::Error UserPrefValues::setUseRoxygen(bool val)
1231 {
1232 return writePref("use_roxygen", val);
1233 }
1234
1235 /**
1236 * Whether to use RStudio's data import feature.
1237 */
useDataimport()1238 bool UserPrefValues::useDataimport()
1239 {
1240 return readPref<bool>("use_dataimport");
1241 }
1242
setUseDataimport(bool val)1243 core::Error UserPrefValues::setUseDataimport(bool val)
1244 {
1245 return writePref("use_dataimport", val);
1246 }
1247
1248 /**
1249 * The program to use to preview PDF files after generation.
1250 */
pdfPreviewer()1251 std::string UserPrefValues::pdfPreviewer()
1252 {
1253 return readPref<std::string>("pdf_previewer");
1254 }
1255
setPdfPreviewer(std::string val)1256 core::Error UserPrefValues::setPdfPreviewer(std::string val)
1257 {
1258 return writePref("pdf_previewer", val);
1259 }
1260
1261 /**
1262 * Whether to always enable the concordance for RNW files.
1263 */
alwaysEnableRnwConcordance()1264 bool UserPrefValues::alwaysEnableRnwConcordance()
1265 {
1266 return readPref<bool>("always_enable_rnw_concordance");
1267 }
1268
setAlwaysEnableRnwConcordance(bool val)1269 core::Error UserPrefValues::setAlwaysEnableRnwConcordance(bool val)
1270 {
1271 return writePref("always_enable_rnw_concordance", val);
1272 }
1273
1274 /**
1275 * Whether to insert numbered sections in LaTeX.
1276 */
insertNumberedLatexSections()1277 bool UserPrefValues::insertNumberedLatexSections()
1278 {
1279 return readPref<bool>("insert_numbered_latex_sections");
1280 }
1281
setInsertNumberedLatexSections(bool val)1282 core::Error UserPrefValues::setInsertNumberedLatexSections(bool val)
1283 {
1284 return writePref("insert_numbered_latex_sections", val);
1285 }
1286
1287 /**
1288 * The language of the spelling dictionary to use for spell checking.
1289 */
spellingDictionaryLanguage()1290 std::string UserPrefValues::spellingDictionaryLanguage()
1291 {
1292 return readPref<std::string>("spelling_dictionary_language");
1293 }
1294
setSpellingDictionaryLanguage(std::string val)1295 core::Error UserPrefValues::setSpellingDictionaryLanguage(std::string val)
1296 {
1297 return writePref("spelling_dictionary_language", val);
1298 }
1299
1300 /**
1301 * The list of custom dictionaries to use when spell checking.
1302 */
spellingCustomDictionaries()1303 core::json::Array UserPrefValues::spellingCustomDictionaries()
1304 {
1305 return readPref<core::json::Array>("spelling_custom_dictionaries");
1306 }
1307
setSpellingCustomDictionaries(core::json::Array val)1308 core::Error UserPrefValues::setSpellingCustomDictionaries(core::json::Array val)
1309 {
1310 return writePref("spelling_custom_dictionaries", val);
1311 }
1312
1313 /**
1314 * The number of milliseconds to wait before linting a document after it is loaded.
1315 */
documentLoadLintDelay()1316 int UserPrefValues::documentLoadLintDelay()
1317 {
1318 return readPref<int>("document_load_lint_delay");
1319 }
1320
setDocumentLoadLintDelay(int val)1321 core::Error UserPrefValues::setDocumentLoadLintDelay(int val)
1322 {
1323 return writePref("document_load_lint_delay", val);
1324 }
1325
1326 /**
1327 * Whether to ignore words in uppercase when spell checking.
1328 */
ignoreUppercaseWords()1329 bool UserPrefValues::ignoreUppercaseWords()
1330 {
1331 return readPref<bool>("ignore_uppercase_words");
1332 }
1333
setIgnoreUppercaseWords(bool val)1334 core::Error UserPrefValues::setIgnoreUppercaseWords(bool val)
1335 {
1336 return writePref("ignore_uppercase_words", val);
1337 }
1338
1339 /**
1340 * Whether to ignore words with numbers in them when spell checking.
1341 */
ignoreWordsWithNumbers()1342 bool UserPrefValues::ignoreWordsWithNumbers()
1343 {
1344 return readPref<bool>("ignore_words_with_numbers");
1345 }
1346
setIgnoreWordsWithNumbers(bool val)1347 core::Error UserPrefValues::setIgnoreWordsWithNumbers(bool val)
1348 {
1349 return writePref("ignore_words_with_numbers", val);
1350 }
1351
1352 /**
1353 * Whether to enable real-time spellchecking by default.
1354 */
realTimeSpellchecking()1355 bool UserPrefValues::realTimeSpellchecking()
1356 {
1357 return readPref<bool>("real_time_spellchecking");
1358 }
1359
setRealTimeSpellchecking(bool val)1360 core::Error UserPrefValues::setRealTimeSpellchecking(bool val)
1361 {
1362 return writePref("real_time_spellchecking", val);
1363 }
1364
1365 /**
1366 * Whether to navigate to build errors.
1367 */
navigateToBuildError()1368 bool UserPrefValues::navigateToBuildError()
1369 {
1370 return readPref<bool>("navigate_to_build_error");
1371 }
1372
setNavigateToBuildError(bool val)1373 core::Error UserPrefValues::setNavigateToBuildError(bool val)
1374 {
1375 return writePref("navigate_to_build_error", val);
1376 }
1377
1378 /**
1379 * Whether to enable RStudio's Packages pane.
1380 */
packagesPaneEnabled()1381 bool UserPrefValues::packagesPaneEnabled()
1382 {
1383 return readPref<bool>("packages_pane_enabled");
1384 }
1385
setPackagesPaneEnabled(bool val)1386 core::Error UserPrefValues::setPackagesPaneEnabled(bool val)
1387 {
1388 return writePref("packages_pane_enabled", val);
1389 }
1390
1391 /**
1392 * Whether to use RCPP templates.
1393 */
useRcppTemplate()1394 bool UserPrefValues::useRcppTemplate()
1395 {
1396 return readPref<bool>("use_rcpp_template");
1397 }
1398
setUseRcppTemplate(bool val)1399 core::Error UserPrefValues::setUseRcppTemplate(bool val)
1400 {
1401 return writePref("use_rcpp_template", val);
1402 }
1403
1404 /**
1405 * Whether to restore the last opened source documents when RStudio starts up.
1406 */
restoreSourceDocuments()1407 bool UserPrefValues::restoreSourceDocuments()
1408 {
1409 return readPref<bool>("restore_source_documents");
1410 }
1411
setRestoreSourceDocuments(bool val)1412 core::Error UserPrefValues::setRestoreSourceDocuments(bool val)
1413 {
1414 return writePref("restore_source_documents", val);
1415 }
1416
1417 /**
1418 * Whether to handle errors only when user code is on the stack.
1419 */
handleErrorsInUserCodeOnly()1420 bool UserPrefValues::handleErrorsInUserCodeOnly()
1421 {
1422 return readPref<bool>("handle_errors_in_user_code_only");
1423 }
1424
setHandleErrorsInUserCodeOnly(bool val)1425 core::Error UserPrefValues::setHandleErrorsInUserCodeOnly(bool val)
1426 {
1427 return writePref("handle_errors_in_user_code_only", val);
1428 }
1429
1430 /**
1431 * Whether to automatically expand tracebacks when an error occurs.
1432 */
autoExpandErrorTracebacks()1433 bool UserPrefValues::autoExpandErrorTracebacks()
1434 {
1435 return readPref<bool>("auto_expand_error_tracebacks");
1436 }
1437
setAutoExpandErrorTracebacks(bool val)1438 core::Error UserPrefValues::setAutoExpandErrorTracebacks(bool val)
1439 {
1440 return writePref("auto_expand_error_tracebacks", val);
1441 }
1442
1443 /**
1444 * Whether to check for new versions of RStudio when RStudio starts.
1445 */
checkForUpdates()1446 bool UserPrefValues::checkForUpdates()
1447 {
1448 return readPref<bool>("check_for_updates");
1449 }
1450
setCheckForUpdates(bool val)1451 core::Error UserPrefValues::setCheckForUpdates(bool val)
1452 {
1453 return writePref("check_for_updates", val);
1454 }
1455
1456 /**
1457 * Whether to show functions without source references in the Traceback pane while debugging.
1458 */
showInternalFunctions()1459 bool UserPrefValues::showInternalFunctions()
1460 {
1461 return readPref<bool>("show_internal_functions");
1462 }
1463
setShowInternalFunctions(bool val)1464 core::Error UserPrefValues::setShowInternalFunctions(bool val)
1465 {
1466 return writePref("show_internal_functions", val);
1467 }
1468
1469 /**
1470 * Where to display Shiny applications when they are run.
1471 */
shinyViewerType()1472 std::string UserPrefValues::shinyViewerType()
1473 {
1474 return readPref<std::string>("shiny_viewer_type");
1475 }
1476
setShinyViewerType(std::string val)1477 core::Error UserPrefValues::setShinyViewerType(std::string val)
1478 {
1479 return writePref("shiny_viewer_type", val);
1480 }
1481
1482 /**
1483 * Whether to run Shiny applications as background jobs.
1484 */
shinyBackgroundJobs()1485 bool UserPrefValues::shinyBackgroundJobs()
1486 {
1487 return readPref<bool>("shiny_background_jobs");
1488 }
1489
setShinyBackgroundJobs(bool val)1490 core::Error UserPrefValues::setShinyBackgroundJobs(bool val)
1491 {
1492 return writePref("shiny_background_jobs", val);
1493 }
1494
1495 /**
1496 * Where to display Shiny applications when they are run.
1497 */
plumberViewerType()1498 std::string UserPrefValues::plumberViewerType()
1499 {
1500 return readPref<std::string>("plumber_viewer_type");
1501 }
1502
setPlumberViewerType(std::string val)1503 core::Error UserPrefValues::setPlumberViewerType(std::string val)
1504 {
1505 return writePref("plumber_viewer_type", val);
1506 }
1507
1508 /**
1509 * The default name to use as the document author when creating new documents.
1510 */
documentAuthor()1511 std::string UserPrefValues::documentAuthor()
1512 {
1513 return readPref<std::string>("document_author");
1514 }
1515
setDocumentAuthor(std::string val)1516 core::Error UserPrefValues::setDocumentAuthor(std::string val)
1517 {
1518 return writePref("document_author", val);
1519 }
1520
1521 /**
1522 * The path to the preferred R Markdown template.
1523 */
rmdPreferredTemplatePath()1524 std::string UserPrefValues::rmdPreferredTemplatePath()
1525 {
1526 return readPref<std::string>("rmd_preferred_template_path");
1527 }
1528
setRmdPreferredTemplatePath(std::string val)1529 core::Error UserPrefValues::setRmdPreferredTemplatePath(std::string val)
1530 {
1531 return writePref("rmd_preferred_template_path", val);
1532 }
1533
1534 /**
1535 * Where to display R Markdown documents when they have completed rendering.
1536 */
rmdViewerType()1537 std::string UserPrefValues::rmdViewerType()
1538 {
1539 return readPref<std::string>("rmd_viewer_type");
1540 }
1541
setRmdViewerType(std::string val)1542 core::Error UserPrefValues::setRmdViewerType(std::string val)
1543 {
1544 return writePref("rmd_viewer_type", val);
1545 }
1546
1547 /**
1548 * Whether to show verbose diagnostic information when publishing content.
1549 */
showPublishDiagnostics()1550 bool UserPrefValues::showPublishDiagnostics()
1551 {
1552 return readPref<bool>("show_publish_diagnostics");
1553 }
1554
setShowPublishDiagnostics(bool val)1555 core::Error UserPrefValues::setShowPublishDiagnostics(bool val)
1556 {
1557 return writePref("show_publish_diagnostics", val);
1558 }
1559
1560 /**
1561 * Whether to check remote server SSL certificates when publishing content.
1562 */
publishCheckCertificates()1563 bool UserPrefValues::publishCheckCertificates()
1564 {
1565 return readPref<bool>("publish_check_certificates");
1566 }
1567
setPublishCheckCertificates(bool val)1568 core::Error UserPrefValues::setPublishCheckCertificates(bool val)
1569 {
1570 return writePref("publish_check_certificates", val);
1571 }
1572
1573 /**
1574 * Whether to use a custom certificate authority (CA) bundle when publishing content.
1575 */
usePublishCaBundle()1576 bool UserPrefValues::usePublishCaBundle()
1577 {
1578 return readPref<bool>("use_publish_ca_bundle");
1579 }
1580
setUsePublishCaBundle(bool val)1581 core::Error UserPrefValues::setUsePublishCaBundle(bool val)
1582 {
1583 return writePref("use_publish_ca_bundle", val);
1584 }
1585
1586 /**
1587 * The path to the custom certificate authority (CA) bundle to use when publishing content.
1588 */
publishCaBundle()1589 std::string UserPrefValues::publishCaBundle()
1590 {
1591 return readPref<std::string>("publish_ca_bundle");
1592 }
1593
setPublishCaBundle(std::string val)1594 core::Error UserPrefValues::setPublishCaBundle(std::string val)
1595 {
1596 return writePref("publish_ca_bundle", val);
1597 }
1598
1599 /**
1600 * Whether to show chunk output inline for ordinary R Markdown documents.
1601 */
rmdChunkOutputInline()1602 bool UserPrefValues::rmdChunkOutputInline()
1603 {
1604 return readPref<bool>("rmd_chunk_output_inline");
1605 }
1606
setRmdChunkOutputInline(bool val)1607 core::Error UserPrefValues::setRmdChunkOutputInline(bool val)
1608 {
1609 return writePref("rmd_chunk_output_inline", val);
1610 }
1611
1612 /**
1613 * Whether to show the document outline by default when opening R Markdown documents.
1614 */
showDocOutlineRmd()1615 bool UserPrefValues::showDocOutlineRmd()
1616 {
1617 return readPref<bool>("show_doc_outline_rmd");
1618 }
1619
setShowDocOutlineRmd(bool val)1620 core::Error UserPrefValues::setShowDocOutlineRmd(bool val)
1621 {
1622 return writePref("show_doc_outline_rmd", val);
1623 }
1624
1625 /**
1626 * Whether to automatically run an R Markdown document's Setup chunk before running other chunks.
1627 */
autoRunSetupChunk()1628 bool UserPrefValues::autoRunSetupChunk()
1629 {
1630 return readPref<bool>("auto_run_setup_chunk");
1631 }
1632
setAutoRunSetupChunk(bool val)1633 core::Error UserPrefValues::setAutoRunSetupChunk(bool val)
1634 {
1635 return writePref("auto_run_setup_chunk", val);
1636 }
1637
1638 /**
1639 * Whether to hide the R console when executing inline R Markdown chunks.
1640 */
hideConsoleOnChunkExecute()1641 bool UserPrefValues::hideConsoleOnChunkExecute()
1642 {
1643 return readPref<bool>("hide_console_on_chunk_execute");
1644 }
1645
setHideConsoleOnChunkExecute(bool val)1646 core::Error UserPrefValues::setHideConsoleOnChunkExecute(bool val)
1647 {
1648 return writePref("hide_console_on_chunk_execute", val);
1649 }
1650
1651 /**
1652 * The unit of R code to execute when the Execute command is invoked.
1653 */
executionBehavior()1654 std::string UserPrefValues::executionBehavior()
1655 {
1656 return readPref<std::string>("execution_behavior");
1657 }
1658
setExecutionBehavior(std::string val)1659 core::Error UserPrefValues::setExecutionBehavior(std::string val)
1660 {
1661 return writePref("execution_behavior", val);
1662 }
1663
1664 /**
1665 * Whether to show the Terminal tab.
1666 */
showTerminalTab()1667 bool UserPrefValues::showTerminalTab()
1668 {
1669 return readPref<bool>("show_terminal_tab");
1670 }
1671
setShowTerminalTab(bool val)1672 core::Error UserPrefValues::setShowTerminalTab(bool val)
1673 {
1674 return writePref("show_terminal_tab", val);
1675 }
1676
1677 /**
1678 * Whether to use local echo in the Terminal.
1679 */
terminalLocalEcho()1680 bool UserPrefValues::terminalLocalEcho()
1681 {
1682 return readPref<bool>("terminal_local_echo");
1683 }
1684
setTerminalLocalEcho(bool val)1685 core::Error UserPrefValues::setTerminalLocalEcho(bool val)
1686 {
1687 return writePref("terminal_local_echo", val);
1688 }
1689
1690 /**
1691 * Whether to use websockets to communicate with the shell in the Terminal tab.
1692 */
terminalWebsockets()1693 bool UserPrefValues::terminalWebsockets()
1694 {
1695 return readPref<bool>("terminal_websockets");
1696 }
1697
setTerminalWebsockets(bool val)1698 core::Error UserPrefValues::setTerminalWebsockets(bool val)
1699 {
1700 return writePref("terminal_websockets", val);
1701 }
1702
1703 /**
1704 * Whether to close the terminal pane after the shell exits.
1705 */
terminalCloseBehavior()1706 std::string UserPrefValues::terminalCloseBehavior()
1707 {
1708 return readPref<std::string>("terminal_close_behavior");
1709 }
1710
setTerminalCloseBehavior(std::string val)1711 core::Error UserPrefValues::setTerminalCloseBehavior(std::string val)
1712 {
1713 return writePref("terminal_close_behavior", val);
1714 }
1715
1716 /**
1717 * Whether to track and save changes to system environment variables in the Terminal.
1718 */
terminalTrackEnvironment()1719 bool UserPrefValues::terminalTrackEnvironment()
1720 {
1721 return readPref<bool>("terminal_track_environment");
1722 }
1723
setTerminalTrackEnvironment(bool val)1724 core::Error UserPrefValues::setTerminalTrackEnvironment(bool val)
1725 {
1726 return writePref("terminal_track_environment", val);
1727 }
1728
1729 /**
1730 * Terminal bell style
1731 */
terminalBellStyle()1732 std::string UserPrefValues::terminalBellStyle()
1733 {
1734 return readPref<std::string>("terminal_bell_style");
1735 }
1736
setTerminalBellStyle(std::string val)1737 core::Error UserPrefValues::setTerminalBellStyle(std::string val)
1738 {
1739 return writePref("terminal_bell_style", val);
1740 }
1741
1742 /**
1743 * Terminal rendering engine: canvas is faster, dom may be needed for some browsers or graphics cards
1744 */
terminalRenderer()1745 std::string UserPrefValues::terminalRenderer()
1746 {
1747 return readPref<std::string>("terminal_renderer");
1748 }
1749
setTerminalRenderer(std::string val)1750 core::Error UserPrefValues::setTerminalRenderer(std::string val)
1751 {
1752 return writePref("terminal_renderer", val);
1753 }
1754
1755 /**
1756 * Whether web links displayed in the Terminal tab are made clickable.
1757 */
terminalWeblinks()1758 bool UserPrefValues::terminalWeblinks()
1759 {
1760 return readPref<bool>("terminal_weblinks");
1761 }
1762
setTerminalWeblinks(bool val)1763 core::Error UserPrefValues::setTerminalWeblinks(bool val)
1764 {
1765 return writePref("terminal_weblinks", val);
1766 }
1767
1768 /**
1769 * Whether to print the render command use to knit R Markdown documents in the R Markdown tab.
1770 */
showRmdRenderCommand()1771 bool UserPrefValues::showRmdRenderCommand()
1772 {
1773 return readPref<bool>("show_rmd_render_command");
1774 }
1775
setShowRmdRenderCommand(bool val)1776 core::Error UserPrefValues::setShowRmdRenderCommand(bool val)
1777 {
1778 return writePref("show_rmd_render_command", val);
1779 }
1780
1781 /**
1782 * Whether to enable moving text on the editing surface by clicking and dragging it.
1783 */
enableTextDrag()1784 bool UserPrefValues::enableTextDrag()
1785 {
1786 return readPref<bool>("enable_text_drag");
1787 }
1788
setEnableTextDrag(bool val)1789 core::Error UserPrefValues::setEnableTextDrag(bool val)
1790 {
1791 return writePref("enable_text_drag", val);
1792 }
1793
1794 /**
1795 * Whether to show hidden files in the Files pane.
1796 */
showHiddenFiles()1797 bool UserPrefValues::showHiddenFiles()
1798 {
1799 return readPref<bool>("show_hidden_files");
1800 }
1801
setShowHiddenFiles(bool val)1802 core::Error UserPrefValues::setShowHiddenFiles(bool val)
1803 {
1804 return writePref("show_hidden_files", val);
1805 }
1806
1807 /**
1808 * List of file names (case sensitive) that are always shown in the Files Pane, regardless of whether hidden files are shown
1809 */
alwaysShownFiles()1810 core::json::Array UserPrefValues::alwaysShownFiles()
1811 {
1812 return readPref<core::json::Array>("always_shown_files");
1813 }
1814
setAlwaysShownFiles(core::json::Array val)1815 core::Error UserPrefValues::setAlwaysShownFiles(core::json::Array val)
1816 {
1817 return writePref("always_shown_files", val);
1818 }
1819
1820 /**
1821 * List of file extensions (beginning with ., not case sensitive) that are always shown in the Files Pane, regardless of whether hidden files are shown
1822 */
alwaysShownExtensions()1823 core::json::Array UserPrefValues::alwaysShownExtensions()
1824 {
1825 return readPref<core::json::Array>("always_shown_extensions");
1826 }
1827
setAlwaysShownExtensions(core::json::Array val)1828 core::Error UserPrefValues::setAlwaysShownExtensions(core::json::Array val)
1829 {
1830 return writePref("always_shown_extensions", val);
1831 }
1832
1833 /**
1834 * Whether to sort file names naturally, so that e.g., file10.R comes after file9.R
1835 */
sortFileNamesNaturally()1836 bool UserPrefValues::sortFileNamesNaturally()
1837 {
1838 return readPref<bool>("sort_file_names_naturally");
1839 }
1840
setSortFileNamesNaturally(bool val)1841 core::Error UserPrefValues::setSortFileNamesNaturally(bool val)
1842 {
1843 return writePref("sort_file_names_naturally", val);
1844 }
1845
1846 /**
1847 * Whether to change the directory in the Files pane automatically when the working directory in R changes.
1848 */
syncFilesPaneWorkingDir()1849 bool UserPrefValues::syncFilesPaneWorkingDir()
1850 {
1851 return readPref<bool>("sync_files_pane_working_dir");
1852 }
1853
setSyncFilesPaneWorkingDir(bool val)1854 core::Error UserPrefValues::setSyncFilesPaneWorkingDir(bool val)
1855 {
1856 return writePref("sync_files_pane_working_dir", val);
1857 }
1858
1859 /**
1860 * The visibility of the Jobs tab.
1861 */
jobsTabVisibility()1862 std::string UserPrefValues::jobsTabVisibility()
1863 {
1864 return readPref<std::string>("jobs_tab_visibility");
1865 }
1866
setJobsTabVisibility(std::string val)1867 core::Error UserPrefValues::setJobsTabVisibility(std::string val)
1868 {
1869 return writePref("jobs_tab_visibility", val);
1870 }
1871
1872 /**
1873 * Whether to show the Launcher jobs tab in RStudio Pro and RStudio Workbench.
1874 */
showLauncherJobsTab()1875 bool UserPrefValues::showLauncherJobsTab()
1876 {
1877 return readPref<bool>("show_launcher_jobs_tab");
1878 }
1879
setShowLauncherJobsTab(bool val)1880 core::Error UserPrefValues::setShowLauncherJobsTab(bool val)
1881 {
1882 return writePref("show_launcher_jobs_tab", val);
1883 }
1884
1885 /**
1886 * How to sort jobs in the Launcher tab in RStudio Pro and RStudio Workbench.
1887 */
launcherJobsSort()1888 std::string UserPrefValues::launcherJobsSort()
1889 {
1890 return readPref<std::string>("launcher_jobs_sort");
1891 }
1892
setLauncherJobsSort(std::string val)1893 core::Error UserPrefValues::setLauncherJobsSort(std::string val)
1894 {
1895 return writePref("launcher_jobs_sort", val);
1896 }
1897
1898 /**
1899 * How to detect busy status in the Terminal.
1900 */
busyDetection()1901 std::string UserPrefValues::busyDetection()
1902 {
1903 return readPref<std::string>("busy_detection");
1904 }
1905
setBusyDetection(std::string val)1906 core::Error UserPrefValues::setBusyDetection(std::string val)
1907 {
1908 return writePref("busy_detection", val);
1909 }
1910
1911 /**
1912 * A list of apps that should not be considered busy in the Terminal.
1913 */
busyExclusionList()1914 core::json::Array UserPrefValues::busyExclusionList()
1915 {
1916 return readPref<core::json::Array>("busy_exclusion_list");
1917 }
1918
setBusyExclusionList(core::json::Array val)1919 core::Error UserPrefValues::setBusyExclusionList(core::json::Array val)
1920 {
1921 return writePref("busy_exclusion_list", val);
1922 }
1923
1924 /**
1925 * The working directory to use when knitting R Markdown documents.
1926 */
knitWorkingDir()1927 std::string UserPrefValues::knitWorkingDir()
1928 {
1929 return readPref<std::string>("knit_working_dir");
1930 }
1931
setKnitWorkingDir(std::string val)1932 core::Error UserPrefValues::setKnitWorkingDir(std::string val)
1933 {
1934 return writePref("knit_working_dir", val);
1935 }
1936
1937 /**
1938 * Which objects to show in the document outline pane.
1939 */
docOutlineShow()1940 std::string UserPrefValues::docOutlineShow()
1941 {
1942 return readPref<std::string>("doc_outline_show");
1943 }
1944
setDocOutlineShow(std::string val)1945 core::Error UserPrefValues::setDocOutlineShow(std::string val)
1946 {
1947 return writePref("doc_outline_show", val);
1948 }
1949
1950 /**
1951 * When to preview LaTeX mathematical equations when cursor has not moved recently.
1952 */
latexPreviewOnCursorIdle()1953 std::string UserPrefValues::latexPreviewOnCursorIdle()
1954 {
1955 return readPref<std::string>("latex_preview_on_cursor_idle");
1956 }
1957
setLatexPreviewOnCursorIdle(std::string val)1958 core::Error UserPrefValues::setLatexPreviewOnCursorIdle(std::string val)
1959 {
1960 return writePref("latex_preview_on_cursor_idle", val);
1961 }
1962
1963 /**
1964 * Whether to wrap around when going to the previous or next editor tab.
1965 */
wrapTabNavigation()1966 bool UserPrefValues::wrapTabNavigation()
1967 {
1968 return readPref<bool>("wrap_tab_navigation");
1969 }
1970
setWrapTabNavigation(bool val)1971 core::Error UserPrefValues::setWrapTabNavigation(bool val)
1972 {
1973 return writePref("wrap_tab_navigation", val);
1974 }
1975
1976 /**
1977 * The theme to use for the main RStudio user interface.
1978 */
globalTheme()1979 std::string UserPrefValues::globalTheme()
1980 {
1981 return readPref<std::string>("global_theme");
1982 }
1983
setGlobalTheme(std::string val)1984 core::Error UserPrefValues::setGlobalTheme(std::string val)
1985 {
1986 return writePref("global_theme", val);
1987 }
1988
1989 /**
1990 * Whether to ignore whitespace when generating diffs of version controlled files.
1991 */
gitDiffIgnoreWhitespace()1992 bool UserPrefValues::gitDiffIgnoreWhitespace()
1993 {
1994 return readPref<bool>("git_diff_ignore_whitespace");
1995 }
1996
setGitDiffIgnoreWhitespace(bool val)1997 core::Error UserPrefValues::setGitDiffIgnoreWhitespace(bool val)
1998 {
1999 return writePref("git_diff_ignore_whitespace", val);
2000 }
2001
2002 /**
2003 * Whether double-clicking should select a word in the Console pane.
2004 */
consoleDoubleClickSelect()2005 bool UserPrefValues::consoleDoubleClickSelect()
2006 {
2007 return readPref<bool>("console_double_click_select");
2008 }
2009
setConsoleDoubleClickSelect(bool val)2010 core::Error UserPrefValues::setConsoleDoubleClickSelect(bool val)
2011 {
2012 return writePref("console_double_click_select", val);
2013 }
2014
2015 /**
2016 * Whether a git repo should be initialized inside new projects by default.
2017 */
newProjGitInit()2018 bool UserPrefValues::newProjGitInit()
2019 {
2020 return readPref<bool>("new_proj_git_init");
2021 }
2022
setNewProjGitInit(bool val)2023 core::Error UserPrefValues::setNewProjGitInit(bool val)
2024 {
2025 return writePref("new_proj_git_init", val);
2026 }
2027
2028 /**
2029 * Whether an renv environment should be created inside new projects by default.
2030 */
newProjUseRenv()2031 bool UserPrefValues::newProjUseRenv()
2032 {
2033 return readPref<bool>("new_proj_use_renv");
2034 }
2035
setNewProjUseRenv(bool val)2036 core::Error UserPrefValues::setNewProjUseRenv(bool val)
2037 {
2038 return writePref("new_proj_use_renv", val);
2039 }
2040
2041 /**
2042 * The root document to use when compiling PDF documents.
2043 */
rootDocument()2044 std::string UserPrefValues::rootDocument()
2045 {
2046 return readPref<std::string>("root_document");
2047 }
2048
setRootDocument(std::string val)2049 core::Error UserPrefValues::setRootDocument(std::string val)
2050 {
2051 return writePref("root_document", val);
2052 }
2053
2054 /**
2055 * When to show the server home page in RStudio Workbench.
2056 */
showUserHomePage()2057 std::string UserPrefValues::showUserHomePage()
2058 {
2059 return readPref<std::string>("show_user_home_page");
2060 }
2061
setShowUserHomePage(std::string val)2062 core::Error UserPrefValues::setShowUserHomePage(std::string val)
2063 {
2064 return writePref("show_user_home_page", val);
2065 }
2066
2067 /**
2068 * Whether to reuse sessions when opening projects in RStudio Workbench.
2069 */
reuseSessionsForProjectLinks()2070 bool UserPrefValues::reuseSessionsForProjectLinks()
2071 {
2072 return readPref<bool>("reuse_sessions_for_project_links");
2073 }
2074
setReuseSessionsForProjectLinks(bool val)2075 core::Error UserPrefValues::setReuseSessionsForProjectLinks(bool val)
2076 {
2077 return writePref("reuse_sessions_for_project_links", val);
2078 }
2079
2080 /**
2081 * Whether to enable RStudio's version control system interface.
2082 */
vcsEnabled()2083 bool UserPrefValues::vcsEnabled()
2084 {
2085 return readPref<bool>("vcs_enabled");
2086 }
2087
setVcsEnabled(bool val)2088 core::Error UserPrefValues::setVcsEnabled(bool val)
2089 {
2090 return writePref("vcs_enabled", val);
2091 }
2092
2093 /**
2094 * Automatically refresh VCS status?
2095 */
vcsAutorefresh()2096 bool UserPrefValues::vcsAutorefresh()
2097 {
2098 return readPref<bool>("vcs_autorefresh");
2099 }
2100
setVcsAutorefresh(bool val)2101 core::Error UserPrefValues::setVcsAutorefresh(bool val)
2102 {
2103 return writePref("vcs_autorefresh", val);
2104 }
2105
2106 /**
2107 * The path to the Git executable to use.
2108 */
gitExePath()2109 std::string UserPrefValues::gitExePath()
2110 {
2111 return readPref<std::string>("git_exe_path");
2112 }
2113
setGitExePath(std::string val)2114 core::Error UserPrefValues::setGitExePath(std::string val)
2115 {
2116 return writePref("git_exe_path", val);
2117 }
2118
2119 /**
2120 * The path to the Subversion executable to use.
2121 */
svnExePath()2122 std::string UserPrefValues::svnExePath()
2123 {
2124 return readPref<std::string>("svn_exe_path");
2125 }
2126
setSvnExePath(std::string val)2127 core::Error UserPrefValues::setSvnExePath(std::string val)
2128 {
2129 return writePref("svn_exe_path", val);
2130 }
2131
2132 /**
2133 * The path to the terminal executable to use.
2134 */
terminalPath()2135 std::string UserPrefValues::terminalPath()
2136 {
2137 return readPref<std::string>("terminal_path");
2138 }
2139
setTerminalPath(std::string val)2140 core::Error UserPrefValues::setTerminalPath(std::string val)
2141 {
2142 return writePref("terminal_path", val);
2143 }
2144
2145 /**
2146 * The path to the RSA key file to use.
2147 */
rsaKeyPath()2148 std::string UserPrefValues::rsaKeyPath()
2149 {
2150 return readPref<std::string>("rsa_key_path");
2151 }
2152
setRsaKeyPath(std::string val)2153 core::Error UserPrefValues::setRsaKeyPath(std::string val)
2154 {
2155 return writePref("rsa_key_path", val);
2156 }
2157
2158 /**
2159 * Whether to use the devtools R package.
2160 */
useDevtools()2161 bool UserPrefValues::useDevtools()
2162 {
2163 return readPref<bool>("use_devtools");
2164 }
2165
setUseDevtools(bool val)2166 core::Error UserPrefValues::setUseDevtools(bool val)
2167 {
2168 return writePref("use_devtools", val);
2169 }
2170
2171 /**
2172 * Whether to use Internet2 for networking on R for Windows.
2173 */
useInternet2()2174 bool UserPrefValues::useInternet2()
2175 {
2176 return readPref<bool>("use_internet2");
2177 }
2178
setUseInternet2(bool val)2179 core::Error UserPrefValues::setUseInternet2(bool val)
2180 {
2181 return writePref("use_internet2", val);
2182 }
2183
2184 /**
2185 * Whether to use secure downloads when fetching R packages.
2186 */
useSecureDownload()2187 bool UserPrefValues::useSecureDownload()
2188 {
2189 return readPref<bool>("use_secure_download");
2190 }
2191
setUseSecureDownload(bool val)2192 core::Error UserPrefValues::setUseSecureDownload(bool val)
2193 {
2194 return writePref("use_secure_download", val);
2195 }
2196
2197 /**
2198 * Whether to clean up temporary files after running R CMD CHECK.
2199 */
cleanupAfterRCmdCheck()2200 bool UserPrefValues::cleanupAfterRCmdCheck()
2201 {
2202 return readPref<bool>("cleanup_after_r_cmd_check");
2203 }
2204
setCleanupAfterRCmdCheck(bool val)2205 core::Error UserPrefValues::setCleanupAfterRCmdCheck(bool val)
2206 {
2207 return writePref("cleanup_after_r_cmd_check", val);
2208 }
2209
2210 /**
2211 * Whether to view the directory after running R CMD CHECK.
2212 */
viewDirAfterRCmdCheck()2213 bool UserPrefValues::viewDirAfterRCmdCheck()
2214 {
2215 return readPref<bool>("view_dir_after_r_cmd_check");
2216 }
2217
setViewDirAfterRCmdCheck(bool val)2218 core::Error UserPrefValues::setViewDirAfterRCmdCheck(bool val)
2219 {
2220 return writePref("view_dir_after_r_cmd_check", val);
2221 }
2222
2223 /**
2224 * Whether to hide object files in the Files pane.
2225 */
hideObjectFiles()2226 bool UserPrefValues::hideObjectFiles()
2227 {
2228 return readPref<bool>("hide_object_files");
2229 }
2230
setHideObjectFiles(bool val)2231 core::Error UserPrefValues::setHideObjectFiles(bool val)
2232 {
2233 return writePref("hide_object_files", val);
2234 }
2235
2236 /**
2237 * Whether to restore the last project when starting RStudio.
2238 */
restoreLastProject()2239 bool UserPrefValues::restoreLastProject()
2240 {
2241 return readPref<bool>("restore_last_project");
2242 }
2243
setRestoreLastProject(bool val)2244 core::Error UserPrefValues::setRestoreLastProject(bool val)
2245 {
2246 return writePref("restore_last_project", val);
2247 }
2248
2249 /**
2250 * The number of seconds after which a project is deemed to have successfully started.
2251 */
projectSafeStartupSeconds()2252 int UserPrefValues::projectSafeStartupSeconds()
2253 {
2254 return readPref<int>("project_safe_startup_seconds");
2255 }
2256
setProjectSafeStartupSeconds(int val)2257 core::Error UserPrefValues::setProjectSafeStartupSeconds(int val)
2258 {
2259 return writePref("project_safe_startup_seconds", val);
2260 }
2261
2262 /**
2263 * Use tinytex to compile .tex files.
2264 */
useTinytex()2265 bool UserPrefValues::useTinytex()
2266 {
2267 return readPref<bool>("use_tinytex");
2268 }
2269
setUseTinytex(bool val)2270 core::Error UserPrefValues::setUseTinytex(bool val)
2271 {
2272 return writePref("use_tinytex", val);
2273 }
2274
2275 /**
2276 * Whether to clean output after running Texi2Dvi.
2277 */
cleanTexi2dviOutput()2278 bool UserPrefValues::cleanTexi2dviOutput()
2279 {
2280 return readPref<bool>("clean_texi2dvi_output");
2281 }
2282
setCleanTexi2dviOutput(bool val)2283 core::Error UserPrefValues::setCleanTexi2dviOutput(bool val)
2284 {
2285 return writePref("clean_texi2dvi_output", val);
2286 }
2287
2288 /**
2289 * Whether to enable shell escaping with LaTeX documents.
2290 */
latexShellEscape()2291 bool UserPrefValues::latexShellEscape()
2292 {
2293 return readPref<bool>("latex_shell_escape");
2294 }
2295
setLatexShellEscape(bool val)2296 core::Error UserPrefValues::setLatexShellEscape(bool val)
2297 {
2298 return writePref("latex_shell_escape", val);
2299 }
2300
2301 /**
2302 * Whether to restore the last version of R used by the project in RStudio Pro and RStudio Workbench.
2303 */
restoreProjectRVersion()2304 bool UserPrefValues::restoreProjectRVersion()
2305 {
2306 return readPref<bool>("restore_project_r_version");
2307 }
2308
setRestoreProjectRVersion(bool val)2309 core::Error UserPrefValues::setRestoreProjectRVersion(bool val)
2310 {
2311 return writePref("restore_project_r_version", val);
2312 }
2313
2314 /**
2315 * The verbosity level to use with Clang (0 - 2)
2316 */
clangVerbose()2317 int UserPrefValues::clangVerbose()
2318 {
2319 return readPref<int>("clang_verbose");
2320 }
2321
setClangVerbose(int val)2322 core::Error UserPrefValues::setClangVerbose(int val)
2323 {
2324 return writePref("clang_verbose", val);
2325 }
2326
2327 /**
2328 * Whether to automatically submit crash reports to RStudio.
2329 */
submitCrashReports()2330 bool UserPrefValues::submitCrashReports()
2331 {
2332 return readPref<bool>("submit_crash_reports");
2333 }
2334
setSubmitCrashReports(bool val)2335 core::Error UserPrefValues::setSubmitCrashReports(bool val)
2336 {
2337 return writePref("submit_crash_reports", val);
2338 }
2339
2340 /**
2341 * The R version to use by default.
2342 */
defaultRVersion()2343 core::json::Object UserPrefValues::defaultRVersion()
2344 {
2345 return readPref<core::json::Object>("default_r_version");
2346 }
2347
setDefaultRVersion(core::json::Object val)2348 core::Error UserPrefValues::setDefaultRVersion(core::json::Object val)
2349 {
2350 return writePref("default_r_version", val);
2351 }
2352
2353 /**
2354 * The maximum number of columns to show at once in the data viewer.
2355 */
dataViewerMaxColumns()2356 int UserPrefValues::dataViewerMaxColumns()
2357 {
2358 return readPref<int>("data_viewer_max_columns");
2359 }
2360
setDataViewerMaxColumns(int val)2361 core::Error UserPrefValues::setDataViewerMaxColumns(int val)
2362 {
2363 return writePref("data_viewer_max_columns", val);
2364 }
2365
2366 /**
2367 * Support accessibility aids such as screen readers (RStudio Server).
2368 */
enableScreenReader()2369 bool UserPrefValues::enableScreenReader()
2370 {
2371 return readPref<bool>("enable_screen_reader");
2372 }
2373
setEnableScreenReader(bool val)2374 core::Error UserPrefValues::setEnableScreenReader(bool val)
2375 {
2376 return writePref("enable_screen_reader", val);
2377 }
2378
2379 /**
2380 * Number of milliseconds to wait after last keystroke before updating live region.
2381 */
typingStatusDelayMs()2382 int UserPrefValues::typingStatusDelayMs()
2383 {
2384 return readPref<int>("typing_status_delay_ms");
2385 }
2386
setTypingStatusDelayMs(int val)2387 core::Error UserPrefValues::setTypingStatusDelayMs(int val)
2388 {
2389 return writePref("typing_status_delay_ms", val);
2390 }
2391
2392 /**
2393 * Reduce use of animations in the user interface.
2394 */
reducedMotion()2395 bool UserPrefValues::reducedMotion()
2396 {
2397 return readPref<bool>("reduced_motion");
2398 }
2399
setReducedMotion(bool val)2400 core::Error UserPrefValues::setReducedMotion(bool val)
2401 {
2402 return writePref("reduced_motion", val);
2403 }
2404
2405 /**
2406 * Tab key moves focus out of text editing controls instead of inserting tabs.
2407 */
tabKeyMoveFocus()2408 bool UserPrefValues::tabKeyMoveFocus()
2409 {
2410 return readPref<bool>("tab_key_move_focus");
2411 }
2412
setTabKeyMoveFocus(bool val)2413 core::Error UserPrefValues::setTabKeyMoveFocus(bool val)
2414 {
2415 return writePref("tab_key_move_focus", val);
2416 }
2417
2418 /**
2419 * In source editor find panel, tab key moves focus directly from find text to replace text.
2420 */
findPanelLegacyTabSequence()2421 bool UserPrefValues::findPanelLegacyTabSequence()
2422 {
2423 return readPref<bool>("find_panel_legacy_tab_sequence");
2424 }
2425
setFindPanelLegacyTabSequence(bool val)2426 core::Error UserPrefValues::setFindPanelLegacyTabSequence(bool val)
2427 {
2428 return writePref("find_panel_legacy_tab_sequence", val);
2429 }
2430
2431 /**
2432 * Control with keyboard focus displays a visual focus indicator.
2433 */
showFocusRectangles()2434 bool UserPrefValues::showFocusRectangles()
2435 {
2436 return readPref<bool>("show_focus_rectangles");
2437 }
2438
setShowFocusRectangles(bool val)2439 core::Error UserPrefValues::setShowFocusRectangles(bool val)
2440 {
2441 return writePref("show_focus_rectangles", val);
2442 }
2443
2444 /**
2445 * Show which panel contains keyboard focus.
2446 */
showPanelFocusRectangle()2447 bool UserPrefValues::showPanelFocusRectangle()
2448 {
2449 return readPref<bool>("show_panel_focus_rectangle");
2450 }
2451
setShowPanelFocusRectangle(bool val)2452 core::Error UserPrefValues::setShowPanelFocusRectangle(bool val)
2453 {
2454 return writePref("show_panel_focus_rectangle", val);
2455 }
2456
2457 /**
2458 * How to deal with changes to documents on idle.
2459 */
autoSaveOnIdle()2460 std::string UserPrefValues::autoSaveOnIdle()
2461 {
2462 return readPref<std::string>("auto_save_on_idle");
2463 }
2464
setAutoSaveOnIdle(std::string val)2465 core::Error UserPrefValues::setAutoSaveOnIdle(std::string val)
2466 {
2467 return writePref("auto_save_on_idle", val);
2468 }
2469
2470 /**
2471 * The idle period, in milliseconds, after which documents should be auto-saved.
2472 */
autoSaveIdleMs()2473 int UserPrefValues::autoSaveIdleMs()
2474 {
2475 return readPref<int>("auto_save_idle_ms");
2476 }
2477
setAutoSaveIdleMs(int val)2478 core::Error UserPrefValues::setAutoSaveIdleMs(int val)
2479 {
2480 return writePref("auto_save_idle_ms", val);
2481 }
2482
2483 /**
2484 * Whether to automatically save when the editor loses focus.
2485 */
autoSaveOnBlur()2486 bool UserPrefValues::autoSaveOnBlur()
2487 {
2488 return readPref<bool>("auto_save_on_blur");
2489 }
2490
setAutoSaveOnBlur(bool val)2491 core::Error UserPrefValues::setAutoSaveOnBlur(bool val)
2492 {
2493 return writePref("auto_save_on_blur", val);
2494 }
2495
2496 /**
2497 * Initial directory for new terminals.
2498 */
terminalInitialDirectory()2499 std::string UserPrefValues::terminalInitialDirectory()
2500 {
2501 return readPref<std::string>("terminal_initial_directory");
2502 }
2503
setTerminalInitialDirectory(std::string val)2504 core::Error UserPrefValues::setTerminalInitialDirectory(std::string val)
2505 {
2506 return writePref("terminal_initial_directory", val);
2507 }
2508
2509 /**
2510 * Whether to show the full path to project in desktop window title.
2511 */
fullProjectPathInWindowTitle()2512 bool UserPrefValues::fullProjectPathInWindowTitle()
2513 {
2514 return readPref<bool>("full_project_path_in_window_title");
2515 }
2516
setFullProjectPathInWindowTitle(bool val)2517 core::Error UserPrefValues::setFullProjectPathInWindowTitle(bool val)
2518 {
2519 return writePref("full_project_path_in_window_title", val);
2520 }
2521
2522 /**
2523 * Whether to enable visual editing by default for new markdown documents
2524 */
visualMarkdownEditingIsDefault()2525 bool UserPrefValues::visualMarkdownEditingIsDefault()
2526 {
2527 return readPref<bool>("visual_markdown_editing_is_default");
2528 }
2529
setVisualMarkdownEditingIsDefault(bool val)2530 core::Error UserPrefValues::setVisualMarkdownEditingIsDefault(bool val)
2531 {
2532 return writePref("visual_markdown_editing_is_default", val);
2533 }
2534
2535 /**
2536 * Default spacing for lists created in the visual editor
2537 */
visualMarkdownEditingListSpacing()2538 std::string UserPrefValues::visualMarkdownEditingListSpacing()
2539 {
2540 return readPref<std::string>("visual_markdown_editing_list_spacing");
2541 }
2542
setVisualMarkdownEditingListSpacing(std::string val)2543 core::Error UserPrefValues::setVisualMarkdownEditingListSpacing(std::string val)
2544 {
2545 return writePref("visual_markdown_editing_list_spacing", val);
2546 }
2547
2548 /**
2549 * Whether to automatically wrap text when writing markdown
2550 */
visualMarkdownEditingWrap()2551 std::string UserPrefValues::visualMarkdownEditingWrap()
2552 {
2553 return readPref<std::string>("visual_markdown_editing_wrap");
2554 }
2555
setVisualMarkdownEditingWrap(std::string val)2556 core::Error UserPrefValues::setVisualMarkdownEditingWrap(std::string val)
2557 {
2558 return writePref("visual_markdown_editing_wrap", val);
2559 }
2560
2561 /**
2562 * The column to wrap text at when writing markdown
2563 */
visualMarkdownEditingWrapAtColumn()2564 int UserPrefValues::visualMarkdownEditingWrapAtColumn()
2565 {
2566 return readPref<int>("visual_markdown_editing_wrap_at_column");
2567 }
2568
setVisualMarkdownEditingWrapAtColumn(int val)2569 core::Error UserPrefValues::setVisualMarkdownEditingWrapAtColumn(int val)
2570 {
2571 return writePref("visual_markdown_editing_wrap_at_column", val);
2572 }
2573
2574 /**
2575 * Placement of footnotes within markdown output.
2576 */
visualMarkdownEditingReferencesLocation()2577 std::string UserPrefValues::visualMarkdownEditingReferencesLocation()
2578 {
2579 return readPref<std::string>("visual_markdown_editing_references_location");
2580 }
2581
setVisualMarkdownEditingReferencesLocation(std::string val)2582 core::Error UserPrefValues::setVisualMarkdownEditingReferencesLocation(std::string val)
2583 {
2584 return writePref("visual_markdown_editing_references_location", val);
2585 }
2586
2587 /**
2588 * Whether to write canonical visual mode markdown when saving from source mode.
2589 */
visualMarkdownEditingCanonical()2590 bool UserPrefValues::visualMarkdownEditingCanonical()
2591 {
2592 return readPref<bool>("visual_markdown_editing_canonical");
2593 }
2594
setVisualMarkdownEditingCanonical(bool val)2595 core::Error UserPrefValues::setVisualMarkdownEditingCanonical(bool val)
2596 {
2597 return writePref("visual_markdown_editing_canonical", val);
2598 }
2599
2600 /**
2601 * Maximum content width for visual editing mode, in pixels
2602 */
visualMarkdownEditingMaxContentWidth()2603 int UserPrefValues::visualMarkdownEditingMaxContentWidth()
2604 {
2605 return readPref<int>("visual_markdown_editing_max_content_width");
2606 }
2607
setVisualMarkdownEditingMaxContentWidth(int val)2608 core::Error UserPrefValues::setVisualMarkdownEditingMaxContentWidth(int val)
2609 {
2610 return writePref("visual_markdown_editing_max_content_width", val);
2611 }
2612
2613 /**
2614 * Whether to show the document outline by default when opening R Markdown documents in visual mode.
2615 */
visualMarkdownEditingShowDocOutline()2616 bool UserPrefValues::visualMarkdownEditingShowDocOutline()
2617 {
2618 return readPref<bool>("visual_markdown_editing_show_doc_outline");
2619 }
2620
setVisualMarkdownEditingShowDocOutline(bool val)2621 core::Error UserPrefValues::setVisualMarkdownEditingShowDocOutline(bool val)
2622 {
2623 return writePref("visual_markdown_editing_show_doc_outline", val);
2624 }
2625
2626 /**
2627 * Whether to show the margin guide in the visual mode code blocks.
2628 */
visualMarkdownEditingShowMargin()2629 bool UserPrefValues::visualMarkdownEditingShowMargin()
2630 {
2631 return readPref<bool>("visual_markdown_editing_show_margin");
2632 }
2633
setVisualMarkdownEditingShowMargin(bool val)2634 core::Error UserPrefValues::setVisualMarkdownEditingShowMargin(bool val)
2635 {
2636 return writePref("visual_markdown_editing_show_margin", val);
2637 }
2638
2639 /**
2640 * The default visual editing mode font size, in points
2641 */
visualMarkdownEditingFontSizePoints()2642 int UserPrefValues::visualMarkdownEditingFontSizePoints()
2643 {
2644 return readPref<int>("visual_markdown_editing_font_size_points");
2645 }
2646
setVisualMarkdownEditingFontSizePoints(int val)2647 core::Error UserPrefValues::setVisualMarkdownEditingFontSizePoints(int val)
2648 {
2649 return writePref("visual_markdown_editing_font_size_points", val);
2650 }
2651
2652 /**
2653 * The name of the editor to use to provide code editing in visual mode
2654 */
visualMarkdownCodeEditor()2655 std::string UserPrefValues::visualMarkdownCodeEditor()
2656 {
2657 return readPref<std::string>("visual_markdown_code_editor");
2658 }
2659
setVisualMarkdownCodeEditor(std::string val)2660 core::Error UserPrefValues::setVisualMarkdownCodeEditor(std::string val)
2661 {
2662 return writePref("visual_markdown_code_editor", val);
2663 }
2664
2665 /**
2666 * Zotero libraries to insert citations from.
2667 */
zoteroLibraries()2668 core::json::Array UserPrefValues::zoteroLibraries()
2669 {
2670 return readPref<core::json::Array>("zotero_libraries");
2671 }
2672
setZoteroLibraries(core::json::Array val)2673 core::Error UserPrefValues::setZoteroLibraries(core::json::Array val)
2674 {
2675 return writePref("zotero_libraries", val);
2676 }
2677
2678 /**
2679 * Preferred emoji skintone
2680 */
emojiSkintone()2681 std::string UserPrefValues::emojiSkintone()
2682 {
2683 return readPref<std::string>("emoji_skintone");
2684 }
2685
setEmojiSkintone(std::string val)2686 core::Error UserPrefValues::setEmojiSkintone(std::string val)
2687 {
2688 return writePref("emoji_skintone", val);
2689 }
2690
2691 /**
2692 * List of aria-live announcements to disable.
2693 */
disabledAriaLiveAnnouncements()2694 core::json::Array UserPrefValues::disabledAriaLiveAnnouncements()
2695 {
2696 return readPref<core::json::Array>("disabled_aria_live_announcements");
2697 }
2698
setDisabledAriaLiveAnnouncements(core::json::Array val)2699 core::Error UserPrefValues::setDisabledAriaLiveAnnouncements(core::json::Array val)
2700 {
2701 return writePref("disabled_aria_live_announcements", val);
2702 }
2703
2704 /**
2705 * Maximum number of lines of console output announced after a command.
2706 */
screenreaderConsoleAnnounceLimit()2707 int UserPrefValues::screenreaderConsoleAnnounceLimit()
2708 {
2709 return readPref<int>("screenreader_console_announce_limit");
2710 }
2711
setScreenreaderConsoleAnnounceLimit(int val)2712 core::Error UserPrefValues::setScreenreaderConsoleAnnounceLimit(int val)
2713 {
2714 return writePref("screenreader_console_announce_limit", val);
2715 }
2716
2717 /**
2718 * List of path components; file monitor will ignore paths containing one or more of these components.
2719 */
fileMonitorIgnoredComponents()2720 core::json::Array UserPrefValues::fileMonitorIgnoredComponents()
2721 {
2722 return readPref<core::json::Array>("file_monitor_ignored_components");
2723 }
2724
setFileMonitorIgnoredComponents(core::json::Array val)2725 core::Error UserPrefValues::setFileMonitorIgnoredComponents(core::json::Array val)
2726 {
2727 return writePref("file_monitor_ignored_components", val);
2728 }
2729
2730 /**
2731 * Whether to install R package dependencies one at a time.
2732 */
installPkgDepsIndividually()2733 bool UserPrefValues::installPkgDepsIndividually()
2734 {
2735 return readPref<bool>("install_pkg_deps_individually");
2736 }
2737
setInstallPkgDepsIndividually(bool val)2738 core::Error UserPrefValues::setInstallPkgDepsIndividually(bool val)
2739 {
2740 return writePref("install_pkg_deps_individually", val);
2741 }
2742
2743 /**
2744 * R graphics backend.
2745 */
graphicsBackend()2746 std::string UserPrefValues::graphicsBackend()
2747 {
2748 return readPref<std::string>("graphics_backend");
2749 }
2750
setGraphicsBackend(std::string val)2751 core::Error UserPrefValues::setGraphicsBackend(std::string val)
2752 {
2753 return writePref("graphics_backend", val);
2754 }
2755
2756 /**
2757 * Type of anti-aliasing to be used for generated R plots.
2758 */
graphicsAntialiasing()2759 std::string UserPrefValues::graphicsAntialiasing()
2760 {
2761 return readPref<std::string>("graphics_antialiasing");
2762 }
2763
setGraphicsAntialiasing(std::string val)2764 core::Error UserPrefValues::setGraphicsAntialiasing(std::string val)
2765 {
2766 return writePref("graphics_antialiasing", val);
2767 }
2768
2769 /**
2770 * List of fixed-width fonts to check for browser support.
2771 */
browserFixedWidthFonts()2772 core::json::Array UserPrefValues::browserFixedWidthFonts()
2773 {
2774 return readPref<core::json::Array>("browser_fixed_width_fonts");
2775 }
2776
setBrowserFixedWidthFonts(core::json::Array val)2777 core::Error UserPrefValues::setBrowserFixedWidthFonts(core::json::Array val)
2778 {
2779 return writePref("browser_fixed_width_fonts", val);
2780 }
2781
2782 /**
2783 * The Python type.
2784 */
pythonType()2785 std::string UserPrefValues::pythonType()
2786 {
2787 return readPref<std::string>("python_type");
2788 }
2789
setPythonType(std::string val)2790 core::Error UserPrefValues::setPythonType(std::string val)
2791 {
2792 return writePref("python_type", val);
2793 }
2794
2795 /**
2796 * The Python version.
2797 */
pythonVersion()2798 std::string UserPrefValues::pythonVersion()
2799 {
2800 return readPref<std::string>("python_version");
2801 }
2802
setPythonVersion(std::string val)2803 core::Error UserPrefValues::setPythonVersion(std::string val)
2804 {
2805 return writePref("python_version", val);
2806 }
2807
2808 /**
2809 * The path to the default Python interpreter.
2810 */
pythonPath()2811 std::string UserPrefValues::pythonPath()
2812 {
2813 return readPref<std::string>("python_path");
2814 }
2815
setPythonPath(std::string val)2816 core::Error UserPrefValues::setPythonPath(std::string val)
2817 {
2818 return writePref("python_path", val);
2819 }
2820
2821 /**
2822 * The maximum amount of seconds of retry for save operations.
2823 */
saveRetryTimeout()2824 int UserPrefValues::saveRetryTimeout()
2825 {
2826 return readPref<int>("save_retry_timeout");
2827 }
2828
setSaveRetryTimeout(int val)2829 core::Error UserPrefValues::setSaveRetryTimeout(int val)
2830 {
2831 return writePref("save_retry_timeout", val);
2832 }
2833
2834 /**
2835 * Whether the Insert Pipe Operator command should insert the native R pipe operator, |>
2836 */
insertNativePipeOperator()2837 bool UserPrefValues::insertNativePipeOperator()
2838 {
2839 return readPref<bool>("insert_native_pipe_operator");
2840 }
2841
setInsertNativePipeOperator(bool val)2842 core::Error UserPrefValues::setInsertNativePipeOperator(bool val)
2843 {
2844 return writePref("insert_native_pipe_operator", val);
2845 }
2846
2847 /**
2848 * Whether to keep track of recently used commands in the Command Palette
2849 */
commandPaletteMru()2850 bool UserPrefValues::commandPaletteMru()
2851 {
2852 return readPref<bool>("command_palette_mru");
2853 }
2854
setCommandPaletteMru(bool val)2855 core::Error UserPrefValues::setCommandPaletteMru(bool val)
2856 {
2857 return writePref("command_palette_mru", val);
2858 }
2859
2860 /**
2861 * Whether to compute and show memory usage in the Environment Pane
2862 */
showMemoryUsage()2863 bool UserPrefValues::showMemoryUsage()
2864 {
2865 return readPref<bool>("show_memory_usage");
2866 }
2867
setShowMemoryUsage(bool val)2868 core::Error UserPrefValues::setShowMemoryUsage(bool val)
2869 {
2870 return writePref("show_memory_usage", val);
2871 }
2872
2873 /**
2874 * How many seconds to wait between automatic requeries of memory statistics (0 to disable)
2875 */
memoryQueryIntervalSeconds()2876 int UserPrefValues::memoryQueryIntervalSeconds()
2877 {
2878 return readPref<int>("memory_query_interval_seconds");
2879 }
2880
setMemoryQueryIntervalSeconds(int val)2881 core::Error UserPrefValues::setMemoryQueryIntervalSeconds(int val)
2882 {
2883 return writePref("memory_query_interval_seconds", val);
2884 }
2885
2886 /**
2887 * Enable Python terminal hooks. When enabled, the RStudio-configured version of Python will be placed on the PATH.
2888 */
terminalPythonIntegration()2889 bool UserPrefValues::terminalPythonIntegration()
2890 {
2891 return readPref<bool>("terminal_python_integration");
2892 }
2893
setTerminalPythonIntegration(bool val)2894 core::Error UserPrefValues::setTerminalPythonIntegration(bool val)
2895 {
2896 return writePref("terminal_python_integration", val);
2897 }
2898
2899 /**
2900 * Enable session protocol debug logging showing all session requests and events
2901 */
sessionProtocolDebug()2902 bool UserPrefValues::sessionProtocolDebug()
2903 {
2904 return readPref<bool>("session_protocol_debug");
2905 }
2906
setSessionProtocolDebug(bool val)2907 core::Error UserPrefValues::setSessionProtocolDebug(bool val)
2908 {
2909 return writePref("session_protocol_debug", val);
2910 }
2911
2912 /**
2913 * When enabled, if the active project contains a Python virtual environment, then RStudio will automatically activate this environment on startup.
2914 */
pythonProjectEnvironmentAutomaticActivate()2915 bool UserPrefValues::pythonProjectEnvironmentAutomaticActivate()
2916 {
2917 return readPref<bool>("python_project_environment_automatic_activate");
2918 }
2919
setPythonProjectEnvironmentAutomaticActivate(bool val)2920 core::Error UserPrefValues::setPythonProjectEnvironmentAutomaticActivate(bool val)
2921 {
2922 return writePref("python_project_environment_automatic_activate", val);
2923 }
2924
2925 /**
2926 * When enabled, RStudio will detect R objects containing null external pointers when building the Environment pane, and avoid introspecting their contents further.
2927 */
checkNullExternalPointers()2928 bool UserPrefValues::checkNullExternalPointers()
2929 {
2930 return readPref<bool>("check_null_external_pointers");
2931 }
2932
setCheckNullExternalPointers(bool val)2933 core::Error UserPrefValues::setCheckNullExternalPointers(bool val)
2934 {
2935 return writePref("check_null_external_pointers", val);
2936 }
2937
allKeys()2938 std::vector<std::string> UserPrefValues::allKeys()
2939 {
2940 return std::vector<std::string>({
2941 kRunRprofileOnResume,
2942 kSaveWorkspace,
2943 kLoadWorkspace,
2944 kInitialWorkingDirectory,
2945 kCranMirror,
2946 kBioconductorMirrorName,
2947 kBioconductorMirrorUrl,
2948 kAlwaysSaveHistory,
2949 kRemoveHistoryDuplicates,
2950 kShowLastDotValue,
2951 kLineEndingConversion,
2952 kUseNewlinesInMakefiles,
2953 kWindowsTerminalShell,
2954 kPosixTerminalShell,
2955 kCustomShellCommand,
2956 kCustomShellOptions,
2957 kShowLineNumbers,
2958 kHighlightSelectedWord,
2959 kHighlightSelectedLine,
2960 kPanes,
2961 kAllowSourceColumns,
2962 kUseSpacesForTab,
2963 kNumSpacesForTab,
2964 kAutoDetectIndentation,
2965 kShowMargin,
2966 kBlinkingCursor,
2967 kMarginColumn,
2968 kShowInvisibles,
2969 kShowIndentGuides,
2970 kContinueCommentsOnNewline,
2971 kHighlightWebLink,
2972 kEditorKeybindings,
2973 kInsertMatching,
2974 kInsertSpacesAroundEquals,
2975 kInsertParensAfterFunctionCompletion,
2976 kTabMultilineCompletion,
2977 kTabCompletion,
2978 kShowHelpTooltipOnIdle,
2979 kSurroundSelection,
2980 kEnableSnippets,
2981 kCodeCompletion,
2982 kCodeCompletionOther,
2983 kConsoleCodeCompletion,
2984 kCodeCompletionDelay,
2985 kCodeCompletionCharacters,
2986 kShowFunctionSignatureTooltips,
2987 kShowDiagnosticsR,
2988 kShowDiagnosticsCpp,
2989 kShowDiagnosticsOther,
2990 kStyleDiagnostics,
2991 kDiagnosticsOnSave,
2992 kBackgroundDiagnostics,
2993 kBackgroundDiagnosticsDelayMs,
2994 kDiagnosticsInRFunctionCalls,
2995 kCheckArgumentsToRFunctionCalls,
2996 kCheckUnexpectedAssignmentInFunctionCall,
2997 kWarnIfNoSuchVariableInScope,
2998 kWarnVariableDefinedButNotUsed,
2999 kAutoDiscoverPackageDependencies,
3000 kAutoAppendNewline,
3001 kStripTrailingWhitespace,
3002 kRestoreSourceDocumentCursorPosition,
3003 kReindentOnPaste,
3004 kVerticallyAlignArgumentsIndent,
3005 kSoftWrapRFiles,
3006 kSoftWrapRmdFiles,
3007 kFocusConsoleAfterExec,
3008 kFoldStyle,
3009 kSaveBeforeSourcing,
3010 kSyntaxColorConsole,
3011 kHighlightConsoleErrors,
3012 kScrollPastEndOfDocument,
3013 kHighlightRFunctionCalls,
3014 kRainbowParentheses,
3015 kConsoleLineLengthLimit,
3016 kConsoleMaxLines,
3017 kAnsiConsoleMode,
3018 kLimitVisibleConsole,
3019 kShowInlineToolbarForRCodeChunks,
3020 kHighlightCodeChunks,
3021 kSaveFilesBeforeBuild,
3022 kFontSizePoints,
3023 kHelpFontSizePoints,
3024 kEditorTheme,
3025 kServerEditorFontEnabled,
3026 kServerEditorFont,
3027 kDefaultEncoding,
3028 kToolbarVisible,
3029 kDefaultProjectLocation,
3030 kSourceWithEcho,
3031 kDefaultSweaveEngine,
3032 kDefaultLatexProgram,
3033 kUseRoxygen,
3034 kUseDataimport,
3035 kPdfPreviewer,
3036 kAlwaysEnableRnwConcordance,
3037 kInsertNumberedLatexSections,
3038 kSpellingDictionaryLanguage,
3039 kSpellingCustomDictionaries,
3040 kDocumentLoadLintDelay,
3041 kIgnoreUppercaseWords,
3042 kIgnoreWordsWithNumbers,
3043 kRealTimeSpellchecking,
3044 kNavigateToBuildError,
3045 kPackagesPaneEnabled,
3046 kUseRcppTemplate,
3047 kRestoreSourceDocuments,
3048 kHandleErrorsInUserCodeOnly,
3049 kAutoExpandErrorTracebacks,
3050 kCheckForUpdates,
3051 kShowInternalFunctions,
3052 kShinyViewerType,
3053 kShinyBackgroundJobs,
3054 kPlumberViewerType,
3055 kDocumentAuthor,
3056 kRmdPreferredTemplatePath,
3057 kRmdViewerType,
3058 kShowPublishDiagnostics,
3059 kPublishCheckCertificates,
3060 kUsePublishCaBundle,
3061 kPublishCaBundle,
3062 kRmdChunkOutputInline,
3063 kShowDocOutlineRmd,
3064 kAutoRunSetupChunk,
3065 kHideConsoleOnChunkExecute,
3066 kExecutionBehavior,
3067 kShowTerminalTab,
3068 kTerminalLocalEcho,
3069 kTerminalWebsockets,
3070 kTerminalCloseBehavior,
3071 kTerminalTrackEnvironment,
3072 kTerminalBellStyle,
3073 kTerminalRenderer,
3074 kTerminalWeblinks,
3075 kShowRmdRenderCommand,
3076 kEnableTextDrag,
3077 kShowHiddenFiles,
3078 kAlwaysShownFiles,
3079 kAlwaysShownExtensions,
3080 kSortFileNamesNaturally,
3081 kSyncFilesPaneWorkingDir,
3082 kJobsTabVisibility,
3083 kShowLauncherJobsTab,
3084 kLauncherJobsSort,
3085 kBusyDetection,
3086 kBusyExclusionList,
3087 kKnitWorkingDir,
3088 kDocOutlineShow,
3089 kLatexPreviewOnCursorIdle,
3090 kWrapTabNavigation,
3091 kGlobalTheme,
3092 kGitDiffIgnoreWhitespace,
3093 kConsoleDoubleClickSelect,
3094 kNewProjGitInit,
3095 kNewProjUseRenv,
3096 kRootDocument,
3097 kShowUserHomePage,
3098 kReuseSessionsForProjectLinks,
3099 kVcsEnabled,
3100 kVcsAutorefresh,
3101 kGitExePath,
3102 kSvnExePath,
3103 kTerminalPath,
3104 kRsaKeyPath,
3105 kUseDevtools,
3106 kUseInternet2,
3107 kUseSecureDownload,
3108 kCleanupAfterRCmdCheck,
3109 kViewDirAfterRCmdCheck,
3110 kHideObjectFiles,
3111 kRestoreLastProject,
3112 kProjectSafeStartupSeconds,
3113 kUseTinytex,
3114 kCleanTexi2dviOutput,
3115 kLatexShellEscape,
3116 kRestoreProjectRVersion,
3117 kClangVerbose,
3118 kSubmitCrashReports,
3119 kDefaultRVersion,
3120 kDataViewerMaxColumns,
3121 kEnableScreenReader,
3122 kTypingStatusDelayMs,
3123 kReducedMotion,
3124 kTabKeyMoveFocus,
3125 kFindPanelLegacyTabSequence,
3126 kShowFocusRectangles,
3127 kShowPanelFocusRectangle,
3128 kAutoSaveOnIdle,
3129 kAutoSaveIdleMs,
3130 kAutoSaveOnBlur,
3131 kTerminalInitialDirectory,
3132 kFullProjectPathInWindowTitle,
3133 kVisualMarkdownEditingIsDefault,
3134 kVisualMarkdownEditingListSpacing,
3135 kVisualMarkdownEditingWrap,
3136 kVisualMarkdownEditingWrapAtColumn,
3137 kVisualMarkdownEditingReferencesLocation,
3138 kVisualMarkdownEditingCanonical,
3139 kVisualMarkdownEditingMaxContentWidth,
3140 kVisualMarkdownEditingShowDocOutline,
3141 kVisualMarkdownEditingShowMargin,
3142 kVisualMarkdownEditingFontSizePoints,
3143 kVisualMarkdownCodeEditor,
3144 kZoteroLibraries,
3145 kEmojiSkintone,
3146 kDisabledAriaLiveAnnouncements,
3147 kScreenreaderConsoleAnnounceLimit,
3148 kFileMonitorIgnoredComponents,
3149 kInstallPkgDepsIndividually,
3150 kGraphicsBackend,
3151 kGraphicsAntialiasing,
3152 kBrowserFixedWidthFonts,
3153 kPythonType,
3154 kPythonVersion,
3155 kPythonPath,
3156 kSaveRetryTimeout,
3157 kInsertNativePipeOperator,
3158 kCommandPaletteMru,
3159 kShowMemoryUsage,
3160 kMemoryQueryIntervalSeconds,
3161 kTerminalPythonIntegration,
3162 kSessionProtocolDebug,
3163 kPythonProjectEnvironmentAutomaticActivate,
3164 kCheckNullExternalPointers,
3165 });
3166 }
3167
3168
3169 }
3170 }
3171 }
3172