Fix some bugs and random things

This commit is contained in:
Alexander Rosenberg 2024-12-20 15:16:44 -08:00
parent 5c3c492fd8
commit b148423914
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
3 changed files with 23 additions and 15 deletions

View File

@ -122,12 +122,12 @@ dbus-\\(system\\|user\\) +\\(none\\|filter\\)?\\)" . 2))
(define-derived-mode firejail-profile-mode prog-mode "Firejail-Profile"
"Major mode for editing firejail profiles."
:syntax-table firejail-profile-syntax-table
(add-to-list (make-local-variable 'completion-at-point-functions)
#'firejail-profile-capf)
(setq-local font-lock-defaults '(firejail-profile-font-lock-keywords)
comment-start "#"
comment-end "")
(set-syntax-table firejail-profile-syntax-table))
comment-end ""))
(add-to-list 'auto-mode-alist
'("\\.\\(firejail\\|profile\\|local\\)$" . firejail-profile-mode))

View File

@ -29,10 +29,10 @@
(defvar kdl-ts-mode--syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?= ".")
(modify-syntax-entry ?/ ". 124")
(modify-syntax-entry ?* ". 23b")
(modify-syntax-entry ?\n ">")
(modify-syntax-entry ?= "." table)
(modify-syntax-entry ?/ ". 124" table)
(modify-syntax-entry ?* ". 23b" table)
(modify-syntax-entry ?\n ">" table)
table)
"Syntax table for `kdl-ts-mode'.")

26
init.el
View File

@ -1169,14 +1169,16 @@ With PROJECT, give diagnostics for all buffers in the current project."
"gA" #'eglot-code-actions
"gs" #'consult-eglot-symbols)
(eglot-inlay-hints-mode -1))
(setq eglot-autoshutdown t)
(setq eglot-autoshutdown t
eglot-ignored-server-capabilities '(:documentOnTypeFormattingProvider))
:config
(add-to-list 'eglot-server-programs
(cons '(c-mode c-ts-mode c++-mode c++-ts-mode objc-mode)
'("clangd" "--all-scopes-completion" "--background-index"
"--clang-tidy" "--completion-style=detailed"
"--header-insertion=never" "--pch-storage=memory"
"--function-arg-placeholders"))))
"--function-arg-placeholders"
"--compile-commands-dir=build"))))
;; LTeX (languagetool)
(require 'ltex-eglot)
@ -1522,7 +1524,16 @@ otherwise, call `bibtex-find-text'."
;; java-ts-mode
(use-package java-ts-mode
:hook (java-ts-mode . eglot-ensure))
:hook ((java-ts-mode . eglot-ensure)
(java-ts-mode . my/-setup-java-ts-mode))
:config
(defun my/-setup-java-ts-mode ()
(let ((rules (car treesit-simple-indent-rules)))
(setcdr rules
(cons '((and (parent-is "array_initializer")
(node-is "array_initializer"))
parent-bol java-ts-mode-indent-offset)
(nthcdr 1 rules))))))
;; c-ts-mode
(use-package c-ts-mode
@ -1607,11 +1618,9 @@ otherwise, call `bibtex-find-text'."
;; cmake
(require 'cmake-mode)
(require 'cmake-ts-mode)
(with-eval-after-load 'cmake-mode
(defun my/setup-cmake-ts-mode ()
"Setup `cmake-ts-mode' buffers."
(setq-local indent-line-function #'cmake-indent))
(add-hook 'cmake-ts-mode-hook #'my/setup-cmake-ts-mode))
(setq cmake-ts-mode-indent-offset tab-width))
;; kdl
(require 'kdl-ts-mode)
@ -2416,8 +2425,7 @@ one of the normal rainbow-delimiters-depth-N-face faces."
;; Highlight todos
(use-package hl-todo
:config
(global-hl-todo-mode 1))
:hook (prog-mode . hl-todo-mode))
(use-package magit-todos
:after (hl-todo magit)
:config