github vespa-engine/vespa lsp-v2.0.6
Vespa Language Server 2.0.6

latest releases: v8.411.13, v8.410.10, v8.409.18...
28 days ago

Vespa language server.

Schema Language Server in Neovim

Requirements

Requires java to be excutable on the system.

Optional: lspconfig plugin for nvim.

Installation

Download vespa-language-server_2.0.6.jar.

Using lspconfig

Register .sd and .profile as filetypes (in init.lua):

vim.filetype.add {
  extension = {
    profile = 'sd',
    sd = 'sd'
  }
}

Create a config for schema language server (in init.lua):

local lspconfig = require "lspconfig"
local configs = require "lspconfig.configs"

if not configs.schemals then
    configs.schemals = {
        default_config = {
            filetypes = { 'sd' },
            cmd = { 'java', '-jar', '/path/to/vespa-language-server_2.0.6.jar' },
            root_dir = lspconfig.util.root_pattern('.')
        },
    }
end

lspconfig.schemals.setup{
    -- optional on_attach function for setting keybindings etc.
    on_attach = function(client, bufnr)
       	-- local opts = {buffer = bufnr, remap = false}
	    -- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
    end
}

Manual Installation

If you don't want to use lspconfig you can refer to the LSP documentation for Neovim for manually registering the server.

Don't miss a new vespa release

NewReleases is sending notifications on new releases.