neovim / nvim-lspconfig

Quickstart configs for Nvim LSP
Apache License 2.0
9.98k stars 2.04k forks source link

ansiblels ansible.validation.lint.arguments not working as intended #3226

Open domsch1988 opened 1 week ago

domsch1988 commented 1 week ago

Description

I'm trying to pass a custom ansible-lint configuration file to ansiblels. From the vscode documentation for the LS, there should be a "arguments" setting for the linter. Configuring this like below, still uses the repository local configuration file though, instead of the one provided in the argument.

LSP Related Setup:

return {

    {
        'neovim/nvim-lspconfig',
        dependencies = {
            { 'williamboman/mason-lspconfig.nvim', config = function() end },
            { 'williamboman/mason.nvim', config = true },
        },
        config = function()
            require 'lspconfig'.ansiblels.setup {
                settings = {
                    {
                        ansible = {
                            ansible = {
                                path = 'ansible'
                            },
                            executionEnvironment = {
                                enabled = false
                            },
                            python = {
                                interpreterPath = 'python'
                            },
                            validation = {
                                enabled = true,
                                lint = {
                                    enabled = true,
                                    path = 'ansible-lint',
                                    arguments = '-c /home/dosa/.config/ansible-lint.yml'
                                }
                            }
                        }
                    }
                }
            }
        end,
    },
}

This should result in ansible-lint using the configuration in my home folder, but instead it still looks for the one in the repository and uses that.

glepnir commented 1 week ago

lua=require('lspconfig').ansiblels is not same as your config ?