From 569d7bbc0316be7ef02de7c80e14297ac67a20e7 Mon Sep 17 00:00:00 2001 From: exu Date: Thu, 31 Oct 2024 11:43:17 +0100 Subject: [PATCH] Update emacs config Add company-ansible for completion. Change to corfu for completion --- roles/config/files/.config/doom/config.el | 4 +++ roles/config/files/.config/doom/init.el | 31 +++++++++++---------- roles/config/files/.config/doom/packages.el | 3 ++ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/roles/config/files/.config/doom/config.el b/roles/config/files/.config/doom/config.el index 69d7ae6f..e3eac779 100644 --- a/roles/config/files/.config/doom/config.el +++ b/roles/config/files/.config/doom/config.el @@ -152,3 +152,7 @@ (add-to-list 'auto-mode-alist '("\\.link\\'" . conf-unix-mode)) (add-to-list 'auto-mode-alist '("\\.pod\\'" . conf-unix-mode)) (add-to-list 'auto-mode-alist '("\\.container\\'" . conf-unix-mode)) + +(setq-local completion-at-point-functions + (mapcar #'cape-company-to-capf + (list #'company-ansible))) diff --git a/roles/config/files/.config/doom/init.el b/roles/config/files/.config/doom/init.el index c931364e..93c20c89 100644 --- a/roles/config/files/.config/doom/init.el +++ b/roles/config/files/.config/doom/init.el @@ -21,11 +21,12 @@ ;;layout ; auie,ctsrnm is the superior home row :completion - (company +tng) ; the ultimate code completion backend + ;;company ; the ultimate code completion backend + (corfu +icons +orderless) ; complete with cap(f), cape and a flying feather! ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life - vertico ; the search engine of the future + (vertico +icons) ; the search engine of the future :ui ;;deft ; notational velocity for Emacs @@ -63,7 +64,7 @@ ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates - ;;snippets ; my elves. They type so I don't have to + snippets ; my elves. They type so I don't have to word-wrap ; soft wrapping with language-aware indent :emacs @@ -105,7 +106,7 @@ ;;taskrunner ; taskrunner for all your projects terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux - ;;tree-sitter ; syntax and parsing, sitting in a tree... + tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp :os @@ -115,7 +116,7 @@ :lang ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP - (cc +lsp) ; C > C++ == 1 + (cc +lsp +tree-sitter) ; C > C++ == 1 ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs @@ -124,7 +125,7 @@ ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall - (elixir +lsp) ; erlang done right + (elixir +lsp +tree-sitter) ; erlang done right ;;elm ; care for a cup of TEA? emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age @@ -140,24 +141,24 @@ ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on - json ; At least it ain't XML + (json +tree-sitter) ; At least it ain't XML ;;(java +lsp) ; the poster child for carpal tunnel syndrome - (javascript +lsp) ; all(hope(abandon(ye(who(enter(here)))))) + (javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) ;;latex ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore + (markdown +tree-sitter) ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - org ; organize your plain life in plain text - php ; perl's insecure younger brother + ;;org ; organize your plain life in plain text + (php +tree-sitter) ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - (python +lsp +pyright) ; beautiful is better than ugly + (python +lsp +pyright +tree-sitter) ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 @@ -167,13 +168,13 @@ ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps - (sh +fish +lsp) ; she sells {ba,z,fi}sh shells on the C xor + (sh +fish +lsp +powershell +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - (web +lsp) ; the tubes - (yaml +lsp) ; JSON, but readable + (web +lsp +tree-sitter) ; the tubes + (yaml +lsp +tree-sitter) ; JSON, but readable ;;zig ; C, but simpler :email diff --git a/roles/config/files/.config/doom/packages.el b/roles/config/files/.config/doom/packages.el index 856dc8a1..85a2a332 100644 --- a/roles/config/files/.config/doom/packages.el +++ b/roles/config/files/.config/doom/packages.el @@ -63,3 +63,6 @@ ;; catppuccin (package! catppuccin-theme) + +;; ansible completion +(package! company-ansible)