general config update, small fixes
This commit is contained in:
parent
54a1298000
commit
be949bbc1e
89
init.org
89
init.org
|
|
@ -210,7 +210,8 @@ Add package repositories and rank them by priority
|
|||
#+begin_src emacs-lisp
|
||||
(setq-default tab-width 4
|
||||
fill-column 80
|
||||
indent-tabs-mode nil)
|
||||
indent-tabs-mode nil
|
||||
lexical-binding t)
|
||||
(setq use-short-answers t)
|
||||
(setq initial-major-mode 'org-mode)
|
||||
#+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)
|
||||
"s" '("Save" . save-buffer)
|
||||
"r" '("Ripgrep" . consult-ripgrep)
|
||||
"y" '("Yank Current Filename" . nemo/buffer-file-name-to-clipboard)
|
||||
"R" '("Ripgrep in dir" . nemo/consult-ripgrep-dir))
|
||||
)
|
||||
#+end_src
|
||||
|
|
@ -952,7 +954,6 @@ Also use =undo-fu=, which evil can use.
|
|||
|
||||
(global-set-key (kbd "<escape>") 'nemo/abort-minibuffer-if-active)
|
||||
#+end_src
|
||||
|
||||
* Writing
|
||||
** Olivetti
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -984,7 +985,7 @@ Use =ispell= with company mode for completion in text-modes
|
|||
:straight t
|
||||
:defer t
|
||||
:config
|
||||
(setq ispell-dictionary "en_GB"))
|
||||
(setq ispell-dictionary "/etc/profiles/per-user/user/share/hunspell/en_GB"))
|
||||
#+end_src
|
||||
|
||||
** LaTeX
|
||||
|
|
@ -1638,7 +1639,6 @@ Use =inheritenv= and =envrc= to load ~.envrc~ direnv files:
|
|||
** Copilot 😭
|
||||
|
||||
*** Copilot.el
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package copilot
|
||||
: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
|
||||
|
||||
** COMMENT Yasnippet
|
||||
** Yasnippet
|
||||
Auto-completion requires yasnippet for some competions, such as function arguments and parens.
|
||||
#+begin_src emacs-lisp
|
||||
(use-package yasnippet
|
||||
|
|
@ -1864,22 +1864,34 @@ Use =eglot= as an alternative to =lsp-mode=:
|
|||
'eglot-server-programs
|
||||
'(just-mode
|
||||
"just-lsp"))
|
||||
(add-to-list
|
||||
'eglot-server-programs
|
||||
'((kotlin-mode kotlin-ts-mode) .
|
||||
("kotlin-lsp" "--stdio")))
|
||||
(setq-default eglot-workspace-configuration
|
||||
'(:rust-analyzer
|
||||
(:cargo (:buildScripts (:enable t)
|
||||
:allFeatures t
|
||||
:features "all"
|
||||
:extraEnv (:RUSTFLAGS "-Clinker=clang -Clink-arg=-fuse-ld=mold"))
|
||||
:check (:command "clippy")
|
||||
:completion (:autoimport (:enable t))
|
||||
:inlayHints (
|
||||
;; :maxLength 20
|
||||
:bindingModeHints (:enable t)
|
||||
:closureReturnTypeHints (:enable t))
|
||||
:procMacro (:enable t)))
|
||||
:check (:command "clippy")
|
||||
:completion (:autoimport (:enable t))
|
||||
:inlayHints (
|
||||
;; :maxLength 20
|
||||
:bindingModeHints (:enable t)
|
||||
:closureReturnTypeHints (:enable t))
|
||||
:procMacro (:enable t)))
|
||||
)
|
||||
(setq eglot-code-action-indications '(margin mode-line)
|
||||
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))
|
||||
(eglot-capf (styles orderless)))
|
||||
flymake-show-diagnostics-at-end-of-line 'fancy
|
||||
|
|
@ -1889,21 +1901,21 @@ Use =eglot= as an alternative to =lsp-mode=:
|
|||
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
|
||||
:general-config
|
||||
(general-def
|
||||
:keymaps 'nemo/eglot-map
|
||||
"r r" '("Rename" . eglot-rename)
|
||||
"a a" '("Code Action" . eglot-code-action-quickfix)
|
||||
"a A" '("Code Action (all)" . eglot-code-actions)
|
||||
"g d" '("Go to Definition" . xref-find-definitions)
|
||||
"g r" '("Go to References" . xref-find-references)
|
||||
"g g" '("Go to Declaration" . eglot-find-declaration)
|
||||
"g i" '("Go to Implementation" . eglot-find-implementation)
|
||||
"g t" '("Go to Type Definition" . eglot-find-typeDefinition)
|
||||
"h h" '("Help" . eldoc-box-help-at-point)
|
||||
"w r" '("Restart Server" . eglot-reconnect)
|
||||
"w q" '("Shutdown Server" . eglot-shutdown)
|
||||
"= =" '("Format Buffer" . eglot-format-buffer)
|
||||
"= r" '("Format Region" . eglot-format-region)
|
||||
)
|
||||
:keymaps 'nemo/eglot-map
|
||||
"r r" '("Rename" . eglot-rename)
|
||||
"a a" '("Code Action" . eglot-code-action-quickfix)
|
||||
"a A" '("Code Action (all)" . eglot-code-actions)
|
||||
"g d" '("Go to Definition" . xref-find-definitions)
|
||||
"g r" '("Go to References" . xref-find-references)
|
||||
"g g" '("Go to Declaration" . eglot-find-declaration)
|
||||
"g i" '("Go to Implementation" . eglot-find-implementation)
|
||||
"g t" '("Go to Type Definition" . eglot-find-typeDefinition)
|
||||
"h h" '("Help" . eldoc-box-help-at-point)
|
||||
"w r" '("Restart Server" . eglot-reconnect)
|
||||
"w q" '("Shutdown Server" . eglot-shutdown)
|
||||
"= =" '("Format Buffer" . eglot-format-buffer)
|
||||
"= r" '("Format Region" . eglot-format-region)
|
||||
)
|
||||
(leader-major-def
|
||||
:keymaps 'eglot-mode-map
|
||||
"l" '("Eglot" . nemo/eglot-map)
|
||||
|
|
@ -1920,11 +1932,11 @@ Use =eglot= as an alternative to =lsp-mode=:
|
|||
|
||||
(use-package consult-eglot
|
||||
:straight t
|
||||
:after (consult eglot)
|
||||
:after eglot
|
||||
:config
|
||||
(general-define-key
|
||||
:prefix-map 'nemo/eglot-command-map
|
||||
"c s" '("Symbols" . consult-eglot-symbols))
|
||||
(general-def
|
||||
:keymaps 'nemo/eglot-map
|
||||
"c s" '("Symbols" . consult-eglot-symbols))
|
||||
)
|
||||
|
||||
(use-package breadcrumb
|
||||
|
|
@ -2568,12 +2580,12 @@ Use =nix-mode= to edit nix files:
|
|||
(add-to-list 'eglot-server-programs '(scheme-mode . ("guile-lsp-server"))))
|
||||
|
||||
(use-package geiser
|
||||
:deter t
|
||||
:defer t
|
||||
:custom
|
||||
(geiser-active-implementations '(guile)))
|
||||
|
||||
(use-package geiser-guile
|
||||
:deter t
|
||||
:defer t
|
||||
:after geiser
|
||||
:custom
|
||||
(geiser-guile-binary "guile"))
|
||||
|
|
@ -2645,6 +2657,17 @@ Open the current file with a =sudo= tramp:
|
|||
)
|
||||
#+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
|
||||
#+begin_src emacs-lisp
|
||||
(define-key custom-bindings-map (kbd "C-c l") 'org-store-link)
|
||||
|
|
|
|||
Loading…
Reference in a new issue