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)
|
(general-def '(emacs normal) 'with-editor-mode-map ",," 'with-editor-finish)
|
||||||
(leader-def
|
(leader-def
|
||||||
"<TAB>" #'nemo/switch-to-last-buffer
|
"<TAB>" #'nemo/switch-to-last-buffer
|
||||||
|
"<SPC>" #'completion-at-point
|
||||||
"d" #'duplicate-line
|
"d" #'duplicate-line
|
||||||
"gb" #'xref-go-back
|
"gb" #'xref-go-back
|
||||||
"gf" #'xref-go-forward
|
"gf" #'xref-go-forward
|
||||||
|
@ -1182,6 +1183,12 @@ Use =consult-xref= for =lsp-xref= and =xref-find-references=.
|
||||||
(setq
|
(setq
|
||||||
company-minimum-prefix-length 1
|
company-minimum-prefix-length 1
|
||||||
company-idle-delay 0.0))
|
company-idle-delay 0.0))
|
||||||
|
|
||||||
|
(use-package company-box
|
||||||
|
:straight t
|
||||||
|
:after company
|
||||||
|
:hook (company-mode . company-box-mode)
|
||||||
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Corfu - Auto-Completion
|
** Corfu - Auto-Completion
|
||||||
|
@ -1202,8 +1209,10 @@ Auto-completion using =corfu=:
|
||||||
;; Short delay
|
;; Short delay
|
||||||
(corfu-popupinfo-delay 0.5)
|
(corfu-popupinfo-delay 0.5)
|
||||||
;; Preselect the first suggestion
|
;; Preselect the first suggestion
|
||||||
(corfu-preselect 'first)
|
(corfu-preselect nil)
|
||||||
(corfu-on-exact-match nil)
|
(corfu-on-exact-match nil)
|
||||||
|
;; Don't automatically fill in the selected candidate
|
||||||
|
(corfu-preview-current nil)
|
||||||
:custom
|
:custom
|
||||||
(lsp-completion-provider :none)
|
(lsp-completion-provider :none)
|
||||||
:init
|
:init
|
||||||
|
@ -1247,6 +1256,16 @@ Auto-completion using =corfu=:
|
||||||
;; )
|
;; )
|
||||||
#+end_src
|
#+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
|
*** kind-icon
|
||||||
Use =kind-icon= to decorate corfu completion candidates:
|
Use =kind-icon= to decorate corfu completion candidates:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -1282,6 +1301,7 @@ This package seems to slow down search quite a bit in common buffers like =find-
|
||||||
:init
|
:init
|
||||||
;; Add `completion-at-point-functions', used by `completion-at-point'.
|
;; Add `completion-at-point-functions', used by `completion-at-point'.
|
||||||
;; NOTE: The order matters!
|
;; 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-dabbrev)
|
||||||
;; (add-to-list 'completion-at-point-functions #'cape-file)
|
;; (add-to-list 'completion-at-point-functions #'cape-file)
|
||||||
;; (add-to-list 'completion-at-point-functions #'cape-elisp-block)
|
;; (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
|
(use-package copilot
|
||||||
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))
|
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook ((prog-mode) . copilot-mode)
|
:hook ((prog-mode markdown-mode conf-toml-mode) . copilot-mode)
|
||||||
:bind (
|
:bind (
|
||||||
("TAB" . 'copilot-accept-completion)
|
("TAB" . 'copilot-accept-completion)
|
||||||
("C-<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
|
#+end_src
|
||||||
|
|
||||||
|
*** copilot-chat.el
|
||||||
|
|
||||||
*** COMMENT Ollama
|
*** COMMENT Ollama
|
||||||
I feel so bad for this.. but its not awful..
|
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)
|
:hook (lsp-mode . lsp-inlay-hints-mode)
|
||||||
:init
|
:init
|
||||||
(setq lsp-keymap-prefix "C-l")
|
(setq lsp-keymap-prefix "C-l")
|
||||||
|
(add-to-list 'completion-at-point-functions #'lsp-completion-at-point)
|
||||||
:commands lsp
|
:commands lsp
|
||||||
:general-config
|
:general-config
|
||||||
(leader-def
|
(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-modeline-diagnostics-enable t
|
||||||
lsp-completion-enable-additional-text-edit t
|
lsp-completion-enable-additional-text-edit t
|
||||||
|
|
||||||
|
lsp-completion-provider :capf
|
||||||
|
lsp-enable-snippet t
|
||||||
|
|
||||||
lsp-rust-server 'rust-analyzer
|
lsp-rust-server 'rust-analyzer
|
||||||
lsp-rust-analyzer-server-display-inlay-hints t
|
lsp-rust-analyzer-server-display-inlay-hints t
|
||||||
lsp-rust-analyzer-proc-macro-enable 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"))
|
lsp-zig-build-on-save-step "check"))
|
||||||
#+end_src
|
#+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
|
* User Functions
|
||||||
=PascalCase= to =snake_case=:
|
=PascalCase= to =snake_case=:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
Loading…
Reference in a new issue