mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add a basic language server
This commit is contained in:
parent
e553e5db29
commit
b553fc357c
5 changed files with 202 additions and 7 deletions
|
@ -39,6 +39,8 @@ class BlueprintApp:
|
|||
compile.add_argument("--output", dest="output", default="-")
|
||||
compile.add_argument("input", metavar="filename", default=sys.stdin, type=argparse.FileType('r'))
|
||||
|
||||
compile = self.add_subcommand("lsp", "Run the language server (for internal use by IDEs)", self.cmd_lsp)
|
||||
|
||||
self.add_subcommand("help", "Show this message", self.cmd_help)
|
||||
|
||||
try:
|
||||
|
@ -78,6 +80,10 @@ class BlueprintApp:
|
|||
e.pretty_print(opts.input.name, data)
|
||||
sys.exit(1)
|
||||
|
||||
def cmd_lsp(self, opts):
|
||||
langserv = LanguageServer()
|
||||
langserv.run()
|
||||
|
||||
|
||||
def main():
|
||||
BlueprintApp().main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue