Saghen / blink.cmp

Performant, batteries-included completion plugin for Neovim
MIT License
632 stars 27 forks source link

Path completions not working properly in MacOS #16

Closed alienman5k closed 2 days ago

alienman5k commented 3 days ago

I have tried the default configuration and many other combinations to see if I can get Path completions to be the first on the list but there is always a Mix and most of the time Path completions are not listed and even giving incorrect ones (like recently used which is not useful if I already moved to that part of the path)

I am not sure if the issue is specific to MacOS, but that is the only OS I have tested.

Is there a way to ignore any other suggestions and just show Path related when we are actually in a Path?

Below is the last configuration I tried but the results are pretty much the same as default (did not notice any change in behavior)

    sources = {
      providers = {
        {
          {
            'blink.cmp.sources.path',
            opts = {
              trailing_slash = true,
              label_trailing_slash = true,
              -- get_cwd = function(context) return vim.fn.expand(('#%d:p:h'):format(context.bufnr)) end,
              show_hidden_files_by_default = true,
            }
          },
          { 'blink.cmp.sources.lsp' },
          { 'blink.cmp.sources.snippets', score_offset = -3 },
        },
        { { 'blink.cmp.sources.buffer' } },
      },
    },
Screenshot 2024-10-07 at 10 49 52 PM Screenshot 2024-10-07 at 10 50 38 PM
alienman5k commented 2 days ago

Tested in linux, and does not seem to be platform specific as far as I can tell.

alteriks commented 2 days ago

Hi @Saghen, it seems that path completion is still broken. Using latest https://github.com/Saghen/blink.cmp/commit/15cb871d1f8c52050a0fcd07d31115f3a63cf20c with default config I'm still having issues with part of path being replaced after accepting next completion

https://github.com/user-attachments/assets/c42c41ee-d5fa-49a3-aad6-0a6cfedb4fc9

As you can see last used snippets are getting in the way of choosing path.