Skip to content

Commit

Permalink
config: accept index_file directive
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Jan 29, 2024
1 parent e353220 commit 55ab533
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ocaml-lsp-server/src/merlin_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module Config = struct
; extensions : string list
; suffixes : (string * string) list
; stdlib : string option
; index_file : string option
; reader : string list
; exclude_query_dir : bool
; use_ppx_cache : bool
Expand All @@ -71,6 +72,7 @@ module Config = struct
; suffixes = []
; flags = []
; stdlib = None
; index_file = None
; reader = []
; exclude_query_dir = false
; use_ppx_cache = false
Expand Down Expand Up @@ -110,6 +112,7 @@ module Config = struct
let flags = { Std.workdir = cwd; workval = flags } in
({ config with flags = flags :: config.flags }, errors)
| `STDLIB path -> ({ config with stdlib = Some path }, errors)
| `INDEX_FILE path -> ({ config with index_file = Some path }, errors)
| `READER reader -> ({ config with reader }, errors)
| `EXCLUDE_QUERY_DIR -> ({ config with exclude_query_dir = true }, errors)
| `USE_PPX_CACHE -> ({ config with use_ppx_cache = true }, errors)
Expand All @@ -130,6 +133,7 @@ module Config = struct
; suffixes = clean config.suffixes
; flags = clean config.flags
; stdlib = config.stdlib
; index_file = config.index_file
; reader = config.reader
; exclude_query_dir = config.exclude_query_dir
; use_ppx_cache = config.use_ppx_cache
Expand All @@ -145,6 +149,7 @@ module Config = struct
; extensions = t.extensions @ merlin.extensions
; suffixes = t.suffixes @ merlin.suffixes
; stdlib = (if t.stdlib = None then merlin.stdlib else t.stdlib)
; index_file = merlin.index_file
; reader = (if t.reader = [] then merlin.reader else t.reader)
; flags_to_apply = t.flags @ merlin.flags_to_apply
; failures = failures @ merlin.failures
Expand Down

0 comments on commit 55ab533

Please sign in to comment.