Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings
nvim-java

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Help with configError executing vim.schedule lua callback#365

Unanswered
fmorroni asked this question inQ&A
Discussion options

Hi, I have a custom config and have been trying to setup nvim-java. I'm using lazy as a package manager and I used the linkedKickstart repo as a guide to get this:

return {  {"neovim/nvim-lspconfig",dependencies= {'williamboman/mason.nvim','williamboman/mason-lspconfig.nvim','nvim-java/nvim-java',    }  },  {"williamboman/mason.nvim",opts= {},keys= {      {"<leader>m","<CMD>Mason<CR>",desc="Open mason"}    },  },  {"williamboman/mason-lspconfig.nvim",dependencies= {"williamboman/mason.nvim",'saghen/blink.cmp','SmiteshP/nvim-navic'},config=function()require("mason-lspconfig").setup()require("mason-lspconfig").setup_handlers({-- Default handlerfunction(server_name)require("lspconfig")[server_name].setup({capabilities=require('blink.cmp').get_lsp_capabilities(),on_attach=function(client,bufnr)ifclient.server_capabilities.documentSymbolProviderthenrequire("nvim-navic").attach(client,bufnr)require("nvim-navbuddy").attach(client,bufnr)endend          })end,jdtls=function()require('java').setup({jdk= {auto_install=false,            },          })require('lspconfig').jdtls.setup({settings= {java= {configuration= {runtimes= {                    {name="JavaSE-17",path="/usr/lib/jvm/java-17-openjdk/",                    },                    {name="JavaSE-21",path="/usr/lib/jvm/java-21-openjdk/",default=true,                    }                  }                }              }            }          })end      })require('user.plugins.lsp.keymaps')end,  },  {"folke/lazydev.nvim",ft="lua",-- only load on lua filesopts= {},  },}

It seems to be working fine (at least for the simple things I've tried), but I get an error every time I autocomplete from the LSP source.

image
image

Here's the error:

Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:410: method "workspace/executeClientCommand": either a result or an error must be sent to the server in responsestack traceback:[builtin#36]: at 0x70e722bfe620

Given that the error shows up when autocompleting here's my completion config usingblink (though it has nothing specific to java):

return {  {'saghen/blink.cmp',-- dependencies = { 'rafamadriz/friendly-snippets' },-- use a release tag to download pre-built binariesversion='*',dependencies= {      {'L3MON4D3/LuaSnip',version='*'},    },opts= {keymap= {preset='none',        ['<C-space>']= {'show','show_documentation','hide_documentation'},        ['<C-e>']= {'hide'},        ['<CR>']= {'select_and_accept','fallback'},        ['<Tab>']= {'select_and_accept','fallback'},        ['<C-c>']= {'cancel','fallback'},        ['<Up>']= {'select_prev','fallback'},        ['<Down>']= {'select_next','fallback'},        ['<C-k>']= {'select_prev','fallback_to_mappings'},        ['<C-j>']= {'select_next','fallback_to_mappings'},        ['<A-k>']= {'scroll_documentation_up','fallback'},        ['<A-j>']= {'scroll_documentation_down','fallback'},-- ['<Tab>'] = { 'snippet_forward', 'fallback' },-- ['<S-Tab>'] = { 'snippet_backward', 'fallback' },        ['<C-s>']= {'show_signature','hide_signature','fallback'},      },appearance= {nerd_font_variant='mono'      },snippets= {preset='luasnip'},sources= {default= {"snippets","lsp","path","buffer"},per_filetype= {sql= {'snippets','dadbod','buffer'},lua= {"lazydev","snippets","lsp","path","buffer"},        },providers= {lazydev= {name="LazyDev",module="lazydev.integrations.blink",-- make lazydev completions top priority (see `:h blink.cmp`)score_offset=100,          },dadbod= {name="Dadbod",module="vim_dadbod_completion.blink"},        },      },fuzzy= {implementation="rust"},-- signature = {--   enabled = true,--   window = { show_documentation = false },-- },completion= {menu= {-- Don't automatically show the completion menu-- auto_show = false,-- nvim-cmp style menudraw= {columns= {              {"label","label_description",gap=1 },              {"source_name"},              {"kind_icon","kind",gap=1 }            },          }        },      }    },  }}

Any ideas what might be the problem? Thanks!

You must be logged in to vote

Replies: 1 comment

Comment options

Well it's even more broken than I thought. I doesn't seem to be properly building the workspace... When first opening the project the workspace build fine, but if I for example refactor a class and change its name then it doesn't get rebuilt, so other files still see it with the old name. Then after a while the old.class file gets removed but a new one with the new name doesn't get built. Even if I runJavaBuildBuildWorkspace the renamed class doesn't get rebuilt...
I also tried withthis config which I had totally forgotten about, but the same thing happens.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@fmorroni

[8]ページ先頭

©2009-2025 Movatter.jp