Posts tagged pkgcheck
Portage
Configure the following for Portage.
Emerge
Emerge the following packages:
app-emacs/company-ebuild
dev-util/pkgcheck
Company-Ebuild should pull in app-emacs/ebuild-mode
, if that does not happen, then report a bug ;-D
Standard
Add the following to your user's Emacs initialization file. The initialization file is either ~/.emacs.d/init.el
or ~/.config/emacs/init.el
for newer versions of GNU Emacs.
|
(require 'ebuild-mode)
(require 'company-ebuild)
(require 'flycheck)
(require 'flycheck-pkgcheck)
(add-hook 'ebuild-mode-hook 'company-ebuild-setup)
(add-hook 'ebuild-mode-hook 'flycheck-mode)
(add-hook 'ebuild-mode-hook 'flycheck-pkgcheck-setup)
|
Use-Package
We can also configure our environment using a use-package
macro that simplifies the setup a little bit.
To use the below configuration the app-emacs/use-package
package will have to be installed.
|
(require 'use-package)
(use-package ebuild-mode
:defer t
:mode "\\.\\(ebuild\\|eclass\\)\\'"
:hook
((ebuild-mode . company-ebuild-setup)
(ebuild-mode . flycheck-mode)
(ebuild-mode . flycheck-pkgcheck-setup)))
|
The :defer t
and :mode "..."
enable deferred loading which theoretically speeds up GNU Emacs initialization time at the cost of running the whole use-package
block of ebuild-mode
configuration when the :mode
condition is met.
News
Repository
With this commit first GNU Emacs integration was merged into the pkgcheck repository.
History
Thanks
Huge thanks to Sam James and Arthur Zamarin for support and interest in getting this feature done.
Installation
Unmasking
The Flycheck integration is unreleased as of now, this will (hopefully) change in the future, but for now You need live versions of snakeoil
, pkgcore
and pkgcheck
.
File: /etc/portage/package.accept_keywords/pkgcore.conf
|
dev-python/snakeoil **
sys-apps/pkgcore **
dev-util/pkgcheck **
|
Also You will need to unmask app-emacs/flycheck
and its dependencies.
File: /etc/portage/package.accept_keywords/emacs.conf
|
app-emacs/epl
app-emacs/pkg-info
app-emacs/flycheck
|
Emerging
Install pkgcheck with the emacs
USE flag enabled.
File: /etc/portage/package.use/pkgcore.conf
Afterwards run:
|
emerge -1av dev-python/snakeoil sys-apps/pkgcore dev-util/pkgcheck
emerge -av --noreplace dev-util/pkgcheck
|
Configuration
Following is what I would suggest to put into your Emacs config file:
|
(require 'ebuild-mode)
(require 'flycheck)
(require 'flycheck-pkgcheck)
(setq flycheck-pkgcheck-enable t)
(add-hook 'ebuild-mode-hook 'flycheck-mode)
(add-hook 'ebuild-mode-hook 'flycheck-pkgcheck-setup)
|
If You are using use-package
:
|
(use-package flycheck
:ensure nil)
(use-package ebuild-mode
:ensure nil
:hook ((ebuild-mode . flycheck-mode)))
(use-package flycheck-pkgcheck
:ensure nil
:custom ((flycheck-pkgcheck-enable t))
:hook ((ebuild-mode . flycheck-pkgcheck-setup)))
|
The lines with :ensure nil
are there to prevent use-package
from trying to download the particular package from Elpa (because we use system packages for this configuration).