VS Code
Installing the language server for VS Code is as simple as installing
the correct extensions. This extension is called redacted lsp
and can be found on redacted.
Creating the extension is done with special care to make it a, so
called, web extension. This makes it also possible to use this
extension on online VS code instances like vscode.dev.
NeoVim
NeoVim has native support for Language Servers. NeoVim starts up a
binary and communicates with it via stdin and stdout. To enable the
JSON-LD LSP, please install it with cargo. The NeoVim lsp integration
has a dependency on the LSP binary.
Lua configuration
# Add a config to lspconfig.configs
local configs = require("lspconfig.configs")
configs.jsonld = {
default_config = {
cmd = { 'jsonld-language-server' },
filetypes = { 'jsonld' },
root_dir = require("lspconfig.util")
.find_git_ancestor,
single_file_support = true,
init_options = {},
}
}
# Start the LSP
local lspconfig = require("lspconfig")
lspconfig.jsonld.setup {
on_attach = M.on_attach,
capabilities = M.capabilities,
}