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

toggleterm windows are not ignored with beacon_ignore_filetypes #26

Open
NotAShelf opened this issue Aug 2, 2023 · 2 comments
Open

Comments

@NotAShelf
Copy link

Despite having toggleterm in the ignored filetypes, toggleterm is not actually ignored.

@srgsanky
Copy link

srgsanky commented Oct 9, 2024

+1, since the rewrite in lua 5f30e24 the ignored filetypes are no longer configurable. It is currently hardcoded to only 'oil' https://github.com/DanilaMihailov/beacon.nvim/blob/master/lua/beacon.lua#L26. This needs to be user configurable instead.

beacon_ignore_filetypes was first introduced by ce6fddc

@srgsanky
Copy link

srgsanky commented Oct 9, 2024

My current workaround is to enable this plugin only on non-aux filetypes

  {
    'danilamihailov/beacon.nvim',
    ft = function()
      -- beacon doesn't provide a way to disable this plugin for specific filetypes
      -- <https://github.com/DanilaMihailov/beacon.nvim/issues/26>
      -- ft doesn't provide a way to specify file types to ignore. A workaround is to list all
      -- common filetypes
      return {
        'c',
        'cpp',
        'rust',
        'go',
        'python',
        'javascript',
        'typescript',
        'lua',
        'vim',
        'bash',
        'html',
        'css',
        'scss',
        'json',
        'yaml',
        'toml',
        'xml',
        'markdown',
        'txt',
        'sh',
        'zsh',
        'make',
        'cmake',
        'dockerfile',
        'gitcommit',
        'gitrebase',
        'sql',
        'perl',
        'ruby',
        'php',
        'java',
        'scala',
        'haskell',
        'elixir',
        'erlang',
        'r',
        'latex',
        'tex',
        'perl',
        'kotlin',
        'dart',
        'swift',
        'racket',
        'clojure',
        'scheme',
        'fsharp',
        'ocaml',
        'fortran',
        'vim',
        'help',
        -- aux windows where I want this feature
        'neo-tree',
        'Outline',
        'neotest-summary',
        -- Add any other relevant filetypes here
      }
    end,
    config = function(opts)
      opts = opts or {}
      opts.width = 120

      -- Highlight groups have to be reinitialized after setting the color scheme
      vim.api.nvim_create_autocmd('ColorScheme', {
        callback = function()
          vim.api.nvim_set_hl(0, 'Beacon', { bg = 'white' })
        end,
      })
      require('beacon').setup()
    end,
  },

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