KDE & Emacs
This commit is contained in:
1 parent
edcf5dd381
commit
8d688d1107
50 files changed
+2122
-1267
No files matched your search
@@ -0,0 +1,26 @@
|
||||
(use-package cider
|
||||
:ensure t)
|
||||
|
||||
(add-hook 'cider-repl-mode-hook (lambda () (display-line-numbers-mode -1)))
|
||||
(add-hook 'cider-repl-mode-hook #'smartparens-mode)
|
||||
(add-hook 'clojure-mode #'eglot-ensure t)
|
||||
|
||||
(setq-default cider-eldoc-display-for-symbol-at-point nil)
|
||||
|
||||
(defun mu-cider-disable-eldoc ()
|
||||
"Let LSP handle ElDoc instead of CIDER."
|
||||
(remove-hook 'eldoc-documentation-functions #'cider-eldoc t))
|
||||
|
||||
(add-hook 'cider-mode-hook #'mu-cider-disable-eldoc)
|
||||
|
||||
(defun mu-cider-disable-eldoc ()
|
||||
"Let LSP handle ElDoc instead of CIDER."
|
||||
(remove-hook 'eldoc-documentation-functions #'cider-eldoc t))
|
||||
|
||||
(add-hook 'cider-mode-hook #'mu-cider-disable-eldoc)
|
||||
|
||||
(defun mu-cider-disable-completion ()
|
||||
"Let LSP handle completion instead of CIDER."
|
||||
(remove-hook 'completion-at-point-functions #'cider-complete-at-point t))
|
||||
|
||||
(add-hook 'cider-mode-hook #'mu-cider-disable-completion)
|
||||
@@ -0,0 +1,38 @@
|
||||
;; Emacs Configuration for Java
|
||||
|
||||
; JDT URI fix for JDTLS from https://www.reddit.com/r/emacs/comments/1ibkh2h/comment/m9slw00/
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((java-mode java-ts-mode) .
|
||||
("jdtls"
|
||||
:initializationOptions
|
||||
(:extendedClientCapabilities (:classFileContentsSupport t))))))
|
||||
|
||||
(defun jdt-file-name-handler (operation &rest args)
|
||||
"Support Eclipse jdtls `jdt://' uri scheme."
|
||||
(let* ((uri (car args))
|
||||
(cache-dir "/tmp/.eglot")
|
||||
(source-file
|
||||
(expand-file-name
|
||||
(file-name-concat
|
||||
cache-dir
|
||||
(save-match-data
|
||||
(when (string-match "jdt://contents/\\(.*?\\)/\\(.*\\)\.class\\?" uri)
|
||||
(format "%s.java" (replace-regexp-in-string "/" "." (match-string 2 uri) t t))))))))
|
||||
(unless (file-readable-p source-file)
|
||||
(let ((content (jsonrpc-request (eglot-current-server) :java/classFileContents (list :uri uri)))
|
||||
(metadata-file (format "%s.%s.metadata"
|
||||
(file-name-directory source-file)
|
||||
(file-name-base source-file))))
|
||||
(unless (file-directory-p cache-dir) (make-directory cache-dir t))
|
||||
(with-temp-file source-file (insert content))
|
||||
(with-temp-file metadata-file (insert uri))))
|
||||
source-file))
|
||||
(add-to-list 'file-name-handler-alist '("\\`jdt://" . jdt-file-name-handler))
|
||||
|
||||
(add-hook 'java-mode-hook #'eglot-ensure t)
|
||||
|
||||
(load-file
|
||||
(expand-file-name
|
||||
"pkg/consult-jdt.el"
|
||||
user-emacs-directory))
|
||||
@@ -0,0 +1,9 @@
|
||||
(use-package sly
|
||||
:ensure t
|
||||
:config
|
||||
(setq inferior-lisp-program "ros -L sbcl -Q run"
|
||||
browse-url-browser-function '(("hyperspec" . eww-browse-url) ("." . browse-url-default-browser)))
|
||||
(add-hook 'sly-mrepl-mode-hook 'smartparens-mode)
|
||||
(add-hook 'lisp-mode-hook
|
||||
(lambda ()
|
||||
(define-key lisp-mode-map (kbd "C-c d") 'sly-documentation))))
|
||||
@@ -0,0 +1,11 @@
|
||||
;; Emacs Configuration for Lua
|
||||
|
||||
(use-package lua-mode
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'lua-mode-hook #'eglot-ensure t)
|
||||
(setq lua-indent-level 2
|
||||
lua-documentation-url "https://www.lua.org/manual/5.4/manual.html"))
|
||||
|
||||
; TODO Try fix this only for lua-mode as that is where the bug is
|
||||
(setq eglot-ignored-server-capabilities '(:documentOnTypeFormattingProvider))
|
||||
Reference in new issue
Block a user