diff --git a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/XMLCompletionSettings.java b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/XMLCompletionSettings.java
index f816c5915..cd54cca98 100644
--- a/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/XMLCompletionSettings.java
+++ b/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/XMLCompletionSettings.java
@@ -26,13 +26,16 @@ public class XMLCompletionSettings {
private boolean autoCloseRemovesContent;
- public XMLCompletionSettings(boolean autoCloseTags, boolean autoCloseRemovesContent) {
+ private boolean fileCompletion;
+
+ public XMLCompletionSettings(boolean autoCloseTags, boolean autoCloseRemovesContent, boolean fileCompletion) {
this.autoCloseTags = autoCloseTags;
this.autoCloseRemovesContent = autoCloseRemovesContent;
+ this.fileCompletion = fileCompletion;
}
public XMLCompletionSettings() {
- this(true, true);
+ this(true, true, true);
}
public void setCapabilities(CompletionCapabilities completionCapabilities) {
@@ -79,6 +82,24 @@ public boolean isAutoCloseRemovesContent() {
return autoCloseRemovesContent;
}
+ /**
+ * Configure the file completion options in completion
+ *
+ * @param fileCompletionEnabled
+ */
+ public void setFileCompletionEnabled(boolean fileCompletionEnabled) {
+ this.fileCompletion = fileCompletionEnabled;
+ }
+
+ /**
+ * Returns true if turning files should be included in completion and false otherwise
+ *
+ * @return true if turning files should be included in completion and false otherwise
+ */
+ public boolean isFileCompletionEnabled() {
+ return fileCompletion;
+ }
+
/**
* Returns true if the client support snippet and
* false otherwise.
@@ -101,5 +122,6 @@ public boolean isCompletionSnippetsSupported() {
public void merge(XMLCompletionSettings newCompletion) {
this.setAutoCloseTags(newCompletion.isAutoCloseTags());
this.setAutoCloseRemovesContent(newCompletion.isAutoCloseRemovesContent());
+ this.setFileCompletionEnabled(newCompletion.isFileCompletionEnabled());
}
}