A Language Server Protocol (LSP) server for Jsonnet

Jsonnet Language Server

Warning: This project is in active development and is likely very buggy.

A Language Server Protocol (LSP) server for Jsonnet.

Features

Jump to definition
For local variables, import and importstr files, and index targets.
Workspace symbols
Return a hierarchy of document symbols representing most nodes of the Jsonnet AST.
Diagnostics
Static errors and warnings of runtime errors.
Formatting
Format document according to default options.

Refer to example.jsonnet for a documented walkthrough.

Installation

To install the LSP server with Go into “${GOPATH}”/bin:

go get -u github.com/jdbaldry/jsonnet-language-server

To download the latest release binary from GitHub:

curl -Lo jsonnet-language-server https://github.com/jdbaldry/jsonnet-language-server/releases/latest/download/jsonnet-language-server

Editor integration

For Emacs, refer to editor/jsonnet-language-server.el for an example of enabling the LSP server with lsp-mode.

Comments
  • feat: Front the server with a CLI

    feat: Front the server with a CLI

    Opening this as a point of discussion For the vscode extension, I'd like to download/update to the latest released version (with a user prompt). For this, I need to know the currently installed version. Having a CLI --version allows me to query that It also provides a central configuration entrypoint for current and future options

    If you think this is a good idea, I can then set up CI to create releases on tags and publish executables (with goreleaser) and the release process can be configured to pass the correct ldflags

    Signed-off-by: Julien Duchesne [email protected]

  • Initial vscode client version

    Initial vscode client version

    It's not published or anything, and it has to be passed explicitely to vscode as cmd line option But it works, so I figured I'd push it as an initial version upon which we can build

  • Downloadable binary crashes with `Syntax error: redirection unexpected`

    Downloadable binary crashes with `Syntax error: redirection unexpected`

    Executing the downloaded binary from the release page crashes.

    $ cd $(mktemp -d)
    $ curl -O https://github.com/jdbaldry/jsonnet-language-server/releases/download/v0.3.0/jsonnet-language-server
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   662  100   662    0     0    522      0  0:00:01  0:00:01 --:--:--   522
    $ chmod +x jsonnet-language-server 
    $ ./jsonnet-language-server 
    ./jsonnet-language-server: 1: Syntax error: redirection unexpected
    

    Whereas the go install works as expected:

    $ go install github.com/jdbaldry/[email protected]
    go: downloading github.com/jdbaldry/jsonnet-language-server v0.3.0
    go: downloading github.com/hexops/gotextdiff v1.0.3
    $ $HOME/go/bin/jsonnet-language-server 
    2021/11/24 22:27:58 Starting the language server
    2021/11/24 22:27:58 Using the following jpaths: []
    ^C
    
  • fix: typo in `file://` for import definitions

    fix: typo in `file://` for import definitions

    I'm guessing it works in Emacs, but with the typo, definitions were completely broken for vscode All good now!

    Signed-off-by: Julien Duchesne [email protected]

  • feat: On format, apply edits to single lines instead of replacing the whole file

    feat: On format, apply edits to single lines instead of replacing the whole file

    Otherwise, vscode will jump to the end of the file every time the user saves

    Uses https://github.com/hexops/gotextdiff/ which in turn just copies the code used by the golang LSP: https://github.com/golang/tools/tree/master/internal/lsp/diff

    Closes #15

    Signed-off-by: Julien Duchesne [email protected]

  • Add full language support in the VS Code plugin

    Add full language support in the VS Code plugin

    Adds (and improves) the language configuration from https://github.com/liamdawson/vscode-jsonnet-language (which took it from https://github.com/heptio/vscode-jsonnet) This makes this vscode plugin fully support the jsonnet language without any dependencies

    I want to make this releasable in vscode ASAP so I can start testing iteratively (in real cases, not a development instance). With formatting and the navigation it currently has, it's already much better than the alternatives

    Next steps:

    1. Make the vscode extension download the latest language server release automatically
    2. Release the jsonnet language server in a Github Actions upon tagging
    3. Release and publish the vscode plugin in a Github Actions upon tagging
  • Add ability to evaluate a file

    Add ability to evaluate a file

    Most editors have their own implementation that shells out to jsonnet or tanka but that requires separate configuration of the JSONNET_PATH. It would be nice for the language server to do this, perhaps as a code action?

wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol

qmux qmux is a wire protocol for multiplexing connections or streams into a single connection. It is based on the SSH Connection Protocol, which is th

Dec 26, 2022
A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/s2h@master Docker 用户 docker pull m

Jan 2, 2023
language server protocol sdk implement for go

LSP(language server protocol) defines for golang lsp types is from vscode-languageserver-node. Project is working in progress. Example func main() {

Dec 17, 2022
Diameter stack and Base Protocol (RFC 6733) for the Go programming language

Diameter Base Protocol Package go-diameter is an implementation of the Diameter Base Protocol RFC 6733 and a stack for the Go programming language. St

Dec 28, 2022
SMPP 3.4 Protocol for the Go programming language

SMPP 3.4 This is an implementation of SMPP 3.4 for Go, based on the original smpp34 from Kevin Patel. The API has been refactored to idiomatic Go code

Dec 13, 2022
Implementation of Pinocchio Protocol in Go language

pinocchio-protocol-zksnarks Implementation of Pinocchio Protocol in Go language 1 零知识证明和zksnarks 1.1 为什么需要可证明的计算? 随着技术的发展,计算能力表现出不对称的特性,例如云计算等拥有大量的算力,

Nov 3, 2021
A TCP Server Framework with graceful shutdown, custom protocol.

xtcp A TCP Server Framework with graceful shutdown,custom protocol. Usage Define your protocol format: Before create server and client, you need defin

Dec 7, 2022
Scalable WebRTC Signaling Server with ayame-like protocol.

ayu ayu is WebRTC Signaling Server with ayame-like protocol. Scalable: ayu uses Redis to store room states, so it can be used on serverless platforms

Nov 11, 2022
Uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server

Finger Client This client uses the Finger user information protocol to open a TCP connection that makes a request to a Finger server. Build and Run Ru

Oct 7, 2021
Go server for STOMP message protocol

Stomper A Go message queue implementing the STOMP protocol. Done Frame parsing TODO Server connection protocol Define interface for queueing Implement

Nov 9, 2022
Use pingser to create client and server based on ICMP Protocol to send and receive custom message content.
Use pingser to create client and server based on ICMP Protocol to send and receive custom message content.

pingser Use pingser to create client and server based on ICMP Protocol to send and receive custom message content. examples source code: ./examples Us

Nov 9, 2022
Syslogpars - Simple syslog server, working to UDP-protocol

syslogparse Simple syslog server, working to UDP-protocol. Server was tested wit

Jan 22, 2022
whatsup is the reference server implementation for the fmrl protocol

whatsup whatsup is the reference server implementation for the fmrl protocol. Currently whatsup has no web interface, but may gain one in the future.

Mar 25, 2022
A simple FTP protocol with client and server implemented in TypeScript and Golang

websocket-ftp A simple FTP protocol with client and server implemented in TypeScript and Golang. Example (Client) const buffer: Uint8Array = (new Text

Apr 14, 2022
TritonHTTP - A simple web server that implements a subset of the HTTP/1.1 protocol specification

TritonHTTP Spec Summary Here we provide a concise summary of the TritonHTTP spec. You should read the spec doc for more details and clarifications. HT

Nov 5, 2022
Package arp implements the ARP protocol, as described in RFC 826. MIT Licensed.

arp Package arp implements the ARP protocol, as described in RFC 826. MIT Licensed. Portions of this code are taken from the Go standard library. The

Dec 20, 2022
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023
Go library for writing standalone Map/Reduce jobs or for use with Hadoop's streaming protocol

dmrgo is a Go library for writing map/reduce jobs. It can be used with Hadoop's streaming protocol, but also includes a standalone map/reduce impleme

Nov 27, 2022