supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven
https://supermaven.com/
MIT License
304 stars 16 forks source link

Files included in `ignore_filetypes` no longer provides suggestions but they still seemed to be processed #12

Open hboon opened 1 month ago

hboon commented 1 month ago

With:

ignore_filetypes = { markdown = true },

open a larger file and navigate to the last line and we can trigger #11

AlejandroSuero commented 1 month ago

@hboon how large are we talking, I tested in multiple large files, one of them being binary_handler.lua that has 506 lines and it still works on my end.

hboon commented 1 month ago

@AlejandroSuero large as in #11 which is fixed, but this issue is specifically for the file still being processed, doesn't have to be a large file. I just brought #11/large files up because it was an obvious sign the file is still read/processed

AlejandroSuero commented 1 month ago

@hboon Have you tried with a minimal config like:

-- ~/.config/nvim/init.lua or in a minimal.lua and run:
-- nvim --clean -u minimal.lua
local lazypath = "/tmp/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
    {
      "supermaven-inc/supermaven-nvim",
      config = function()
          require("supermaven-nvim").setup({})
      end,
    },
}, {})

Maybe there are other plugins or configurations blocking the file processing, with my setup I haven't encountered yet a moment when the files still being read/processed. That is why I am asking.

hboon commented 1 month ago

@AlejandroSuero I could try, but large files is really #11 and is already fixed (for me). Or are you referring to something different?

AlejandroSuero commented 1 month ago

@hboon I get what you are saying now, I tried ignoring filetypes like:

ignore_filetypes = {
  "lua",
  "markdown",
},

In my case it still displays the suggestions even. After testing it a bit, I discovered that the file wasn't being ignored properly. I think I found the solution to this, I will make a PR.

AlejandroSuero commented 1 month ago

@hboon I opened a PR #35 in case you want to check it out and see if that fixes the issue.