HallerPatrick / py_lsp.nvim

Lsp Plugin for working with Python virtual environments
97 stars 11 forks source link

capabilities, on_attach and pylsp_plugins are empty #39

Closed Mte90 closed 4 months ago

Mte90 commented 4 months ago

With this code you can see

require'py_lsp'.setup({
    language_server = "pylsp",
    source_strategies = {"poetry", "default", "system"},
    capabilities = capabilities,
    on_attach = on_attach,
    pylsp_plugins = {
        pyls_mypy = {
            enabled = true
        },
        rope_autoimport = {
            enabled = true
        },
        rope_completion = {
            enabled = true
        },
        pyls_isort = {
            enabled = true
        },
        pycodestyle = {
            enabled = false,
        },
        flake8 = {
            enabled = true,
            executable = venv_bin_detection("flake8"),
        }
    }
})

That on setup pylsp_plugins and the others are empty, excluded source_strategies.

Screenshot_20240305_182502

You can check the issue with:


  local ok, notify = pcall(require, "notify")
  for k, v in pairs(opts) do
  if type(v)=='table' then
      notify.notify(k .. table.concat(v, ','), "info", {
        title = " py_lsp.nvim",
        timeout = 300,
      })
  end

On setup function. I saw this issue as the LSP is not applying the plugins, the data are there but they are not passed in the rest of the plugin.

Mte90 commented 4 months ago

No the values are passed... I have to understand some settings at the end...