diff options
Diffstat (limited to '.config/nvim/lua/plugins/gentoo.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/gentoo.lua | 25 |
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, }, } |