Skip to content

Commit

Permalink
Add LSP C/C++ editor content assist documentation
Browse files Browse the repository at this point in the history
Also improve cross-referencing and mention decorated source file icons.
  • Loading branch information
jld01 committed Feb 19, 2025
1 parent 75d7cb6 commit 6dc0edb
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
Copyright (c) 2024 John Dallaway and others
Copyright (c) 2024, 2025 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -41,4 +41,4 @@ image:lsp_clangd_prefs.png[width=550]

Related concepts:

* link:lsp_cpp_editor.html[C/C++ editor (LSP)]
* xref:lsp_cpp_editor.adoc[C/C++ editor (LSP)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
////
Copyright (c) 2025 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
John Dallaway - initial content (#963)
////

// support image rendering and table of contents within GitHub
ifdef::env-github[]
:imagesdir: ../../images
:toc:
:toc-placement!:
endif::[]

= Content assist

Use the image:command_link.png[] link:javascript:executeCommand('org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.cdt.lsp.clangd.editor.contentAssistPreferencePage)')[Content Assist] preference page to configure the content assistance provided by the C/{cpp} editor (LSP):

image:lsp_content_assist_prefs.png[width=550]

.Content Assist Preference Options
:!table-caption:
[%autowidth]
[options="header"]
|===
|Option |Description
|Fill function arguments and show guessed arguments |While editing a file, the editor will provide function argument assistance.
|===

Related concepts:

* xref:lsp_cpp_editor.adoc[C/C++ editor (LSP)]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
Copyright (c) 2024 John Dallaway and others
Copyright (c) 2024, 2025 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -30,6 +30,8 @@ Projects created using an older version of CDT may be configured to use this edi

image:lsp_editor_properties.png[width=526]

When the C/{cpp} editor (LSP) is enabled for a project, source code files are presented with a decorated icon (image:lsp_decoration.png[]) in the _Project Explorer_ view.

The C/{cpp} editor (LSP) includes the following features:

- Syntax highlighting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
Copyright (c) 2024 John Dallaway and others
Copyright (c) 2024, 2025 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -35,4 +35,4 @@ image:lsp_editor_prefs.png[width=550]

Related concepts:

* link:lsp_cpp_editor.html[C/C++ editor (LSP)]
* xref:lsp_cpp_editor.adoc[C/C++ editor (LSP)]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
Copyright (c) 2024 John Dallaway and others
Copyright (c) 2024, 2025 John Dallaway and others
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -35,4 +35,4 @@ image:lsp_save_prefs.png[width=550]

Related concepts:

* link:lsp_cpp_editor.html[C/C++ editor (LSP)]
* xref:lsp_cpp_editor.adoc[C/C++ editor (LSP)]
1 change: 1 addition & 0 deletions bundles/org.eclipse.cdt.lsp.doc/toc_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Contributors:
<toc link_to="../org.eclipse.cdt.doc.user/topics_Reference.xml#cdt_Preferences_Anchor" label="Editor (LSP) preferences">
<topic label="Editor (LSP) preferences" href="html/lsp_cpp_editor_prefs.html">
<topic label="clangd" href="html/lsp_clangd_prefs.html" />
<topic label="Content Assist" href="html/lsp_content_assist_prefs.html" />
<topic label="Save Actions" href="html/lsp_save_prefs.html" />
</topic>
</toc>

0 comments on commit 6dc0edb

Please sign in to comment.