general config update, small fixes
This commit is contained in:
parent
54a1298000
commit
be949bbc1e
43
init.org
43
init.org
|
|
@ -210,7 +210,8 @@ Add package repositories and rank them by priority
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq-default tab-width 4
|
(setq-default tab-width 4
|
||||||
fill-column 80
|
fill-column 80
|
||||||
indent-tabs-mode nil)
|
indent-tabs-mode nil
|
||||||
|
lexical-binding t)
|
||||||
(setq use-short-answers t)
|
(setq use-short-answers t)
|
||||||
(setq initial-major-mode 'org-mode)
|
(setq initial-major-mode 'org-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -558,6 +559,7 @@ TODO: figure out how to get which-key to correctly display the ‘m‘ label
|
||||||
"i" '("Edit init.org" . nemo/edit-init-org)
|
"i" '("Edit init.org" . nemo/edit-init-org)
|
||||||
"s" '("Save" . save-buffer)
|
"s" '("Save" . save-buffer)
|
||||||
"r" '("Ripgrep" . consult-ripgrep)
|
"r" '("Ripgrep" . consult-ripgrep)
|
||||||
|
"y" '("Yank Current Filename" . nemo/buffer-file-name-to-clipboard)
|
||||||
"R" '("Ripgrep in dir" . nemo/consult-ripgrep-dir))
|
"R" '("Ripgrep in dir" . nemo/consult-ripgrep-dir))
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -952,7 +954,6 @@ Also use =undo-fu=, which evil can use.
|
||||||
|
|
||||||
(global-set-key (kbd "<escape>") 'nemo/abort-minibuffer-if-active)
|
(global-set-key (kbd "<escape>") 'nemo/abort-minibuffer-if-active)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Writing
|
* Writing
|
||||||
** Olivetti
|
** Olivetti
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -984,7 +985,7 @@ Use =ispell= with company mode for completion in text-modes
|
||||||
:straight t
|
:straight t
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(setq ispell-dictionary "en_GB"))
|
(setq ispell-dictionary "/etc/profiles/per-user/user/share/hunspell/en_GB"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** LaTeX
|
** LaTeX
|
||||||
|
|
@ -1638,7 +1639,6 @@ Use =inheritenv= and =envrc= to load ~.envrc~ direnv files:
|
||||||
** Copilot 😭
|
** Copilot 😭
|
||||||
|
|
||||||
*** Copilot.el
|
*** Copilot.el
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(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"))
|
||||||
|
|
@ -1814,7 +1814,7 @@ I feel so bad for this.. but its not awful..
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** COMMENT Yasnippet
|
** Yasnippet
|
||||||
Auto-completion requires yasnippet for some competions, such as function arguments and parens.
|
Auto-completion requires yasnippet for some competions, such as function arguments and parens.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
|
|
@ -1864,6 +1864,10 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
'eglot-server-programs
|
'eglot-server-programs
|
||||||
'(just-mode
|
'(just-mode
|
||||||
"just-lsp"))
|
"just-lsp"))
|
||||||
|
(add-to-list
|
||||||
|
'eglot-server-programs
|
||||||
|
'((kotlin-mode kotlin-ts-mode) .
|
||||||
|
("kotlin-lsp" "--stdio")))
|
||||||
(setq-default eglot-workspace-configuration
|
(setq-default eglot-workspace-configuration
|
||||||
'(:rust-analyzer
|
'(:rust-analyzer
|
||||||
(:cargo (:buildScripts (:enable t)
|
(:cargo (:buildScripts (:enable t)
|
||||||
|
|
@ -1880,6 +1884,14 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
)
|
)
|
||||||
(setq eglot-code-action-indications '(margin mode-line)
|
(setq eglot-code-action-indications '(margin mode-line)
|
||||||
eglot-extend-to-xref t
|
eglot-extend-to-xref t
|
||||||
|
eglot-connect-timeout 60
|
||||||
|
eglot-request-timeout 60
|
||||||
|
eglot-extend-to-xref t
|
||||||
|
eglot-sync-connect 0
|
||||||
|
eglot-report-progress t
|
||||||
|
eglot-autoshutdown t
|
||||||
|
;; eglot-events-buffer-config '(:size 5000 :format short)
|
||||||
|
eglot-max-file-watches 5000
|
||||||
completion-category-overrides '((eglot (styles orderless))
|
completion-category-overrides '((eglot (styles orderless))
|
||||||
(eglot-capf (styles orderless)))
|
(eglot-capf (styles orderless)))
|
||||||
flymake-show-diagnostics-at-end-of-line 'fancy
|
flymake-show-diagnostics-at-end-of-line 'fancy
|
||||||
|
|
@ -1920,10 +1932,10 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
|
|
||||||
(use-package consult-eglot
|
(use-package consult-eglot
|
||||||
:straight t
|
:straight t
|
||||||
:after (consult eglot)
|
:after eglot
|
||||||
:config
|
:config
|
||||||
(general-define-key
|
(general-def
|
||||||
:prefix-map 'nemo/eglot-command-map
|
:keymaps 'nemo/eglot-map
|
||||||
"c s" '("Symbols" . consult-eglot-symbols))
|
"c s" '("Symbols" . consult-eglot-symbols))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -2568,12 +2580,12 @@ Use =nix-mode= to edit nix files:
|
||||||
(add-to-list 'eglot-server-programs '(scheme-mode . ("guile-lsp-server"))))
|
(add-to-list 'eglot-server-programs '(scheme-mode . ("guile-lsp-server"))))
|
||||||
|
|
||||||
(use-package geiser
|
(use-package geiser
|
||||||
:deter t
|
:defer t
|
||||||
:custom
|
:custom
|
||||||
(geiser-active-implementations '(guile)))
|
(geiser-active-implementations '(guile)))
|
||||||
|
|
||||||
(use-package geiser-guile
|
(use-package geiser-guile
|
||||||
:deter t
|
:defer t
|
||||||
:after geiser
|
:after geiser
|
||||||
:custom
|
:custom
|
||||||
(geiser-guile-binary "guile"))
|
(geiser-guile-binary "guile"))
|
||||||
|
|
@ -2645,6 +2657,17 @@ Open the current file with a =sudo= tramp:
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun nemo/buffer-file-name-to-clipboard ()
|
||||||
|
"Copy the current buffer's file name to the user's clipboard"
|
||||||
|
(interactive)
|
||||||
|
(let* ((filename buffer-file-name))
|
||||||
|
(message filename)
|
||||||
|
(if filename
|
||||||
|
(kill-new (file-truename filename))))
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Keybinds
|
* Keybinds
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(define-key custom-bindings-map (kbd "C-c l") 'org-store-link)
|
(define-key custom-bindings-map (kbd "C-c l") 'org-store-link)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue