public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Ryan Goldberg <rgoldber@redhat.com>
To: systemtap@sourceware.org
Subject: Introducing the Systemtap Language-server
Date: Fri, 3 Feb 2023 15:06:52 -0500	[thread overview]
Message-ID: <CAE8aAooY=xsf2P6t3tgsRuOL77bErqUhKSnNA9Gv3oZF6c8qXQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

Hi all,

A new language-server [0] mode has recently been added to systemtap. The
language-server, which runs as a child of an lsp-client [1], serves up
code-completion suggestions.

The language-server-protocol uses jsonrpc [2] and we developed our own C++
SDK which both implements jsonrpc and allows for the creation of
language-servers.

We use systemtap's pass 1 machinery in order to lex and parse
code-completion requests and then use the termination state to determine
the completion results as well as some metadata (such as the result type).
Further deriving these allows us to provide additional context-specific
completion results such as context variables within applicable probe
statement blocks or string completions within probe components. The server
also provides completions for globals, functions and macros from both
within the script and from the tapsets.

The language server can be run with "stap --language-server" and should be
started by a language-server client as the data is currently transferred
via stdin/stdout. We have currently been testing with vim, emacs, vscode,
jupyter and eclipse. Take a look at language-server/README.md for client
specific usage instructions.

For more information I'll be releasing a blog post later this year
describing the jupyter-notebook use case of the language-server. If you
have any feedback, I'd be happy to hear it.

All the best,

Ryan (rgoldber)

[0] -
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/

[1] -
https://microsoft.github.io/language-server-protocol/implementors/tools/

[2] - https://www.jsonrpc.org/specification

             reply	other threads:[~2023-02-03 20:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 20:06 Ryan Goldberg [this message]
2023-02-06  9:47 ` Martin Cermak
2023-02-14  7:42   ` Martin Cermak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE8aAooY=xsf2P6t3tgsRuOL77bErqUhKSnNA9Gv3oZF6c8qXQ@mail.gmail.com' \
    --to=rgoldber@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).