Code Insight Options

From RAD Studio
Jump to: navigation, search

Go Up to Editor Options


Tools > Options > User Interface > Editor Options > Language and click on Code Insight Options option.

Use this page to configure how Code Insight works while editing code in the Code Editor.

Note: HTML supports only the Code completion, Error insight, and Code template completion features.
Item Description

Use editor font

Use the same font as the Code Editor instead of the standard IDE font.

Code Insight Manager

Displays a list of programming and markup languages (HTML, StyleSheet, Pascal, and C/C++), for which you can specify Code Insight features. You can specify different Code Insight options for each language.

New

Creates a new server. The dialog allows you to specify the LSP server executable and some options, including a friendly name, the language identifier, a timeout after which the server will be forcibly restarted, and any server-specific initialization options to be injected into the Initialize JSON RPC call.

Edit

Edits your server configuration.

Code completion

Displays a list of properties, methods, and events when you enter a class name followed by a period in the Code Editor. You can then select an item and press Enter to add it to your code.

If this option is not checked, you can still invoke Code Completion by pressing Ctrl+Space. The default value is ON (checked).

Auto invoke

Brings up the Code Completion list while you type Delphi or C++ code. C++ also supports the -> for invoking Code Completion.

Auto parenthesis

Automatically adds parentheses to function calls when you invoke Code Completion.

History

Remembers what you have entered or selected, and places that as the first entry in the Code Completion list.

Show reserved words

Includes language keywords (for Pascal only) in the Code Completion list.

Note: For the Clang-enhanced compiler, this feature uses a Language Server Protocol server. It is asynchronous and non-blocking.

Parameter completion

It is auto-invoked for methods after you code-complete that method, or pressing Ctrl+Shift+Space.

Code parameters

Displays the arguments of a method call as you enter them into your code. If this option is not checked, you can still invoke code parameters by pressing Shift+Ctrl+Space. The default value is ON (checked).

Note: For the Clang-enhanced compiler, this feature uses a Language Server Protocol server. It is asynchronous and non-blocking.

Tooltip expression evaluation

Displays the current value of a variable when you position the cursor over it. This feature is available when program execution is paused during a debugging session.

Tooltip insight

It happens when hovering the mouse over a symbol.

Tooltip symbol insight

Displays declaration information in a tooltip window for any identifier by passing the cursor over it in the Code Editor.

Tooltip help insight

Displays a short description in a tooltip window when you pass the cursor over a symbol in the Code Editor. The hint window (Help Insight) contains links to additional information where available.

Note: Only available when using the Classic Compiler.

Find Declaration

Invoke Find Declaration by pressing Ctrl+Click over a symbol or right-clicking it and choosing Find Declaration.

Note:
  • For the Clang-enhanced compiler, this feature uses a Language Server Protocol server. It is asynchronous and non-blocking.

Block completion

Enables the editor to automatically insert a block-closing symbol when you begin a block and press Enter. The default value is ON (checked). The drop-down menu sets the behavior of block completion when you surround existing statements with block symbols, as follows:

Without new line

Positions the cursor after the block you just created.

With new line

Positions the cursor inside the block you just created.

New blocks only

Invokes block completion only if you start a new block.

Error insight

The Error Insight feature underlines code or HTML that may need attention, such as invalid code causing errors, warnings, and/or hints. Positioning the cursor over invalid text displays a tooltip window containing the probable cause of the error. The default value is ON (checked).

Show Error insight levels

Choose the level of error insight you want to see in the code editor.

None

Choose this option to not display any level of error insight in the code editor.

Errors Only

Displays errors only in the code editor. Errors are displayed with a red squiggle.

Warnings and Above

Displays warnings in the code editor. Warnings are displayed with an orange squiggle.

Hints and above

Displays Hints in the code editor. Hints are displayed with a blue squiggle.

Everything

Displays all levels of error insight in the code editor.

Editor rendering style

Choose the underline style, choices are: Classic, Smooth Wave, Solid Line, or Dots.

Show Error Insight in editor gutter

Enable/Disable this option to find errors, warnings, and/or hints icons at its specific location while scrolling the file in the code editor.

Code template completion

Automatically adds a code template when you type a token that starts a template and press TAB. The default value is ON (checked).

Auto complete

Invokes code template completion when you press SPACE after you begin an existing template. When this option is disabled, you must press TAB to invoke template completion after you type in the template name. The default value is ON (checked).

Hints

Enables template hints. Template hints appear when you add a template in the Code Editor and tab between the preset cursor positions in the template. The default value is OFF (unchecked).

Delay

Sets the duration of the pause before a Code Insight window displays. Select a value anywhere on a scale between None and High.

Note:
  • For C++, Code Completion and Error Insight using the Language Server Protocol and cquery are not supported on 32-bit editions of Windows.
  • For C++ Clang, when using Code Completion, a project needs to be saved, once, for Code Completion and Error Insight to work correctly. When the project exists on disk, all changes in the IDE (i.e., modified files) are reflected accurately.

See Also