summary refs log tree commit diff
path: root/.config/nvim/lua/plugins/gentoo.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-04-08 13:11:48 +0900
committerRobert Günzler <r@gnzler.io>2026-04-08 13:11:48 +0900
commitd4620f3ac119263fee90bd819eadaf84fc8d50b7 (patch)
treef5268e72a1c0037d29acac699e5d3f4c37be0e6b /.config/nvim/lua/plugins/gentoo.lua
parent8afe3fa8d88ae56e96f65897935ef508581ac5f7 (diff)
*
Automated-commit-by: dots
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/nvim/lua/plugins/gentoo.lua')
-rw-r--r--.config/nvim/lua/plugins/gentoo.lua25
1 files changed, 14 insertions, 11 deletions
diff --git a/.config/nvim/lua/plugins/gentoo.lua b/.config/nvim/lua/plugins/gentoo.lua
index 470e6de..15ef3aa 100644
--- a/.config/nvim/lua/plugins/gentoo.lua
+++ b/.config/nvim/lua/plugins/gentoo.lua
@@ -1,15 +1,18 @@
 return {
   {
-    'gentoo/gentoo-syntax',
-    -- ft = { 'ebuild' },
-    -- init = function()
-    --   vim.api.nvim_create_autocmd('LspAttach', {
-    --     callback = function(args)
-    --       if vim.opt.filetype == 'ebuild' then
-    --         vim.lsp.stop_client(vim.lsp.get_clients({ bufnr = args.bufnr }))
-    --       end
-    --     end,
-    --   })
-    -- end,
+    '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,
   },
 }