jsonnet-language-server

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2021 License: AGPL-3.0 Imports: 20 Imported by: 0

README

#+TITLE: Jsonnet Language Server

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

A *[[https://langserver.org][Language Server Protocol (LSP)]]* server for [[https://jsonnet.org][Jsonnet]].

** Demonstration
   [[https://user-images.githubusercontent.com/4599384/138060166-6ef56086-80c7-4d1a-9bcd-8de59e200b5e.mp4][LSP server demonstration]]

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

  Refer to [[file:example.jsonnet][example.jsonnet]] for a documented walkthrough.

** Installation
   To install the LSP server with Go into "${GOPATH}"/bin:
   #+NAME: Installation with Go
   #+BEGIN_SRC shell
   go get -u github.com/jdbaldry/jsonnet-language-server
   #+END_SRC

   To download the latest release binary from GitHub:
   #+NAME: Download from GitHub
   #+BEGIN_SRC shell
   curl -Lo jsonnet-language-server https://github.com/jdbaldry/jsonnet-language-server/releases/latest/download/jsonnet-language-server
   #+END_SRC

   #+RESULTS: Download from GitHub

** Contributing
   Contributions are more than welcome and I will try my best to be prompt with reviews.

*** Commits
    Individual commits should be meaningful and have useful commit messages.
    For tips on writing commit messages, refer to [[https://chris.beams.io/posts/git-commit/][How to write a commit message]].
    Contributions will be rebased before merge to ensure a fast-forward merge.

*** [[https://github.com/probot/dco#how-it-works][Developer Certificate of Origin (DCO)]]
    Contributors must sign the DCO for their contributions to be accepted.

*** Code style
    Go code should be formatted with ~gofmt~ and linted with [[https://golangci-lint.run/][golangci-lint]].

** Editor integration

*** Emacs
   Refer to [[file:editor/jsonnet-language-server.el][editor/jsonnet-language-server.el]] for an example of enabling the LSP server with lsp-mode.

*** [[https://github.com/VSCodium/vscodium][VSCodium]] / VSCode
   Use the [[https://github.com/julienduchesne/vscode-jsonnet][vscode-jsonnet extension]]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL