noib3 / nvim-completion

:zap: An async autocompletion framework for Neovim
MIT License
503 stars 13 forks source link

How can I start to contribute? #7

Closed sandangel closed 2 years ago

sandangel commented 2 years ago

I can see lots of TODO in the code, but I don't know which one I should pick up first. Do you have any issue that you can assign to me to get more familiar with the code base?

noib3 commented 2 years ago

Hi, thanks for reaching out. I guess this: https://github.com/noib3/nvim-compleet/blob/08cd0763f7ba2f62835565c045933b5f66780061/src/ui/details/positioning.rs#L78

would be a good place to start. It's a bug with the positioning of the details window (i.e. the window next to the completion menu that shows details about a completion) that causes nvim-compleet to panic.

Demo: bug

to reproduce:

The reason is that api.win_get_position(menu_winid) (which is just a Rust binding to vim.api.nvim_win_get_position) returns a number of columns bigger than the total terminal width, causing the following unchecked subtractions to overflow.

I believe it's a bug with Neovim itself rather than nvim-compleet, but I haven't looked too much into it.

P.S.: this is just a suggestion, if you'd like to work on something else feel free to do so. Also, if you'd like to contact me send me a DM on Telegram (https://t.me/noib3) or on matrix (@noib3:matrix.org).

sandangel commented 2 years ago

thank you. I will put some time to investigate that one this weekend.

sandangel commented 2 years ago

hmm, I can not reproduce that. set columns=173 and open new vsplit, but don't know why my menu is different with you when I hit <c-n> to go to the next item. I also tried disabling all plugins but still the same. cc @noib3

  use {
    '~/Work/nvim-compleet',
    config = function()
      require('compleet').setup {
        sources = {
          lipsum = {
            enable = true,
          },
        },
      }
    end,
  }

https://user-images.githubusercontent.com/22189661/161381740-dcbe7cd7-2d9c-4e12-8624-f27f1eee6f63.mov

noib3 commented 2 years ago

I think you haven't set the mappings to select the first completion. If that still doesn't work, try to replicate it by creating a minimal init.lua and calling neovim with nvim --clean -u ./init.lua.

MurdeRM3L0DY commented 2 years ago

Hi, I noticed you've been working on the back2rpc branch recently. Is that going to be the final architecture? Are you going to merge that eventually into master?