Use TS mode for Kotlin
Some checks failed
/ Test config on 20 (push) Failing after 49s

This commit is contained in:
Maciej 2024-11-24 15:30:05 +02:00
parent 34a2741886
commit d1ee6a12ed
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
7 changed files with 203 additions and 195 deletions

File diff suppressed because it is too large Load diff

View file

@ -54,6 +54,7 @@
(setopt gcmh-verbose nil) ;; Do not log GC messages (setopt gcmh-verbose nil) ;; Do not log GC messages
(setopt gcmh-idle-delay 'auto) ;; Compute GC delay based on gcmh-auto-idle-delay-factor (setopt gcmh-idle-delay 'auto) ;; Compute GC delay based on gcmh-auto-idle-delay-factor
(setopt gcmh-auto-idle-delay-factor 10) ;; Original value was 10 (setopt gcmh-auto-idle-delay-factor 10) ;; Original value was 10
(setopt gcmh-high-cons-threshold (* 128 1024 1024))
(gcmh-mode t)) (gcmh-mode t))
;; #====================== Backup config #============================== ;; #====================== Backup config #==============================

View file

@ -17,6 +17,8 @@
(setenv "LSP_USE_PLISTS" "true") (setenv "LSP_USE_PLISTS" "true")
(use-package lsp-mode :ensure t) (use-package lsp-mode :ensure t)
;; Finally, wait for installation of these four packages.
(declare-function elpaca-wait "elpaca")
(elpaca-wait) (elpaca-wait)
(provide 'icejam-blocking) (provide 'icejam-blocking)

View file

@ -2,7 +2,8 @@
;;; Commentary: ;;; Commentary:
;;; ;;;
;;; completing-read is the way of completing things in minibuffer. This module ;;; completing-read is the way of completing things in minibuffer. This module
;;; provides all of that functionality, everything related to minbuffer being helpful. ;;; provides all of that functionality, everything related to minbuffer being
;;; helpful.
;;; ;;;
;;; Code: ;;; Code:
@ -38,6 +39,10 @@
(setopt vertico-resize t) ;; Grow and shrink the vertico minibufffer (setopt vertico-resize t) ;; Grow and shrink the vertico minibufffer
(setopt vertico-cycle t) ;; Cycle completion (setopt vertico-cycle t) ;; Cycle completion
;; Add working page up /down
(keymap-set vertico-map "<next>" 'vertico-scroll-up)
(keymap-set vertico-map "<prior>" 'vertico-scroll-down)
(declare-function vertico-mode "vertico") (declare-function vertico-mode "vertico")
(vertico-mode t)) (vertico-mode t))
@ -62,7 +67,7 @@
--search-zip --hidden --glob \"!.git/*\"") --search-zip --hidden --glob \"!.git/*\"")
:bind (:map icejam-keys-mode-map :bind (:map icejam-keys-mode-map
("C-c t" . find-file) ("C-c t" . find-file)
("M-g" . consult-goto-line) ("M-g g" . consult-goto-line)
("C-c a" . consult-ripgrep))) ("C-c a" . consult-ripgrep)))
(use-package helpful :ensure t) (use-package helpful :ensure t)

View file

@ -18,20 +18,20 @@
;; (defconst icejam-font "Input Mono Condensed" ;; (defconst icejam-font "Input Mono Condensed"
;; (defconst icejam-font "SF Mono" ;; (defconst icejam-font "SF Mono"
;; (defconst icejam-font "Monaco" ;; (defconst icejam-font "Monaco"
;; (defconst icejam-font "JetBrains Mono" ;; (defconst icejam-font "JetBrains Mono" "Default font.")
;; (defconst icejam-font "JuliaMono" ;; (defconst icejam-font "JuliaMono"
;; (defconst icejam-font "Rec Mono Semicasual" ;; (defconst icejam-font "Rec Mono Semicasual"
;; (defconst icejam-font "Victor Mono"
;; (defconst icejam-font "IBM Plex Mono" ;; (defconst icejam-font "IBM Plex Mono"
;; (defconst icejam-font "Berkeley Mono Trial" ;; (defconst icejam-font "Berkeley Mono Trial"
;; (defconst icejam-font "Inconsolata" ;; (defconst icejam-font "Inconsolata"
;; (defconst icejam-font "Victor Mono Medium" "Default font.")
(defconst icejam-font "Iosevka Term" "Default font.")
(defconst icejam-font "Iosevka Term"
"Default font.")
(defconst icejam-font-size 14 (defconst icejam-font-size 14
"Default size of then font. "Default size of then font.
It is used to calculated the size in relation to the screen It is used to calculated the size in relation to the screen
in icejam-set-font-to-screen.") in `icejam-set-font-to-screen`.")
(defcustom icejam-mut-font (defcustom icejam-mut-font
icejam-font icejam-font
@ -49,7 +49,7 @@ in icejam-set-font-to-screen.")
(defvar lsp-ui-doc-frame-hook) (defvar lsp-ui-doc-frame-hook)
(defun icejam-set-lsp-ui-font-hook () (defun icejam-set-lsp-ui-font-hook ()
"Reset LSP IO font to specified icejam-font and icejam-font-size." "Reset LSP IO font to specified `icejam-font` and `icejam-font-size`."
(setopt lsp-ui-doc-frame-hook nil) (setopt lsp-ui-doc-frame-hook nil)
(add-hook 'lsp-ui-doc-frame-hook (add-hook 'lsp-ui-doc-frame-hook
(lambda (frame _w) (lambda (frame _w)

View file

@ -39,7 +39,7 @@
(icejam-set-indent 2) (icejam-set-indent 2)
(column-enforce-n 98) (column-enforce-n 98)
(lsp) (lsp)
(setq-local flycheck-check-syntax-automatically '(save mode-enabled)) ;; (setq-local flycheck-check-syntax-automatically '(save mode-enabled))
(setq-local lsp-eldoc-enable-hover nil) (setq-local lsp-eldoc-enable-hover nil)
(setq-local lsp-completion-enable-additional-text-edit nil) (setq-local lsp-completion-enable-additional-text-edit nil)
(setq-local company-minimum-prefix-length 3) (setq-local company-minimum-prefix-length 3)

View file

@ -9,10 +9,14 @@
;; kotlin does a thing. ;; kotlin does a thing.
;;; Code: ;;; Code:
(require 'icejam-prog-mode)
(require 'icejam-blocking)
(use-package kotlin-mode (use-package kotlin-ts-mode :ensure t)
:defer t
:ensure t) (with-eval-after-load 'kotlin-ts-mode
(add-to-list 'auto-mode-alist '("\\.kt\\'" . kotlin-ts-mode))
(add-to-list 'auto-mode-alist '("\\.kts\\'" . kotlin-ts-mode)))
(use-package gradle-mode (use-package gradle-mode
:defer t :defer t
@ -20,15 +24,11 @@
(defun icejam-activate-kotlin-mode () (defun icejam-activate-kotlin-mode ()
"All things Kotlin." "All things Kotlin."
(icejam-set-indent 4) (icejam-set-indent 2)
(column-enforce-n 100) (column-enforce-n 100)
(lsp) (lsp))
;; Company list override (add-hook 'kotlin-ts-mode-hook 'icejam-activate-kotlin-mode)
(add-to-list (make-local-variable 'company-backends)
'(company-capf company-yasnippet)))
(add-hook 'kotlin-mode-hook 'icejam-activate-kotlin-mode)
(provide 'icejam-lang-kotlin) (provide 'icejam-lang-kotlin)
;;; icejam-lang-kotlin.el ends here ;;; icejam-lang-kotlin.el ends here