command
module
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: Apr 1, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
jq-lsp
jq language server.
You probably want to use this via one of these:
It can currently do:
- Syntax checking.
- Error on missing function or binding.
- Goto definition of function or binding.
- Auto complete function and binding.
- Include/Import support.
- Hover definition of function.
- Hover documentation for builtin.
- Function symbols per document.
- Read additional builtins from
.jq-lsp.jq
.
Install
# install directly
go install github.com/wader/jq-lsp@master
# copy binary to $PATH
cp "$(go env GOPATH)/bin/jq-lsp" /usr/local/bin
# build binary from cloned repo
go build -o jq-lsp .
Development
# run all tests
go test -v ./...
# run tests and update responses
go test -v ./... -update
Thanks
jq-lsp uses a modified version of
itchyny's gojq parser.
builtins documentation is based on https://github.com/stedolan/jq/blob/master/docs/content/manual/manual.yml
and is licensed under https://github.com/stedolan/jq/blob/master/COPYING
TODO and ideas
- Semantic tokens
- Own parser or modified gojq parser to be able to recover and give more useful errors
- Server loop and https://github.com/itchyny/gojq/issues/86
- Warn about unused functions and bindings
- Better at handling broken syntax while typing
$<cursor>
auto complete, add temp name?
a | n<cursor> f
, add temp name?
- Transitive include behavior (jq/gojq behaves differently?)
- Source formatting
- Requires whitespace/comment support in lexer/parser
- Goto definition for builtin functions somehow
- Input completion. How to indicate input and to do safe eval?
- REPL or some kind of eval support?
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
internal
|
|
difftest
Package difftest implement test based on serialized string output
|
Package difftest implement test based on serialized string output |
|
|
|
|
Click to show internal directories.
Click to hide internal directories.