Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot setup for Neovim using lazy.nvim #101

Open
dimtsi opened this issue Feb 12, 2024 · 1 comment
Open

Cannot setup for Neovim using lazy.nvim #101

dimtsi opened this issue Feb 12, 2024 · 1 comment

Comments

@dimtsi
Copy link

dimtsi commented Feb 12, 2024

After some attempts I do not seem to be able to setup ropevim in my Neovim setup(NvChad) which uses lazyvim plugin manager.

I am using python-language-server (pylsp) LSP installed via Mason. I have installed the following libraries both in the default conda environment that is activated in the shell when I start nvim and the python-language-server virtual environment.

rope
ropevim
pynvim
ropemode

In my plugins.lua I have added the following

  {
    "python-rope/ropevim",
    ft = "python",
    init = function() vim.g.ropevim_prefer_py3 = 1 end,
    build = "pip install rope ropevim pynvim",
    lazy = false
  },

and the following to configs/lspconfig.lua

lspconfig.pylsp.setup {
  on_attach = on_attach,
  settings = {
    pylsp = {
      plugins = {
        -- formatter options
        black = { enabled = true },
        autopep8 = { enabled = false },
        yapf = { enabled = false },
        -- linter options
        pylint = { enabled = false, executable = "pylint" },
        pyflakes = { enabled = false },
        pycodestyle = { enabled = false },
        -- type checker
        pylsp_mypy = { enabled = true },
        -- auto-completion options
        jedi_completion = { fuzzy = true },
        -- import sorting
        pyls_isort = { enabled = true },
      },
    },
  },
  flags = {
    debounce_text_changes = 200,
  },
  capabilities = capabilities,
  filetypes = {"python"}
}

Having done all of that I do not get access to ropevim commands :Rope* or keybindings. The interesting thing is that when I press :h Rope<TAB> I see the ropevim docs which is interesting.
Am I missing something? And if it matters can you maybe explain how it should be installed using a lazy.nvim setup?

Note: I am using an NvChad setup so I am more interested in why the commands are not loaded and not the keybindings as some of them can already be overridden.

@lieryan
Copy link
Member

lieryan commented Mar 6, 2024

Hi @dimtsi, ropevim is in maintenance only mode. The current recommended way to use rope within vim is to use python-lsp-server with an LSP client. pylsp comes with builtin support for rope via the built-in plugin rope_rename, rope_autoimport, and rope_completion and pylsp-rope adds refactoring codeactions.

You should be able to use any LSP client of choice (I use vim-lsp, but I occasionally test on other LSP client as well). If you're using neovim though and want codeaction support, I would recommend against using the builtin LSP client, because IME neovim's default lsp is quite buggy when handling CodeActions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants