Working on Emacs
This commit is contained in:
parent
f4b2a68ba0
commit
b4d239d34b
10 changed files with 186 additions and 116 deletions
|
@ -3,10 +3,10 @@
|
||||||
A complete, declarative and reproducible configuration of my entire
|
A complete, declarative and reproducible configuration of my entire
|
||||||
Nix fleet, this includes the following machines:
|
Nix fleet, this includes the following machines:
|
||||||
|
|
||||||
- my main home workstation ~pc~
|
- [X] my main home workstation ~pc~
|
||||||
- homeserver (mainly a nas) ~hs~ *(to do, soon)*
|
- [ ] homeserver (mainly a nas) ~hs~
|
||||||
- my arm based [[https://wiki.pine64.org/wiki/Pinebook_Pro][PineBook Pro]] ~pbp~, almost completely open hardware
|
- [X] my arm based [[https://wiki.pine64.org/wiki/Pinebook_Pro][PineBook Pro]] ~pbp~, almost completely open hardware
|
||||||
- MacBook PRO that I use for work, for this I'll use [[https://github.com/LnL7/nix-darwin][nix-darwin]] keeping macOs 11 Big Sur *(to do, not soon)*
|
- [X] MacBook PRO that I use for work, for this I'll use [[https://github.com/LnL7/nix-darwin][nix-darwin]] keeping macOs 11 Big Sur
|
||||||
|
|
||||||
The different confgurations share many profiles, in fact my original
|
The different confgurations share many profiles, in fact my original
|
||||||
goal was to avoid to rewrite the same Nix derivations for my
|
goal was to avoid to rewrite the same Nix derivations for my
|
||||||
|
|
|
@ -123,11 +123,11 @@
|
||||||
# mbp is added bypassing Digga's mkFlake and adding a specific output to this flake
|
# mbp is added bypassing Digga's mkFlake and adding a specific output to this flake
|
||||||
pc = {
|
pc = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
imports = [{ modules = ./hosts/pc; }];
|
imports = [ { modules = ./hosts/pc; } ];
|
||||||
};
|
};
|
||||||
pbp = {
|
pbp = {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
imports = [{ modules = ./hosts/pbp; }];
|
imports = [ { modules = ./hosts/pbp; } ];
|
||||||
modules = [
|
modules = [
|
||||||
"${pinebook-pro}/pinebook_pro.nix"
|
"${pinebook-pro}/pinebook_pro.nix"
|
||||||
];
|
];
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
imports = [ (digga.lib.importModules ./users/modules) ];
|
imports = [ (digga.lib.importModules ./users/modules) ];
|
||||||
externalModules = [ ];
|
externalModules = [];
|
||||||
importables = rec {
|
importables = rec {
|
||||||
profiles = digga.lib.rakeLeaves ./users/profiles;
|
profiles = digga.lib.rakeLeaves ./users/profiles;
|
||||||
suites = with profiles; rec {
|
suites = with profiles; rec {
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
|
|
||||||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||||
|
|
||||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
|
||||||
|
|
||||||
defaultTemplate = self.templates.bud;
|
defaultTemplate = self.templates.bud;
|
||||||
templates.bud.path = ./.;
|
templates.bud.path = ./.;
|
||||||
|
|
|
@ -14,15 +14,20 @@ emacsWithPackages (
|
||||||
evil-collection
|
evil-collection
|
||||||
helm
|
helm
|
||||||
projectile
|
projectile
|
||||||
|
helm-projectile
|
||||||
magit
|
magit
|
||||||
|
company
|
||||||
|
helm-company
|
||||||
fira-code-mode
|
fira-code-mode
|
||||||
org-superstar
|
org-superstar
|
||||||
nix-mode
|
nix-mode
|
||||||
|
lsp-python-ms
|
||||||
lispy
|
lispy
|
||||||
lsp-mode
|
lsp-mode
|
||||||
dap-mode
|
dap-mode
|
||||||
which-key
|
which-key
|
||||||
sudo-utils
|
sudo-utils
|
||||||
|
rainbow-delimiters
|
||||||
treemacs
|
treemacs
|
||||||
treemacs-evil
|
treemacs-evil
|
||||||
treemacs-projectile
|
treemacs-projectile
|
||||||
|
|
|
@ -10,4 +10,12 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.customEmacs;
|
package = pkgs.customEmacs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
python-language-server
|
||||||
|
fd
|
||||||
|
ag
|
||||||
|
nixpkgs-fmt
|
||||||
|
rnix-lsp
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(fringe-mode 1)
|
(fringe-mode 1)
|
||||||
(display-time-mode 1)
|
(display-time-mode 1)
|
||||||
|
(global-hl-line-mode 1)
|
||||||
|
|
||||||
|
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
||||||
|
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
|
||||||
|
(add-hook 'prog-mode-hook #'show-paren-mode)
|
||||||
|
|
||||||
|
|
||||||
(provide 'aesthetics)
|
(provide 'aesthetics)
|
35
users/profiles/emacs/emacs.d/config/config-company.el
Normal file
35
users/profiles/emacs/emacs.d/config/config-company.el
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
(use-package company
|
||||||
|
:init
|
||||||
|
(setq company-backends '(company-capf
|
||||||
|
company-keywords
|
||||||
|
company-semantic
|
||||||
|
company-files
|
||||||
|
company-etags
|
||||||
|
company-elisp
|
||||||
|
company-jedi
|
||||||
|
company-ispell
|
||||||
|
company-yasnippet)
|
||||||
|
company-tooltip-limit 20
|
||||||
|
company-show-numbers t
|
||||||
|
company-idle-delay 0
|
||||||
|
company-echo-delay 0)
|
||||||
|
:bind
|
||||||
|
(("C-c ." . company-complete)
|
||||||
|
("C-c C-." . company-complete)
|
||||||
|
("C-c s s" . company-yasnippet)
|
||||||
|
:map company-active-map
|
||||||
|
("C-n" . company-select-next)
|
||||||
|
("C-p" . company-select-previous)
|
||||||
|
("C-d" . company-show-doc-buffer)
|
||||||
|
("M-." . company-show-location)))
|
||||||
|
|
||||||
|
(use-package helm-company
|
||||||
|
:after (helm company)
|
||||||
|
:bind (("C-c C-;" . helm-company))
|
||||||
|
:commands (helm-company)
|
||||||
|
:init
|
||||||
|
(define-key company-mode-map (kbd "C-;") 'helm-company)
|
||||||
|
(define-key company-active-map (kbd "C-;") 'helm-company))
|
||||||
|
|
||||||
|
|
||||||
|
(provide 'config-company)
|
|
@ -4,6 +4,7 @@
|
||||||
(setq lsp-keymap-prefix "C-c l")
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
|
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
|
||||||
(nix-mode . lsp)
|
(nix-mode . lsp)
|
||||||
|
(python-mode . lsp)
|
||||||
;; if you want which-key integration
|
;; if you want which-key integration
|
||||||
(lsp-mode . lsp-enable-which-key-integration))
|
(lsp-mode . lsp-enable-which-key-integration))
|
||||||
(before-save . lsp-format-buffer)
|
(before-save . lsp-format-buffer)
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
(projectile-mode +1)
|
(projectile-mode +1)
|
||||||
:bind (:map projectile-mode-map
|
:bind (:map projectile-mode-map
|
||||||
("s-p" . projectile-command-map)
|
("s-p" . projectile-command-map)
|
||||||
("C-c p" . projectile-command-map)))
|
("C-c p" . projectile-command-map))
|
||||||
|
:config
|
||||||
|
(helm-projectile-on))
|
||||||
|
|
||||||
|
|
||||||
(provide 'config-projectile)
|
(provide 'config-projectile)
|
||||||
|
|
9
users/profiles/emacs/emacs.d/config/config-python.el
Normal file
9
users/profiles/emacs/emacs.d/config/config-python.el
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(use-package lsp-python-ms
|
||||||
|
:ensure t
|
||||||
|
:hook (python-mode . (lambda ()
|
||||||
|
(require 'lsp-python-ms)
|
||||||
|
(lsp)))
|
||||||
|
:init
|
||||||
|
(setq lsp-python-ms-executable (executable-find "python-language-server")))
|
||||||
|
|
||||||
|
(provide 'config-python)
|
|
@ -7,7 +7,11 @@
|
||||||
(require 'config-emacs)
|
(require 'config-emacs)
|
||||||
(require 'config-evil)
|
(require 'config-evil)
|
||||||
(require 'config-helm)
|
(require 'config-helm)
|
||||||
|
(require 'config-org)
|
||||||
|
(require 'config-projectile)
|
||||||
|
(require 'config-company)
|
||||||
(require 'config-magit)
|
(require 'config-magit)
|
||||||
(require 'config-treemacs)
|
(require 'config-treemacs)
|
||||||
(require 'config-lsp)
|
(require 'config-lsp)
|
||||||
|
(require 'config-python)
|
||||||
(require 'nix)
|
(require 'nix)
|
||||||
|
|
Loading…
Add table
Reference in a new issue