mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(kotlin): add treesit support
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
;;; lang/kotlin/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! kotlin-mode
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'kotlin-mode-local-vars-hook #'lsp! 'append))
|
||||
(set-docsets! 'kotlin-mode "Kotlin")
|
||||
(set-repl-handler! 'kotlin-mode #'kotlin-repl)
|
||||
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'kotlin-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(map! :map kotlin-mode-map
|
||||
:localleader
|
||||
:prefix ("b" . "build")
|
||||
@ -17,3 +18,15 @@
|
||||
(use-package! flycheck-kotlin
|
||||
:when (modulep! :checkers syntax -flymake)
|
||||
:hook (kotlin-mode . flycheck-kotlin-setup))
|
||||
|
||||
|
||||
(use-package! kotlin-ts-mode
|
||||
:when (modulep! +tree-sitter)
|
||||
:when (fboundp 'treesit-available-p)
|
||||
:defer t
|
||||
:init
|
||||
(set-tree-sitter! 'kotlin-mode 'kotlin-ts-mode
|
||||
'((kotlin :url "https://github.com/fwcd/tree-sitter-kotlin")))
|
||||
:config
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'kotlin-ts-mode-local-vars-hook #'lsp! 'append)))
|
||||
|
Reference in New Issue
Block a user