package vscoq-language-server
VSCoq language server
Install
Dune Dependency
Authors
Maintainers
Sources
vscoq-language-server-2.0.1-coq8.18.tar.gz
md5=0bb4d33ce17c0ff2922b089b62ef6477
sha512=f1918867f09a3bba3276490f9aaae899117d8a37e4e7e2d8d64bf65dc0ad72b0708a7c3075ceaedd86e8ced70796df62169cf7277049b6a45117e3e666187017
doc/src/vscoq-language-server.dm/searchQuery.ml.html
Source file searchQuery.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
(**************************************************************************) (* *) (* VSCoq *) (* *) (* Copyright INRIA and contributors *) (* (see version control and README file for authors & dates) *) (* *) (**************************************************************************) (* *) (* This file is distributed under the terms of the MIT License. *) (* See LICENSE file. *) (* *) (**************************************************************************) open Util open Printer open Protocol.Printing open Protocol.LspWrapper open Vernacexpr open Pp (* Note: this queue is not very useful today, as we process results in the main vscoq process, which does not allow for real asynchronous processing of results. *) let query_results_queue = Queue.create () let query_feedback : notification Sel.Event.t = Sel.On.queue query_results_queue (fun x -> QueryResultNotification x) (* TODO : remove these two functions when interp_search_restriction is added in the comSearch.mli in Coq (they're simply copied here for now) *) let global_module qid = try Nametab.full_name_module qid with Not_found -> CErrors.user_err ?loc:qid.CAst.loc (str "Module/Section " ++ Ppconstr.pr_qualid qid ++ str " not found.") let interp_search_restriction = function | SearchOutside l -> (List.map global_module l, true) | SearchInside l -> (List.map global_module l, false) let interp_search ~id env sigma s r = let pr_search ref _kind env c = let name = pr_global ref in let open Impargs in let impls = implicits_of_global ref in let impargs = select_stronger_impargs impls in let impargs = List.map binding_kind_of_status impargs in let statement = pr_ltype_env env Evd.(from_env env) ~impargs c in let name = pp_of_coqpp name in let statement = pp_of_coqpp statement in Queue.push { id; name; statement } query_results_queue in let r = interp_search_restriction r in (Search.search env sigma (List.map (ComSearch.interp_search_request env Evd.(from_env env)) s) r |> Search.prioritize_search) pr_search; [query_feedback]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>