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

Is this a reasonable way to install via lazy?#385

Unanswered
ahakanbaba asked this question inQ&A
Discussion options

Apologies in advance, I am recently onboarding to neovim and lazy package manager.
Looking at theinstructions for installation the steps are simple for lazy.nvim.

I have the following:

In${XDG_CONFIG_HOME}/nvim/lua/plugins/nvim-tree.lua

return {'nvim-java/nvim-java'}

Then in${XDG_CONFIG_HOME}/nvim/init.lua

... require('java').setup()require('lspconfig').jdtls.setup({})...

Because thenvim-tree.lua does NOT set theconfig oropts to a value, Lazy would not call therequire('java').setup(opts) itself. Is that correct ?

I am also asking about the ordering requirements between therequire('java').setup() andrequire('lspconfig').jdtls.setup({}) . I have them both listed flat in theinit.lua file. While that works, I am wondering is there a better idiomatic (n)vim or lazy way to describe that dependency ?

You must be logged in to vote

Replies: 2 comments

Comment options

This is more a question about Lazy IMHO, but you should be able to define dependencies between plugins e.g. like this:

return {    {        "nvim-java/nvim-java",        opts = {},    },    {        "neovim/nvim-lspconfig",         dependencies = {             "nvim-java/nvim-java",         },         config = function()             require("lspconfig")["jdtls"].setup({})         end,    },}
You must be logged in to vote
0 replies
Comment options

Because the nvim-tree.lua does NOT set the config or opts to a value, Lazy would not call the require('java').setup(opts) itself. Is that correct ?

Yes

I am wondering is there a better idiomatic (n)vim or lazy way to describe that dependency ?

Yes. You can find some examples in installation guides.

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
3 participants
@ahakanbaba@bsolar17@s1n7ax
Converted from issue

This discussion was converted from issue #368 on May 17, 2025 20:57.


[8]ページ先頭

©2009-2025 Movatter.jp