https://github.com/jdbaldry/jsonnet-language-server
A Language Server Protocol (LSP) server for Jsonnet (https://jsonnet.org).
https://github.com/jdbaldry/jsonnet-language-server
jsonnet language-server-protocol lsp lsp-server
Last synced: 7 months ago
JSON representation
A Language Server Protocol (LSP) server for Jsonnet (https://jsonnet.org).
- Host: GitHub
- URL: https://github.com/jdbaldry/jsonnet-language-server
- Owner: jdbaldry
- License: agpl-3.0
- Created: 2021-10-17T16:19:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-17T06:45:37.000Z (over 2 years ago)
- Last Synced: 2024-06-19T03:13:19.405Z (over 1 year ago)
- Topics: jsonnet, language-server-protocol, lsp, lsp-server
- Language: Go
- Homepage:
- Size: 101 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: Jsonnet Language Server
*Warning: This project is no longer in active development*
*Use the Grafana Labs maintained tool instead: https://github.com/grafana/jsonnet-language-server.*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_SRCTo 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]]