mirror of https://github.com/golang/go.git
internal/lsp: exclude node_modules in the workspace root by default
It is unlikely that users want gopls operating on their node_modules directories, so we should exclude them by default. If a user wants to include them, they can override their directory filters setting. This doesn't exclude *any* directory named "node_modules", so we still need to implement golang/go#46438 to exclude node_modules completely. Change-Id: I03c42208e62390dc35e44ac5176422ddf8dc53f7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/347297 Trust: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
8373dc3f73
commit
3b801c8b83
|
|
@ -70,7 +70,7 @@ Include only project_a: `-` (exclude everything), `+project_a`
|
|||
|
||||
Include only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`
|
||||
|
||||
Default: `[]`.
|
||||
Default: `["-node_modules"]`.
|
||||
|
||||
#### **memoryMode** *enum*
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ var GeneratedAPIJSON = &APIJSON{
|
|||
Keys: nil,
|
||||
},
|
||||
EnumValues: nil,
|
||||
Default: "[]",
|
||||
Default: "[\"-node_modules\"]",
|
||||
Status: "",
|
||||
Hierarchy: "build",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ func DefaultOptions() *Options {
|
|||
ExpandWorkspaceToModule: true,
|
||||
ExperimentalPackageCacheKey: true,
|
||||
MemoryMode: ModeNormal,
|
||||
DirectoryFilters: []string{"-node_modules"},
|
||||
},
|
||||
UIOptions: UIOptions{
|
||||
DiagnosticOptions: DiagnosticOptions{
|
||||
|
|
|
|||
Loading…
Reference in New Issue