23.7.25:
- company-box so company and copilot play nice with each other - SPC SPC bound to completion-at-point but does this work? - corfu config changes with hopes that it plays better with lsp completions - corfu-candidate-overlay config, but disabled - copilot keybinds? - nix, but this doesn't work well
This commit is contained in:
parent
ac3c35f358
commit
39d889549f
41
init.org
41
init.org
|
@ -509,6 +509,7 @@ Honestly not very happy with this at the moment, but it's kind of hacked togethe
|
|||
(general-def '(emacs normal) 'with-editor-mode-map ",," 'with-editor-finish)
|
||||
(leader-def
|
||||
"<TAB>" #'nemo/switch-to-last-buffer
|
||||
"<SPC>" #'completion-at-point
|
||||
"d" #'duplicate-line
|
||||
"gb" #'xref-go-back
|
||||
"gf" #'xref-go-forward
|
||||
|
@ -1182,6 +1183,12 @@ Use =consult-xref= for =lsp-xref= and =xref-find-references=.
|
|||
(setq
|
||||
company-minimum-prefix-length 1
|
||||
company-idle-delay 0.0))
|
||||
|
||||
(use-package company-box
|
||||
:straight t
|
||||
:after company
|
||||
:hook (company-mode . company-box-mode)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Corfu - Auto-Completion
|
||||
|
@ -1202,8 +1209,10 @@ Auto-completion using =corfu=:
|
|||
;; Short delay
|
||||
(corfu-popupinfo-delay 0.5)
|
||||
;; Preselect the first suggestion
|
||||
(corfu-preselect 'first)
|
||||
(corfu-preselect nil)
|
||||
(corfu-on-exact-match nil)
|
||||
;; Don't automatically fill in the selected candidate
|
||||
(corfu-preview-current nil)
|
||||
:custom
|
||||
(lsp-completion-provider :none)
|
||||
:init
|
||||
|
@ -1247,6 +1256,16 @@ Auto-completion using =corfu=:
|
|||
;; )
|
||||
#+end_src
|
||||
|
||||
*** COMMENT corfu-candidate-overlay
|
||||
#+begin_src emacs-lisp
|
||||
(use-package corfu-candidate-overlay
|
||||
:straight t
|
||||
:after corfu
|
||||
:config
|
||||
(corfu-candidate-overlay-mode +1)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
*** kind-icon
|
||||
Use =kind-icon= to decorate corfu completion candidates:
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1282,6 +1301,7 @@ This package seems to slow down search quite a bit in common buffers like =find-
|
|||
:init
|
||||
;; Add `completion-at-point-functions', used by `completion-at-point'.
|
||||
;; NOTE: The order matters!
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-capf-buster)
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-dabbrev)
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-file)
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-elisp-block)
|
||||
|
@ -1381,14 +1401,18 @@ Enable =hs-minor-mode= in =prog-mode= to allow for folding away comments and mod
|
|||
(use-package copilot
|
||||
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))
|
||||
:ensure t
|
||||
:hook ((prog-mode) . copilot-mode)
|
||||
:hook ((prog-mode markdown-mode conf-toml-mode) . copilot-mode)
|
||||
:bind (
|
||||
("TAB" . 'copilot-accept-completion)
|
||||
("C-<tab>" . 'copilot-accept-completion)
|
||||
("M-<tab>" . 'copilot-accept-completion-by-word)
|
||||
("C-S-<tab>" . 'copilot-accept-completion-by-line)
|
||||
)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
*** copilot-chat.el
|
||||
|
||||
*** COMMENT Ollama
|
||||
I feel so bad for this.. but its not awful..
|
||||
|
||||
|
@ -1529,6 +1553,7 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
:hook (lsp-mode . lsp-inlay-hints-mode)
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-l")
|
||||
(add-to-list 'completion-at-point-functions #'lsp-completion-at-point)
|
||||
:commands lsp
|
||||
:general-config
|
||||
(leader-def
|
||||
|
@ -1543,6 +1568,9 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
lsp-modeline-diagnostics-enable t
|
||||
lsp-completion-enable-additional-text-edit t
|
||||
|
||||
lsp-completion-provider :capf
|
||||
lsp-enable-snippet t
|
||||
|
||||
lsp-rust-server 'rust-analyzer
|
||||
lsp-rust-analyzer-server-display-inlay-hints t
|
||||
lsp-rust-analyzer-proc-macro-enable t
|
||||
|
@ -2014,6 +2042,15 @@ Use =zls= automatically with lsp, and =zig-mode=:
|
|||
lsp-zig-build-on-save-step "check"))
|
||||
#+end_src
|
||||
|
||||
** Nix
|
||||
Use =nix-mode= to edit nix files:
|
||||
#+begin_src emacs-lisp
|
||||
(use-package nix-mode
|
||||
:ensure t
|
||||
:mode ("\\.nix\\'" "\\.nix.in\\'")
|
||||
)
|
||||
#+end_src
|
||||
|
||||
* User Functions
|
||||
=PascalCase= to =snake_case=:
|
||||
#+begin_src emacs-lisp
|
||||
|
|
Loading…
Reference in a new issue