nvimtools / none-ls.nvim

null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
The Unlicense
2.39k stars 69 forks source link

Setup in readme return an error with eslint #110

Closed Its-Alex closed 4 months ago

Its-Alex commented 4 months ago

Issues

Feature description

Hi,

I'm new to neovim ecosystem, when following the readme to install none.ls in the Setup section I found a bug, when adding the following lines to my configuration:

        'nvimtools/none-ls.nvim',
        dependencies = {
            'nvim-lua/plenary.nvim',
        },
        config = function()
            local null_ls = require("null-ls")

            null_ls.setup({
                sources = {
                    null_ls.builtins.formatting.stylua,
                    null_ls.builtins.diagnostics.eslint,
                    null_ls.builtins.completion.spell,
                },
            })
        end

I have an error:

[null-ls] failed to load builtin eslint for method diagnostics; please check your config

Finding https://github.com/nvimtools/none-ls.nvim/discussions/81, I think that is because eslint has been moved to none-ls-extras.nvim because this is working:

        'nvimtools/none-ls.nvim',
        dependencies = {
            'nvim-lua/plenary.nvim',
            "nvimtools/none-ls-extras.nvim",
        },
        config = function()
            local null_ls = require("null-ls")

            null_ls.setup({
                sources = {
                    null_ls.builtins.formatting.stylua,
                    require("none-ls.diagnostics.eslint"),
                    null_ls.builtins.completion.spell,
                },
            })
        end

Can you please fix the readme if I'm right and add section about none-ls-extras.nvim? I can submit a PR if you want :slightly_smiling_face:

If I'm in the wrong can you explain me why? I can't find any answers.

Thanks in advance!

Help

Yes

Implementation help

No response

mochaaP commented 4 months ago

Thanks for the catch! This is now fixed in f44485f :)