lean4-htt/tests/lean/interactive/completionOption.lean.expected.out
Marc Huisinga 7ff7cf9b5a
feat: per-package server options (#2858)
This PR adds per-package server options to resolve #2455. It is based on
the previous work in #2456, but takes a different approach: options are
loaded for the specific file in the file worker when `print-paths` is
called, instead of loading them in the watchdog with a separate Lake
command. This change addresses review comments made in #2456.

In doing so, it introduces two new Lake config fields: 
- `leanOptions`: `-D` flag options that are passed to both the language
server and `lean` when building.
- `moreServerOptions`: `-D` flag options that are passed to the language
server.

Since `print-paths` must also accept a file path to compute the options
for that file, this PR is changing the API for `print-paths`. As there
have been numerous complaints about the name `print-paths`, I also
decided to change it to `setup-file` in this PR, since it would break
compatibility with the old Lake API anyways.

This PR deprecates the Lakefile field `moreServerArgs` in favor of
`moreGlobalServerArgs`, as suggested in the review for #2456.

Fixes #2455

---------

Co-authored-by: digama0 <mcarneir@andrew.cmu.edu>
2023-11-26 13:42:38 +00:00

338 lines
11 KiB
Text

{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 1, "character": 17}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "trace.PrettyPrinter.format",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "trace.PrettyPrinter.format",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "format.indent",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "format.indent",
"kind": 10,
"detail": "(2), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "format.unicode",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "format.unicode",
"kind": 10,
"detail": "(true), unicode characters"},
{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "format.width",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "format.width",
"kind": 10,
"detail": "(120), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "trace.PrettyPrinter.format.backtrack",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "trace.PrettyPrinter.format.backtrack",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}},
"newText": "trace.PrettyPrinter.format.input",
"insert":
{"start": {"line": 1, "character": 11},
"end": {"line": 1, "character": 17}}},
"label": "trace.PrettyPrinter.format.input",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 4, "character": 20}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 4, "character": 11},
"end": {"line": 4, "character": 20}},
"newText": "format.indent",
"insert":
{"start": {"line": 4, "character": 11},
"end": {"line": 4, "character": 20}}},
"label": "format.indent",
"kind": 10,
"detail": "(2), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 4, "character": 11},
"end": {"line": 4, "character": 20}},
"newText": "trace.PrettyPrinter.format.input",
"insert":
{"start": {"line": 4, "character": 11},
"end": {"line": 4, "character": 20}}},
"label": "trace.PrettyPrinter.format.input",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 7, "character": 23}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}},
"newText": "trace.pp.analyze",
"insert":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}}},
"label": "trace.pp.analyze",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}},
"newText": "trace.pp.analyze.annotate",
"insert":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}}},
"label": "trace.pp.analyze.annotate",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}},
"newText": "trace.pp.analyze.error",
"insert":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}}},
"label": "trace.pp.analyze.error",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}},
"newText": "trace.pp.analyze.tryUnify",
"insert":
{"start": {"line": 7, "character": 11},
"end": {"line": 7, "character": 23}}},
"label": "trace.pp.analyze.tryUnify",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 10, "character": 27}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}},
"newText": "trace.pp.analyze",
"insert":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}}},
"label": "trace.pp.analyze",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}},
"newText": "trace.pp.analyze.annotate",
"insert":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}}},
"label": "trace.pp.analyze.annotate",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}},
"newText": "trace.pp.analyze.error",
"insert":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}}},
"label": "trace.pp.analyze.error",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}},
"newText": "trace.pp.analyze.tryUnify",
"insert":
{"start": {"line": 10, "character": 11},
"end": {"line": 10, "character": 27}}},
"label": "trace.pp.analyze.tryUnify",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 13, "character": 17}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "trace.PrettyPrinter.format",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "trace.PrettyPrinter.format",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "format.indent",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "format.indent",
"kind": 10,
"detail": "(2), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "format.unicode",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "format.unicode",
"kind": 10,
"detail": "(true), unicode characters"},
{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "format.width",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "format.width",
"kind": 10,
"detail": "(120), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "trace.PrettyPrinter.format.backtrack",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "trace.PrettyPrinter.format.backtrack",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}},
"newText": "trace.PrettyPrinter.format.input",
"insert":
{"start": {"line": 13, "character": 11},
"end": {"line": 13, "character": 17}}},
"label": "trace.PrettyPrinter.format.input",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}
{"textDocument": {"uri": "file:///completionOption.lean"},
"position": {"line": 16, "character": 18}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}},
"newText": "format.indent",
"insert":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}}},
"label": "format.indent",
"kind": 10,
"detail": "(2), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}},
"newText": "format.unicode",
"insert":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}}},
"label": "format.unicode",
"kind": 10,
"detail": "(true), unicode characters"},
{"textEdit":
{"replace":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}},
"newText": "format.width",
"insert":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}}},
"label": "format.width",
"kind": 10,
"detail": "(120), indentation"},
{"textEdit":
{"replace":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}},
"newText": "trace.PrettyPrinter.format.backtrack",
"insert":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}}},
"label": "trace.PrettyPrinter.format.backtrack",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"},
{"textEdit":
{"replace":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}},
"newText": "trace.PrettyPrinter.format.input",
"insert":
{"start": {"line": 16, "character": 11},
"end": {"line": 16, "character": 18}}},
"label": "trace.PrettyPrinter.format.input",
"kind": 10,
"detail":
"(false), enable/disable tracing for the given module and submodules"}],
"isIncomplete": true}