Prefer ale_root setting for project roots

This commit is contained in:
Andrew Wray
2025-06-25 20:50:15 +01:00
parent 9e49019a26
commit 0b0f8d91bc
10 changed files with 80 additions and 52 deletions
+9 -8
View File
@@ -2297,17 +2297,18 @@ g:ale_root
Type: |Dictionary| or |String|
Default: `{}`
This option is used to determine the project root for a linter. If the value
is a |Dictionary|, it maps a linter to either a |String| containing the
project root or a |Funcref| to call to look up the root. The |Funcref| is
provided the buffer number as its argument.
This option is used to determine the project root for a linter. When set to a
|String| it will be used for all linters. When set to a |Dictionary|, the
keys are linter names and the values are either |Strings| containing project
roots or |Funcref|s which are passed the buffer number.
The buffer-specific variable may additionally be a string containing the
The buffer-specific variable may additionally be a |String| containing the
project root itself.
If neither variable yields a result, a linter-specific function is invoked to
detect a project root. If this, too, yields no result, and the linter is an
LSP linter, it will not run.
If a value can be found from either variable, ALE uses it directly and skips
searching for a project root. If no value is found, a linter-specific
function is invoked to detect a project root. If this, too, yields no result
and the linter is an LSP linter, it will not run.
*ale-options.save_hidden*
*g:ale_save_hidden*