noib3/nvim-completion

How can I start to contribute?

Closed this issue · 5 comments

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

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:

  • compile from commit 08cd076;
  • set the columns to 173 (altough it's probably possible to reproduce this with a different terminal width);
  • open a new vertical split to the right and go to that window;
  • type s;
  • select the first completion;
  • type i.

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).

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

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,
  }
Screen.Recording.2022-04-02.at.20.48.07.mov
noib3 commented

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.

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?