this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Refactor code organization

+113 -516
-10
merlinjs/client/dune
··· 1 - ;(executable 2 - (library 3 - (name merlin_client) 4 - ; (promote (until-clean)) 5 - ; (modes js) 6 - ; (js_of_ocaml 7 - ; (flags (:standard --source-map-inline))) 8 - (libraries 9 - protocol 10 - brr))
merlinjs/client/merlin_client.ml src/client/merlin_client.ml
-38
merlinjs/dune
··· 1 - (env 2 - (_ (js_of_ocaml (compilation_mode whole_program)))) 3 - 4 - (executable 5 - (name merlin_worker) 6 - (promote (until-clean)) 7 - (modes js) 8 - (js_of_ocaml 9 - (javascript_files stubs.js)) 10 - (libraries 11 - static_files 12 - protocol 13 - merlin-lib.kernel 14 - merlin-lib.utils 15 - merlin-lib.query_protocol 16 - merlin-lib.query_commands 17 - merlin-lib.ocaml_parsing 18 - 19 - brr 20 - js_of_ocaml)) 21 - 22 - (rule 23 - (deps 24 - merlin_worker.bc.js 25 - client/merlin_client.bc.js 26 - index.jsx 27 - package.json 28 - yarn.lock 29 - (source_tree node_modules)) 30 - (targets index.js) 31 - (mode (promote (until-clean))) 32 - (action (run yarn build))) 33 - 34 - (alias 35 - (name all-js) 36 - (deps 37 - merlin_worker.bc.js 38 - editor/merlin_editor.bc.js))
-15
merlinjs/editor/dune
··· 1 - (executable 2 - (name merlin_editor) 3 - (promote (until-clean)) 4 - (modes js) 5 - ; (js_of_ocaml 6 - ; (flags (:standard --source-map-inline))) 7 - (libraries 8 - brr 9 - merlin_client 10 - code-mirror 11 - code-mirror.lint 12 - code-mirror.autocomplete 13 - code-mirror.tooltip 14 - code-mirror.stream 15 - ))
+15 -31
merlinjs/editor/merlin_editor.ml src/extension/merlin_codemirror.ml
··· 1 1 open Code_mirror 2 2 open Brr 3 3 4 - let basic_setup = Jv.get Jv.global "__CM__basic_setup" |> Extension.of_jv 5 - 6 - let get_el_by_id i = 7 - Brr.Document.find_el_by_id G.document (Jstr.of_string i) |> Option.get 8 - 9 - let worker = Merlin_client.make_worker "merlin_worker.bc.js" 10 - 11 - let get_full_doc state = 12 - let lines = Editor.(state |> State.doc |> Text.to_jstr_array) in 13 - lines |> Array.map Jstr.to_string |> Array.to_list |> String.concat "\n" 4 + module Utils = Utils 14 5 15 - let linter : (Editor.View.t -> Lint.Diagnostic.t array Fut.t) = fun view -> 6 + let linter worker = fun view -> 16 7 let open Fut.Syntax in 17 - let doc = get_full_doc @@ Editor.View.state view in 8 + let doc = Utils.get_full_doc @@ Editor.View.state view in 18 9 let+ result = Merlin_client.query_errors worker doc in 19 10 List.map (fun Protocol.{ kind; loc; main; sub = _; source } -> 20 11 let from = loc.loc_start.pos_cnum in ··· 42 33 "private"; "sig"; "to"; "try"; "value"; "virtual"; "when"; 43 34 ] 44 35 45 - let merlin_completion : Autocomplete.Context.t -> Autocomplete.Result.t option Fut.t = fun ctx -> 36 + let merlin_completion worker = fun ctx -> 46 37 let open Fut.Syntax in 47 - let source = get_full_doc @@ Autocomplete.Context.state ctx in 38 + let source = Utils.get_full_doc @@ Autocomplete.Context.state ctx in 48 39 let pos = Autocomplete.Context.pos ctx in 49 40 let+ { from; to_; entries } = 50 41 Merlin_client.query_completions worker source (`Offset pos) ··· 54 45 ) entries in 55 46 Some (Autocomplete.Result.create ~from ~to_ ~options ()) 56 47 57 - let autocomplete = 48 + let autocomplete worker = 58 49 let config = Autocomplete.(config () 59 - ~override:[Source.create merlin_completion; Source.from_list keywords]) 50 + ~override:[Source.create @@ merlin_completion worker; Source.from_list keywords]) 60 51 in 61 52 Autocomplete.create ~config () 62 53 63 - let tooltip_on_hover = 54 + let tooltip_on_hover worker = 64 55 let open Tooltip in 65 56 hover_tooltip 66 57 (fun ~view ~pos ~side:_ -> 67 58 let open Fut.Syntax in 68 - let doc = get_full_doc @@ Editor.View.state view in 59 + let doc = Utils.get_full_doc @@ Editor.View.state view in 69 60 let pos = `Offset pos in 70 61 let+ result = Merlin_client.query_type worker doc pos in 71 62 match result with ··· 82 73 let ocaml = Jv.get Jv.global "__CM__mllike" |> Stream.Language.of_jv 83 74 let ocaml = Stream.Language.define ocaml 84 75 85 - let init ?doc ?(exts = [||]) () = 86 - let open Editor in 87 - let config = 88 - State.Config.create ?doc 89 - ~extensions:(Array.concat [ [| basic_setup |]; exts ]) 90 - () 91 - in 92 - let state = State.create ~config () in 93 - let opts = View.opts ~state ~parent:(get_el_by_id "editor") () in 94 - let view : View.t = View.create ~opts () in 95 - (state, view) 96 - 97 - let _editor = init ~exts:[| ocaml; Lint.create linter; autocomplete; tooltip_on_hover |] () 76 + let all_extensions worker = [| 77 + ocaml; 78 + Lint.create (linter worker); 79 + autocomplete worker; 80 + tooltip_on_hover worker 81 + |]
+1 -1
merlinjs/index.html src/app/index.html
··· 4 4 <head> 5 5 <meta charset="utf-8"> 6 6 <meta name="viewport" content="width=device-width,initial-scale=1.0"> 7 - <script type="text/javascript" defer src="editor/merlin_editor.bc.js"></script> 7 + <script type="text/javascript" defer src="app.bc.js"></script> 8 8 <!-- <script type="text/javascript" defer src="index.js"></script> --> 9 9 <title>Merlin the web</title> 10 10 <style>
merlinjs/merlin_worker.ml src/worker/merlin_worker.ml
+1
merlinjs/protocol/dune src/protocol/dune
··· 1 1 (library 2 2 (name protocol) 3 + (public_name merlin-js.protocol) 3 4 (libraries 4 5 merlin-lib.ocaml_parsing 5 6 merlin-lib.query_protocol
merlinjs/protocol/protocol.ml src/protocol/protocol.ml
-421
merlinjs/query_json.ml
··· 1 - (* {{{ COPYING *( 2 - 3 - This file is part of Merlin, an helper for ocaml editors 4 - 5 - Copyright (C) 2013 - 2015 Frédéric Bour <frederic.bour(_)lakaban.net> 6 - Thomas Refis <refis.thomas(_)gmail.com> 7 - Simon Castellan <simon.castellan(_)iuwt.fr> 8 - 9 - Permission is hereby granted, free of charge, to any person obtaining a 10 - copy of this software and associated documentation files (the "Software"), 11 - to deal in the Software without restriction, including without limitation the 12 - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 - sell copies of the Software, and to permit persons to whom the Software is 14 - furnished to do so, subject to the following conditions: 15 - 16 - The above copyright notice and this permission notice shall be included in 17 - all copies or substantial portions of the Software. 18 - 19 - The Software is provided "as is", without warranty of any kind, express or 20 - implied, including but not limited to the warranties of merchantability, 21 - fitness for a particular purpose and noninfringement. In no event shall 22 - the authors or copyright holders be liable for any claim, damages or other 23 - liability, whether in an action of contract, tort or otherwise, arising 24 - from, out of or in connection with the software or the use or other dealings 25 - in the Software. 26 - 27 - )* }}} *) 28 - 29 - open Merlin_utils.Std 30 - module Location = Ocaml_parsing.Location 31 - open Query_protocol 32 - 33 - let dump (type a) : a t -> json = 34 - let mk command args = 35 - `Assoc ( 36 - ("command", `String command) :: 37 - args 38 - ) in 39 - let mk_position = function 40 - | `Start -> `String "start" 41 - | `End -> `String "end" 42 - | `Offset n -> 43 - `Assoc ["offset", `Int n] 44 - | `Logical (line,col) -> 45 - `Assoc ["line", `Int line; "column", `Int col] 46 - in 47 - let kinds_to_json kind = 48 - `List (List.map ~f:(function 49 - | `Constructor -> `String "constructor" 50 - | `Keywords -> `String "keywords" 51 - | `Labels -> `String "label" 52 - | `Modules -> `String "module" 53 - | `Modules_type -> `String "module-type" 54 - | `Types -> `String "type" 55 - | `Values -> `String "value" 56 - | `Variants -> `String "variant" 57 - ) kind) 58 - in 59 - function 60 - | Type_expr (expr, pos) -> 61 - mk "type-expression" [ 62 - "expression", `String expr; 63 - "position", mk_position pos; 64 - ] 65 - 66 - | Type_enclosing (opt_cursor, pos, index) -> 67 - mk "type-enclosing" [ 68 - "cursor", (match opt_cursor with 69 - | None -> `Null 70 - | Some (text, offset) -> `Assoc [ 71 - "text", `String text; 72 - "offset", `Int offset; 73 - ] 74 - ); 75 - "index", (match index with 76 - | None -> `String "all" 77 - | Some n -> `Int n 78 - ); 79 - "position", mk_position pos; 80 - ] 81 - 82 - | Locate_type pos -> 83 - mk "locate-type" [ 84 - "position", mk_position pos 85 - ] 86 - 87 - | Enclosing pos -> 88 - mk "enclosing" [ 89 - "position", mk_position pos; 90 - ] 91 - 92 - | Complete_prefix (prefix, pos, kind, doc, typ) -> 93 - mk "complete-prefix" [ 94 - "prefix", `String prefix; 95 - "position", mk_position pos; 96 - "with-doc", `Bool doc; 97 - "with-types", `Bool typ; 98 - "kind", kinds_to_json kind; 99 - ] 100 - 101 - | Expand_prefix (prefix, pos, kind, typ) -> 102 - mk "expand-prefix" [ 103 - "prefix", `String prefix; 104 - "position", mk_position pos; 105 - "with-types", `Bool typ; 106 - "kind", kinds_to_json kind; 107 - ] 108 - | Document (identifier, pos) -> 109 - mk "document" [ 110 - "identifier", (match identifier with 111 - | None -> `Null 112 - | Some ident -> `String ident 113 - ); 114 - "position", mk_position pos; 115 - ] 116 - | Locate (prefix, look_for, pos) -> 117 - mk "locate" [ 118 - "prefix", (match prefix with 119 - | None -> `Null 120 - | Some prefix -> `String prefix 121 - ); 122 - "look-for", (match look_for with 123 - | `ML -> `String "implementation" 124 - | `MLI -> `String "interface" 125 - ); 126 - "position", mk_position pos; 127 - ] 128 - | Jump (target, pos) -> 129 - mk "jump" [ 130 - "target", `String target; 131 - "position", mk_position pos; 132 - ] 133 - | Phrase (target, pos) -> 134 - mk "phrase" [ 135 - "target", `String (match target with `Next -> "next" | `Prev -> "prev"); 136 - "position", mk_position pos; 137 - ] 138 - | Case_analysis (pos_start,pos_end) -> 139 - mk "case-analysis" [ 140 - "start", mk_position pos_start; 141 - "end", mk_position pos_end; 142 - ] 143 - | Holes -> mk "holes" [] 144 - | Construct (pos, with_values, depth) -> 145 - let depth = Option.value ~default:1 depth in 146 - mk "construct" [ 147 - "position", mk_position pos; 148 - "with_values", (match with_values with 149 - | Some `None | None -> `String "none" 150 - | Some `Local -> `String "local" 151 - ); 152 - "depth", `Int depth 153 - ] 154 - | Outline -> mk "outline" [] 155 - | Errors { lexing; parsing; typing } -> 156 - let args = 157 - if lexing && parsing && typing 158 - then [] 159 - else [ 160 - "lexing", `Bool lexing; 161 - "parsing", `Bool parsing; 162 - "typing", `Bool typing; 163 - ] 164 - in 165 - mk "errors" args 166 - | Shape pos -> 167 - mk "shape" [ 168 - "position", mk_position pos; 169 - ] 170 - | Dump args -> 171 - mk "dump" [ 172 - "args", `List args 173 - ] 174 - | Path_of_source paths -> 175 - mk "path-of-source" [ 176 - "paths", `List (List.map ~f:Json.string paths) 177 - ] 178 - | List_modules exts -> 179 - mk "list-modules" [ 180 - "extensions", `List (List.map ~f:Json.string exts) 181 - ] 182 - | Findlib_list -> mk "findlib-list" [] 183 - | Extension_list status -> 184 - mk "extension-list" [ 185 - "filter", (match status with 186 - | `All -> `String "all" 187 - | `Enabled -> `String "enabled" 188 - | `Disabled -> `String "disabled" 189 - ); 190 - ] 191 - | Path_list var -> 192 - mk "path-list" [ 193 - "variable", (match var with 194 - | `Build -> `String "build" 195 - | `Source -> `String "source" 196 - ); 197 - ] 198 - | Polarity_search (query, pos) -> 199 - mk "polarity-search" [ 200 - "query", `String query; 201 - "position", mk_position pos; 202 - ] 203 - | Occurrences (`Ident_at pos) -> 204 - mk "occurrences" [ 205 - "kind", `String "identifiers"; 206 - "position", mk_position pos; 207 - ] 208 - | Refactor_open (action, pos) -> 209 - mk "refactor-open" [ 210 - "action", `String (match action with `Qualify -> "qualify" 211 - | `Unqualify -> "unqualify"); 212 - "position", mk_position pos; 213 - ] 214 - | Version -> mk "version" [] 215 - 216 - let string_of_completion_kind = function 217 - | `Value -> "Value" 218 - | `Variant -> "Variant" 219 - | `Constructor -> "Constructor" 220 - | `Label -> "Label" 221 - | `Module -> "Module" 222 - | `Modtype -> "Signature" 223 - | `Type -> "Type" 224 - | `Method -> "Method" 225 - | `MethodCall -> "#" 226 - | `Exn -> "Exn" 227 - | `Class -> "Class" 228 - | `Keyword -> "Keyword" 229 - 230 - let with_location ?(skip_none=false) loc assoc = 231 - if skip_none && loc = Location.none then 232 - `Assoc assoc 233 - else 234 - `Assoc (("start", Lexing.json_of_position loc.Location.loc_start) :: 235 - ("end", Lexing.json_of_position loc.Location.loc_end) :: 236 - assoc) 237 - 238 - let json_of_type_loc (loc,desc,tail) = 239 - with_location loc [ 240 - "type", (match desc with 241 - | `String _ as str -> str 242 - | `Index n -> `Int n); 243 - "tail", `String (match tail with 244 - | `No -> "no" 245 - | `Tail_position -> "position" 246 - | `Tail_call -> "call") 247 - ] 248 - 249 - let json_of_error (error : Location.error) = 250 - let of_sub loc sub = 251 - let msg = 252 - Location.print_sub_msg Format.str_formatter sub; 253 - String.trim (Format.flush_str_formatter ()) 254 - in 255 - with_location ~skip_none:true loc ["message", `String msg] 256 - in 257 - let loc = Location.loc_of_report error in 258 - let msg = 259 - Format.asprintf "@[%a@]" Location.print_main error |> String.trim 260 - in 261 - let typ = 262 - match error.source with 263 - | Location.Lexer -> "lexer" 264 - | Location.Parser -> "parser" 265 - | Location.Typer -> "typer" 266 - | Location.Warning -> 267 - if String.is_prefixed ~by:"Error" msg then 268 - "typer" (* Handle warn-error (since 4.08) *) 269 - else 270 - "warning" 271 - | Location.Unknown -> "unknown" 272 - | Location.Env -> "env" 273 - | Location.Config -> "config" 274 - in 275 - let content = [ 276 - "type" , `String typ; 277 - "sub" , `List (List.map ~f:(of_sub loc) error.sub); 278 - "valid" , `Bool true; 279 - "message" , `String msg; 280 - ] in 281 - with_location ~skip_none:true loc content 282 - 283 - let json_of_completion {Compl. name; kind; desc; info; deprecated} = 284 - `Assoc ["name", `String name; 285 - "kind", `String (string_of_completion_kind kind); 286 - "desc", `String desc; 287 - "info", `String info; 288 - "deprecated", `Bool deprecated] 289 - 290 - let json_of_completions {Compl. entries; context } = 291 - `Assoc [ 292 - "entries", `List (List.map ~f:json_of_completion entries); 293 - "context", (match context with 294 - | `Unknown -> `Null 295 - | `Application {Compl. argument_type; labels} -> 296 - let label (name,ty) = `Assoc ["name", `String name; 297 - "type", `String ty] in 298 - let a = `Assoc ["argument_type", `String argument_type; 299 - "labels", `List (List.map ~f:label labels)] in 300 - `List [`String "application"; a]) 301 - ] 302 - 303 - let rec json_of_outline outline = 304 - let json_of_item { outline_name ; outline_kind ; outline_type; location ; children ; deprecated } = 305 - with_location location [ 306 - "name", `String outline_name; 307 - "kind", `String (string_of_completion_kind outline_kind); 308 - "type", (match outline_type with 309 - | None -> `Null 310 - | Some typ -> `String typ); 311 - "children", `List (json_of_outline children); 312 - "deprecated", `Bool deprecated 313 - ] 314 - in 315 - List.map ~f:json_of_item outline 316 - 317 - let rec json_of_shape { shape_loc; shape_sub } = 318 - with_location shape_loc [ 319 - "children", `List (List.map ~f:json_of_shape shape_sub); 320 - ] 321 - 322 - let json_of_locate resp = 323 - match resp with 324 - | `At_origin -> `String "Already at definition point" 325 - | `Builtin s -> 326 - `String (sprintf "%S is a builtin, and it is therefore impossible \ 327 - to jump to its definition" s) 328 - | `Invalid_context -> `String "Not a valid identifier" 329 - | `Not_found (id, None) -> `String ("didn't manage to find " ^ id) 330 - | `Not_found (i, Some f) -> 331 - `String 332 - (sprintf "%s was supposed to be in %s but could not be found" i f) 333 - | `Not_in_env str -> 334 - `String (Printf.sprintf "Not in environment '%s'" str) 335 - | `File_not_found msg -> 336 - `String msg 337 - | `Found (None,pos) -> 338 - `Assoc ["pos", Lexing.json_of_position pos] 339 - | `Found (Some file,pos) -> 340 - `Assoc ["file",`String file; "pos", Lexing.json_of_position pos] 341 - 342 - let json_of_response (type a) (query : a t) (response : a) : json = 343 - match query, response with 344 - | Type_expr _, str -> `String str 345 - | Type_enclosing _, results -> 346 - `List (List.map ~f:json_of_type_loc results) 347 - | Enclosing _, results -> 348 - `List (List.map ~f:(fun loc -> with_location loc []) results) 349 - | Complete_prefix _, compl -> 350 - json_of_completions compl 351 - | Expand_prefix _, compl -> 352 - json_of_completions compl 353 - | Polarity_search _, compl -> 354 - json_of_completions compl 355 - | Refactor_open _, locations -> 356 - `List (List.map locations ~f:(fun (name,loc) -> 357 - with_location loc ["content",`String name])) 358 - | Document _, resp -> 359 - begin match resp with 360 - | `No_documentation -> `String "No documentation available" 361 - | `Invalid_context -> `String "Not a valid identifier" 362 - | `Builtin s -> 363 - `String (sprintf "%S is a builtin, no documentation is available" s) 364 - | `Not_found (id, None) -> `String ("didn't manage to find " ^ id) 365 - | `Not_found (i, Some f) -> 366 - `String 367 - (sprintf "%s was supposed to be in %s but could not be found" i f) 368 - | `Not_in_env str -> 369 - `String (Printf.sprintf "Not in environment '%s'" str) 370 - | `File_not_found msg -> 371 - `String msg 372 - | `Found doc -> 373 - `String doc 374 - end 375 - | Locate_type _, resp -> json_of_locate resp 376 - | Locate _, resp -> json_of_locate resp 377 - | Jump _, resp -> 378 - begin match resp with 379 - | `Error str -> 380 - `String str 381 - | `Found pos -> 382 - `Assoc ["pos", Lexing.json_of_position pos] 383 - end 384 - | Phrase _, pos -> 385 - `Assoc ["pos", Lexing.json_of_position pos] 386 - | Case_analysis _, ({ Location. loc_start ; loc_end; _ }, str) -> 387 - let assoc = 388 - `Assoc [ 389 - "start", Lexing.json_of_position loc_start ; 390 - "end", Lexing.json_of_position loc_end ; 391 - ] 392 - in 393 - `List [ assoc ; `String str ] 394 - | Holes, locations -> 395 - `List (List.map locations 396 - ~f:(fun (loc, typ) -> with_location loc ["type", `String typ])) 397 - | Construct _, ({ Location. loc_start ; loc_end; _ }, strs) -> 398 - let assoc = 399 - `Assoc [ 400 - "start", Lexing.json_of_position loc_start ; 401 - "end", Lexing.json_of_position loc_end ; 402 - ] 403 - in 404 - `List [ assoc ; `List (List.map ~f:Json.string strs) ] 405 - | Outline, outlines -> 406 - `List (json_of_outline outlines) 407 - | Shape _, shapes -> 408 - `List (List.map ~f:json_of_shape shapes) 409 - | Errors _, errors -> 410 - `List (List.map ~f:json_of_error errors) 411 - | Dump _, json -> json 412 - | Path_of_source _, str -> `String str 413 - | List_modules _, strs -> `List (List.map ~f:Json.string strs) 414 - | Findlib_list, strs -> `List (List.map ~f:Json.string strs) 415 - | Extension_list _, strs -> `List (List.map ~f:Json.string strs) 416 - | Path_list _, strs -> `List (List.map ~f:Json.string strs) 417 - | Occurrences _, locations -> 418 - `List (List.map locations 419 - ~f:(fun loc -> with_location loc [])) 420 - | Version, version -> 421 - `String version
merlinjs/static/dune src/worker/static/dune
merlinjs/static/gen_static.ml src/worker/static/gen_static.ml
merlinjs/static/stdlib/bigarray.cmi src/worker/static/stdlib/bigarray.cmi
merlinjs/static/stdlib/camlinternalAtomic.cmi src/worker/static/stdlib/camlinternalAtomic.cmi
merlinjs/static/stdlib/camlinternalFormat.cmi src/worker/static/stdlib/camlinternalFormat.cmi
merlinjs/static/stdlib/camlinternalFormatBasics.cmi src/worker/static/stdlib/camlinternalFormatBasics.cmi
merlinjs/static/stdlib/camlinternalLazy.cmi src/worker/static/stdlib/camlinternalLazy.cmi
merlinjs/static/stdlib/camlinternalMod.cmi src/worker/static/stdlib/camlinternalMod.cmi
merlinjs/static/stdlib/camlinternalOO.cmi src/worker/static/stdlib/camlinternalOO.cmi
merlinjs/static/stdlib/dynlink.cmi src/worker/static/stdlib/dynlink.cmi
merlinjs/static/stdlib/profiling.cmi src/worker/static/stdlib/profiling.cmi
merlinjs/static/stdlib/std_exit.cmi src/worker/static/stdlib/std_exit.cmi
merlinjs/static/stdlib/stdlib.cmi src/worker/static/stdlib/stdlib.cmi
merlinjs/static/stdlib/stdlib__Arg.cmi src/worker/static/stdlib/stdlib__Arg.cmi
merlinjs/static/stdlib/stdlib__Array.cmi src/worker/static/stdlib/stdlib__Array.cmi
merlinjs/static/stdlib/stdlib__ArrayLabels.cmi src/worker/static/stdlib/stdlib__ArrayLabels.cmi
merlinjs/static/stdlib/stdlib__Atomic.cmi src/worker/static/stdlib/stdlib__Atomic.cmi
merlinjs/static/stdlib/stdlib__Bigarray.cmi src/worker/static/stdlib/stdlib__Bigarray.cmi
merlinjs/static/stdlib/stdlib__Bool.cmi src/worker/static/stdlib/stdlib__Bool.cmi
merlinjs/static/stdlib/stdlib__Buffer.cmi src/worker/static/stdlib/stdlib__Buffer.cmi
merlinjs/static/stdlib/stdlib__Bytes.cmi src/worker/static/stdlib/stdlib__Bytes.cmi
merlinjs/static/stdlib/stdlib__BytesLabels.cmi src/worker/static/stdlib/stdlib__BytesLabels.cmi
merlinjs/static/stdlib/stdlib__Callback.cmi src/worker/static/stdlib/stdlib__Callback.cmi
merlinjs/static/stdlib/stdlib__Char.cmi src/worker/static/stdlib/stdlib__Char.cmi
merlinjs/static/stdlib/stdlib__Complex.cmi src/worker/static/stdlib/stdlib__Complex.cmi
merlinjs/static/stdlib/stdlib__Digest.cmi src/worker/static/stdlib/stdlib__Digest.cmi
merlinjs/static/stdlib/stdlib__Either.cmi src/worker/static/stdlib/stdlib__Either.cmi
merlinjs/static/stdlib/stdlib__Ephemeron.cmi src/worker/static/stdlib/stdlib__Ephemeron.cmi
merlinjs/static/stdlib/stdlib__Filename.cmi src/worker/static/stdlib/stdlib__Filename.cmi
merlinjs/static/stdlib/stdlib__Float.cmi src/worker/static/stdlib/stdlib__Float.cmi
merlinjs/static/stdlib/stdlib__Format.cmi src/worker/static/stdlib/stdlib__Format.cmi
merlinjs/static/stdlib/stdlib__Fun.cmi src/worker/static/stdlib/stdlib__Fun.cmi
merlinjs/static/stdlib/stdlib__Gc.cmi src/worker/static/stdlib/stdlib__Gc.cmi
merlinjs/static/stdlib/stdlib__Genlex.cmi src/worker/static/stdlib/stdlib__Genlex.cmi
merlinjs/static/stdlib/stdlib__Hashtbl.cmi src/worker/static/stdlib/stdlib__Hashtbl.cmi
merlinjs/static/stdlib/stdlib__In_channel.cmi src/worker/static/stdlib/stdlib__In_channel.cmi
merlinjs/static/stdlib/stdlib__Int.cmi src/worker/static/stdlib/stdlib__Int.cmi
merlinjs/static/stdlib/stdlib__Int32.cmi src/worker/static/stdlib/stdlib__Int32.cmi
merlinjs/static/stdlib/stdlib__Int64.cmi src/worker/static/stdlib/stdlib__Int64.cmi
merlinjs/static/stdlib/stdlib__Lazy.cmi src/worker/static/stdlib/stdlib__Lazy.cmi
merlinjs/static/stdlib/stdlib__Lexing.cmi src/worker/static/stdlib/stdlib__Lexing.cmi
merlinjs/static/stdlib/stdlib__List.cmi src/worker/static/stdlib/stdlib__List.cmi
merlinjs/static/stdlib/stdlib__ListLabels.cmi src/worker/static/stdlib/stdlib__ListLabels.cmi
merlinjs/static/stdlib/stdlib__Map.cmi src/worker/static/stdlib/stdlib__Map.cmi
merlinjs/static/stdlib/stdlib__Marshal.cmi src/worker/static/stdlib/stdlib__Marshal.cmi
merlinjs/static/stdlib/stdlib__MoreLabels.cmi src/worker/static/stdlib/stdlib__MoreLabels.cmi
merlinjs/static/stdlib/stdlib__Nativeint.cmi src/worker/static/stdlib/stdlib__Nativeint.cmi
merlinjs/static/stdlib/stdlib__Obj.cmi src/worker/static/stdlib/stdlib__Obj.cmi
merlinjs/static/stdlib/stdlib__Oo.cmi src/worker/static/stdlib/stdlib__Oo.cmi
merlinjs/static/stdlib/stdlib__Option.cmi src/worker/static/stdlib/stdlib__Option.cmi
merlinjs/static/stdlib/stdlib__Out_channel.cmi src/worker/static/stdlib/stdlib__Out_channel.cmi
merlinjs/static/stdlib/stdlib__Parsing.cmi src/worker/static/stdlib/stdlib__Parsing.cmi
merlinjs/static/stdlib/stdlib__Pervasives.cmi src/worker/static/stdlib/stdlib__Pervasives.cmi
merlinjs/static/stdlib/stdlib__Printexc.cmi src/worker/static/stdlib/stdlib__Printexc.cmi
merlinjs/static/stdlib/stdlib__Printf.cmi src/worker/static/stdlib/stdlib__Printf.cmi
merlinjs/static/stdlib/stdlib__Queue.cmi src/worker/static/stdlib/stdlib__Queue.cmi
merlinjs/static/stdlib/stdlib__Random.cmi src/worker/static/stdlib/stdlib__Random.cmi
merlinjs/static/stdlib/stdlib__Result.cmi src/worker/static/stdlib/stdlib__Result.cmi
merlinjs/static/stdlib/stdlib__Scanf.cmi src/worker/static/stdlib/stdlib__Scanf.cmi
merlinjs/static/stdlib/stdlib__Seq.cmi src/worker/static/stdlib/stdlib__Seq.cmi
merlinjs/static/stdlib/stdlib__Set.cmi src/worker/static/stdlib/stdlib__Set.cmi
merlinjs/static/stdlib/stdlib__Stack.cmi src/worker/static/stdlib/stdlib__Stack.cmi
merlinjs/static/stdlib/stdlib__StdLabels.cmi src/worker/static/stdlib/stdlib__StdLabels.cmi
merlinjs/static/stdlib/stdlib__Stream.cmi src/worker/static/stdlib/stdlib__Stream.cmi
merlinjs/static/stdlib/stdlib__String.cmi src/worker/static/stdlib/stdlib__String.cmi
merlinjs/static/stdlib/stdlib__StringLabels.cmi src/worker/static/stdlib/stdlib__StringLabels.cmi
merlinjs/static/stdlib/stdlib__Sys.cmi src/worker/static/stdlib/stdlib__Sys.cmi
merlinjs/static/stdlib/stdlib__Uchar.cmi src/worker/static/stdlib/stdlib__Uchar.cmi
merlinjs/static/stdlib/stdlib__Unit.cmi src/worker/static/stdlib/stdlib__Unit.cmi
merlinjs/static/stdlib/stdlib__Weak.cmi src/worker/static/stdlib/stdlib__Weak.cmi
merlinjs/static/stdlib/str.cmi src/worker/static/stdlib/str.cmi
merlinjs/static/stdlib/topdirs.cmi src/worker/static/stdlib/topdirs.cmi
merlinjs/static/stdlib/unix.cmi src/worker/static/stdlib/unix.cmi
merlinjs/static/stdlib/unixLabels.cmi src/worker/static/stdlib/unixLabels.cmi
merlinjs/stubs.js src/worker/stubs.js
+20
src/app/app.ml
··· 1 + open Code_mirror 2 + open Merlin_codemirror 3 + 4 + let basic_setup = Jv.get Jv.global "__CM__basic_setup" |> Extension.of_jv 5 + 6 + let init ?doc ?(exts = [||]) () = 7 + let open Editor in 8 + let config = 9 + State.Config.create ?doc 10 + ~extensions:(Array.concat [ [| basic_setup |]; exts ]) 11 + () 12 + in 13 + let state = State.create ~config () in 14 + let opts = View.opts ~state ~parent:(Utils.get_el_by_id "editor") () in 15 + let view : View.t = View.create ~opts () in 16 + (state, view) 17 + 18 + let worker = Merlin_client.make_worker "merlin_worker.bc.js" 19 + 20 + let _editor = init ~exts:(all_extensions worker) ()
+19
src/app/dune
··· 1 + (executable 2 + (name app) 3 + (modes js) 4 + (promote) 5 + (libraries 6 + merlin_client 7 + code-mirror 8 + merlin-js.code-mirror)) 9 + 10 + 11 + (copy_files 12 + (mode promote) 13 + (files ../worker/merlin_worker.bc.js)) 14 + 15 + (alias 16 + (name all-js) 17 + (deps 18 + merlin_worker.bc.js 19 + app.bc.js))
+5
src/client/dune
··· 1 + ;(executable 2 + (library 3 + (name merlin_client) 4 + (public_name merlin-js.client) 5 + (libraries protocol brr))
+11
src/extension/dune
··· 1 + (library 2 + (name merlin_codemirror) 3 + (public_name merlin-js.code-mirror) 4 + (libraries 5 + brr 6 + merlin_client 7 + code-mirror 8 + code-mirror.lint 9 + code-mirror.autocomplete 10 + code-mirror.tooltip 11 + code-mirror.stream))
+9
src/extension/utils.ml
··· 1 + open Code_mirror 2 + open Brr 3 + let get_el_by_id i = 4 + Brr.Document.find_el_by_id G.document (Jstr.of_string i) |> Option.get 5 + 6 + 7 + let get_full_doc state = 8 + let lines = Editor.(state |> State.doc |> Text.to_jstr_array) in 9 + lines |> Array.map Jstr.to_string |> Array.to_list |> String.concat "\n"
+32
src/worker/dune
··· 1 + (env 2 + (_ (js_of_ocaml (compilation_mode whole_program)))) 3 + 4 + (executable 5 + (name merlin_worker) 6 + (promote (until-clean)) 7 + (modes js) 8 + (js_of_ocaml 9 + (javascript_files stubs.js)) 10 + (libraries 11 + static_files 12 + protocol 13 + merlin-lib.kernel 14 + merlin-lib.utils 15 + merlin-lib.query_protocol 16 + merlin-lib.query_commands 17 + merlin-lib.ocaml_parsing 18 + 19 + brr 20 + js_of_ocaml)) 21 + 22 + ; (rule 23 + ; (deps 24 + ; merlin_worker.bc.js 25 + ; client/merlin_client.bc.js 26 + ; index.jsx 27 + ; package.json 28 + ; yarn.lock 29 + ; (source_tree node_modules)) 30 + ; (targets index.js) 31 + ; (mode (promote (until-clean))) 32 + ; (action (run yarn build)))