We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the jsonnet_ls client doesn't attach to a buffer when opening jsonnet files
NVIM v0.7.2 Build type: Release LuaJIT 2.1.0-beta3 Compiled by brew@Monterey
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.7.2_1/share/nvim"
Run :checkhealth for more info
47a521e
macOS 12.3.1
jsonnet_ls
go install github.com/grafana/jsonnet-language-server@latest
echo '{}' > f.jsonnet nvim -nu minimal_init.lua f.jsonnet
:LspInfo reports that there are 0 clients attached to the buffer
:LspInfo
:LspInfo shows the jsonnet_ls client attached to the buffer when opening a jsonnet file (and it works)
local on_windows = vim.loop.os_uname().version:match 'Windows' local function join_paths(...) local path_sep = on_windows and '\\' or '/' local result = table.concat({ ... }, path_sep) return result end vim.cmd [[set runtimepath=$VIMRUNTIME]] local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp' vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site')) local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack') local lspconfig_path = join_paths(package_root, 'test', 'start', 'nvim-lspconfig') if vim.fn.isdirectory(lspconfig_path) ~= 1 then vim.fn.system { 'git', 'clone', 'https://github.com/neovim/nvim-lspconfig', lspconfig_path } end vim.lsp.set_log_level 'trace' require('vim.lsp.log').set_format_func(vim.inspect) local nvim_lsp = require 'lspconfig' local on_attach = function(_, bufnr) local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings. local opts = { buffer = bufnr, noremap = true, silent = true } vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts) vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts) vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts) vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts) vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts) vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts) end -- Add the server that troubles you here local name = 'jsonnet_ls' local cmd = { 'jsonnet-language-server', '-t' } -- needed for elixirls, omnisharp, sumneko_lua if not name then print 'You have not defined a server name, please edit minimal_init.lua' end if not nvim_lsp[name].document_config.default_config.cmd and not cmd then print [[You have not defined a server default cmd for a server that requires it please edit minimal_init.lua]] end nvim_lsp[name].setup { cmd = cmd, on_attach = on_attach, } print [[You can find your log at $HOME/.cache/nvim/lsp.log. Please paste in a github issue under a details tag as described in the issue template.]]
https://gist.github.com/rlankfo/6ab306bb77692e579e9a509b9bc8eb8f
The text was updated successfully, but these errors were encountered:
nvim-lspconfig/lua/lspconfig/server_configurations/jsonnet_ls.lua
Line 17 in bfdf2e9
The server only starts when you are inside a git repo, or there is a jsonnetfile.json in the current directory (when you're using jsonnet-bundler).
jsonnetfile.json
Sorry, something went wrong.
No branches or pull requests
Description
the jsonnet_ls client doesn't attach to a buffer when opening jsonnet files
Neovim version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.7.2_1/share/nvim"
Run :checkhealth for more info
Nvim-lspconfig version
47a521e
Operating system and version
macOS 12.3.1
Affected language servers
jsonnet_ls
Steps to reproduce
install jsonnet language server
go install github.com/grafana/jsonnet-language-server@latest
create a jsonnet file
echo '{}' > f.jsonnet
nvim -nu minimal_init.lua f.jsonnet
Actual behavior
:LspInfo
reports that there are 0 clients attached to the bufferExpected behavior
:LspInfo
shows thejsonnet_ls
client attached to the buffer when opening a jsonnet file (and it works)Minimal config
LSP log
https://gist.github.com/rlankfo/6ab306bb77692e579e9a509b9bc8eb8f
The text was updated successfully, but these errors were encountered: