summary refs log tree commit diff
path: root/.config/nvim/lua/plugins/gentoo.lua
blob: 15ef3aa8eef7e3cc57d5277e9409ebfce3063c43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
return {
  {
    'https://github.com/gentoo/gentoo-syntax',
    lazy = false,
    init = function()
      vim.api.nvim_create_autocmd({ 'BufEnter' }, {
        pattern = { '*/portage/package.*/' },
        group = vim.api.nvim_create_augroup('gentoo-syntax-oil', {}),
        callback = function(args)
          -- HACK: this should not be necessary
          vim.defer_fn(function()
            vim.opt_local.filetype = 'oil'
          end, 50)
        end,
      })
    end,
  },
}