Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic-merge committed Nov 7, 2023
2 parents 1cabda3 + 3f1f424 commit fb69691
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 135 deletions.
70 changes: 42 additions & 28 deletions doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,22 @@ for `initializationOptions`. On the protocol level messages look like:

Ada Language Server understands these settings:

* [projectFile](#projectFile)
* [scenarioVariables](#scenarioVariables)
* [defaultCharset](#defaultCharset)
* [relocateBuildTree](#relocateBuildTree)
* [rootDir](#rootDir)
* [enableDiagnostics](#enableDiagnostics)
* [enableIndexing](#enableIndexing)
* [renameInComments](#renameInComments)
* [namedNotationThreshold](#namedNotationThreshold)
* [foldComments](#foldComments)
* [followSymlinks](#followSymlinks)
* [documentationStyle](#documentationStyle)
* [onTypeFormatting.indentOnly](#onTypeFormatting.indentOnly)
* [projectFile](#projectfile)
* [scenarioVariables](#scenariovariables)
* [defaultCharset](#defaultcharset)
* [relocateBuildTree](#relocatebuildtree)
* [rootDir](#rootdir)
* [enableDiagnostics](#enablediagnostics)
* [enableIndexing](#enableindexing)
* [renameInComments](#renameincomments)
* [namedNotationThreshold](#namednotationthreshold)
* [foldComments](#foldcomments)
* [followSymlinks](#followsymlinks)
* [documentationStyle](#documentationstyle)
* [onTypeFormatting.indentOnly](#ontypeformattingindentonly)

----



## projectFile

You can configure the GNAT Project File via the `projectFile` key.
Expand All @@ -67,6 +65,7 @@ root folder, then ALS will use it.
```

## scenarioVariables

You can configure scenario variables via the `scenarioVariables` key.
The setting has an object value. Keys in this object correspond to
scenario variables names and string values to variables values.
Expand All @@ -76,7 +75,9 @@ scenario variables names and string values to variables values.
'BUILD_MODE': 'DEBUG'
}
```

## defaultCharset

You can set the character set to use when the server has to use when reading
files from disk by specifying an `defaultCharset` key. The default is
`iso-8859-1`. This should have a string value.
Expand All @@ -86,28 +87,33 @@ files from disk by specifying an `defaultCharset` key. The default is
```

## relocateBuildTree

With this option it is possible to achieve out-of-tree build. That is,
real object, library or exec directories are relocated to the current
working directory or dir if specified. Ensure that it is full normalized
path ended with the directory separator. Visit
https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/building_with_gprbuild.html#switches
the [gprbuild documentation](https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/building_with_gprbuild.html#switches)
for more details about the corresponding gprbuild switch.

```javascript
'relocateBuildTree': '/home/user/project/build/'
```

## rootDir

This option is to be used with relocateBuildTree above and cannot be
specified alone. This option specifies the root directory for artifacts
for proper relocation. Ensure that it is full normalized path ended
with the directory separator. Visit
https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/building_with_gprbuild.html#switches
the [gprbuild documentation](https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/building_with_gprbuild.html#switches)
for more details about the corresponding gprbuild switch.

```javascript
'relocateBuildTree': '/home/user/project/'
```

## enableDiagnostics

You can explicitly deactivate the emission of diagnostics, via the
`enableDiagnostics` key. By default, diagnostics are enabled.
The value is a boolean.
Expand All @@ -117,6 +123,7 @@ The value is a boolean.
```

## enableIndexing

By default, the server indexes the source files after loading a project,
to speed up subsequent requests. This behavior can be controlled
via the `enableIndexing` flag in this request.
Expand All @@ -127,6 +134,7 @@ The value is a boolean.
```

## renameInComments

The language server is able to edit Ada comments while executing
`textDocument/rename` request. To enable this just set
`renameInComments` setting to `true`.
Expand All @@ -137,6 +145,7 @@ The value is a boolean.
```

## useCompletionSnippets

Whether we should use snippets in completion results. Snippets can be
returned in case of subprogram calls for instance, with placeholders
for each parameter needed by the subprogram.
Expand All @@ -147,25 +156,27 @@ The value is a boolean.
```

## displayMethodAncestryOnNavigation

This setting controls the policy for displaying overriding and overridden
subprograms on navigation requests such as `textDocument/definition`,
`textDocument/declaration` or `textDocument/implementation`.

The different policies are:

* `never`: Never list overridding and/or overridden suprograms.
* `usage_and_abstract_only`: List overridding and/or overridden suprograms
on dispatching calls and on abstract subprogram declarations.
* `definition_only`: List overridding and/or overridden suprograms on
declarations only.
* `always`: Always list overridding and/or overridden suprograms when
possible.
* `never`: Never list overridding and/or overridden suprograms.
* `usage_and_abstract_only`: List overridding and/or overridden suprograms
on dispatching calls and on abstract subprogram declarations.
* `definition_only`: List overridding and/or overridden suprograms on
declarations only.
* `always`: Always list overridding and/or overridden suprograms when
possible.

```javascript
'displayMethodAncestryOnNavigation': 'always'
```

## namedNotationThreshold

This setting defines the number of parameters/components at which point named
notation is used for subprogram/aggregate completion snippets.
The value is a number. The default value is `3`.
Expand All @@ -175,12 +186,14 @@ The value is a number. The default value is `3`.
```

## foldComments

When this setting is `true` the server sends blocks information for comments which can be used for folding comment blocks.
The value is a boolean. The default is `true`.

```javascript
'foldComments': false
```

## followSymlinks

When this setting is `false` the server doesn't do any attempts to normalize file names sent by a client.
Expand All @@ -193,6 +206,7 @@ The value is a boolean. The default is `true`.
```

## documentationStyle

The language server supports different styles to document entities in the source
code. This setting controls primary documentation style of entities. When
documentation for the entity is not found, the language server uses a few
Expand All @@ -201,10 +215,10 @@ declaration, extract documentation from subprogram's body, etc.)

Supported styles are:

* `gnat`: Default style, based on GNAT coding standard with some
enhancements.
* `leading`: Documentation for the entities extracted from the comments
before the entity declaration.
* `gnat`: Default style, based on GNAT coding standard with some
enhancements.
* `leading`: Documentation for the entities extracted from the comments
before the entity declaration.

For more information about documentation styles see GNATdoc User's Manual.

Expand Down
Loading

0 comments on commit fb69691

Please sign in to comment.