Fix some bugs and random things
This commit is contained in:
parent
5c3c492fd8
commit
b148423914
@ -122,12 +122,12 @@ dbus-\\(system\\|user\\) +\\(none\\|filter\\)?\\)" . 2))
|
|||||||
|
|
||||||
(define-derived-mode firejail-profile-mode prog-mode "Firejail-Profile"
|
(define-derived-mode firejail-profile-mode prog-mode "Firejail-Profile"
|
||||||
"Major mode for editing firejail profiles."
|
"Major mode for editing firejail profiles."
|
||||||
|
:syntax-table firejail-profile-syntax-table
|
||||||
(add-to-list (make-local-variable 'completion-at-point-functions)
|
(add-to-list (make-local-variable 'completion-at-point-functions)
|
||||||
#'firejail-profile-capf)
|
#'firejail-profile-capf)
|
||||||
(setq-local font-lock-defaults '(firejail-profile-font-lock-keywords)
|
(setq-local font-lock-defaults '(firejail-profile-font-lock-keywords)
|
||||||
comment-start "#"
|
comment-start "#"
|
||||||
comment-end "")
|
comment-end ""))
|
||||||
(set-syntax-table firejail-profile-syntax-table))
|
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
'("\\.\\(firejail\\|profile\\|local\\)$" . firejail-profile-mode))
|
'("\\.\\(firejail\\|profile\\|local\\)$" . firejail-profile-mode))
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
|
|
||||||
(defvar kdl-ts-mode--syntax-table
|
(defvar kdl-ts-mode--syntax-table
|
||||||
(let ((table (make-syntax-table)))
|
(let ((table (make-syntax-table)))
|
||||||
(modify-syntax-entry ?= ".")
|
(modify-syntax-entry ?= "." table)
|
||||||
(modify-syntax-entry ?/ ". 124")
|
(modify-syntax-entry ?/ ". 124" table)
|
||||||
(modify-syntax-entry ?* ". 23b")
|
(modify-syntax-entry ?* ". 23b" table)
|
||||||
(modify-syntax-entry ?\n ">")
|
(modify-syntax-entry ?\n ">" table)
|
||||||
table)
|
table)
|
||||||
"Syntax table for `kdl-ts-mode'.")
|
"Syntax table for `kdl-ts-mode'.")
|
||||||
|
|
||||||
|
26
init.el
26
init.el
@ -1169,14 +1169,16 @@ With PROJECT, give diagnostics for all buffers in the current project."
|
|||||||
"gA" #'eglot-code-actions
|
"gA" #'eglot-code-actions
|
||||||
"gs" #'consult-eglot-symbols)
|
"gs" #'consult-eglot-symbols)
|
||||||
(eglot-inlay-hints-mode -1))
|
(eglot-inlay-hints-mode -1))
|
||||||
(setq eglot-autoshutdown t)
|
(setq eglot-autoshutdown t
|
||||||
|
eglot-ignored-server-capabilities '(:documentOnTypeFormattingProvider))
|
||||||
:config
|
:config
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
(cons '(c-mode c-ts-mode c++-mode c++-ts-mode objc-mode)
|
(cons '(c-mode c-ts-mode c++-mode c++-ts-mode objc-mode)
|
||||||
'("clangd" "--all-scopes-completion" "--background-index"
|
'("clangd" "--all-scopes-completion" "--background-index"
|
||||||
"--clang-tidy" "--completion-style=detailed"
|
"--clang-tidy" "--completion-style=detailed"
|
||||||
"--header-insertion=never" "--pch-storage=memory"
|
"--header-insertion=never" "--pch-storage=memory"
|
||||||
"--function-arg-placeholders"))))
|
"--function-arg-placeholders"
|
||||||
|
"--compile-commands-dir=build"))))
|
||||||
|
|
||||||
;; LTeX (languagetool)
|
;; LTeX (languagetool)
|
||||||
(require 'ltex-eglot)
|
(require 'ltex-eglot)
|
||||||
@ -1522,7 +1524,16 @@ otherwise, call `bibtex-find-text'."
|
|||||||
|
|
||||||
;; java-ts-mode
|
;; java-ts-mode
|
||||||
(use-package 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
|
;; c-ts-mode
|
||||||
(use-package c-ts-mode
|
(use-package c-ts-mode
|
||||||
@ -1607,11 +1618,9 @@ otherwise, call `bibtex-find-text'."
|
|||||||
|
|
||||||
;; cmake
|
;; cmake
|
||||||
(require 'cmake-mode)
|
(require 'cmake-mode)
|
||||||
|
(require 'cmake-ts-mode)
|
||||||
(with-eval-after-load 'cmake-mode
|
(with-eval-after-load 'cmake-mode
|
||||||
(defun my/setup-cmake-ts-mode ()
|
(setq cmake-ts-mode-indent-offset tab-width))
|
||||||
"Setup `cmake-ts-mode' buffers."
|
|
||||||
(setq-local indent-line-function #'cmake-indent))
|
|
||||||
(add-hook 'cmake-ts-mode-hook #'my/setup-cmake-ts-mode))
|
|
||||||
|
|
||||||
;; kdl
|
;; kdl
|
||||||
(require 'kdl-ts-mode)
|
(require 'kdl-ts-mode)
|
||||||
@ -2416,8 +2425,7 @@ one of the normal rainbow-delimiters-depth-N-face faces."
|
|||||||
|
|
||||||
;; Highlight todos
|
;; Highlight todos
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:config
|
:hook (prog-mode . hl-todo-mode))
|
||||||
(global-hl-todo-mode 1))
|
|
||||||
(use-package magit-todos
|
(use-package magit-todos
|
||||||
:after (hl-todo magit)
|
:after (hl-todo magit)
|
||||||
:config
|
:config
|
||||||
|
Loading…
Reference in New Issue
Block a user