eglot integration cleaned up a bit, fixed bug with option group
This commit is contained in:
parent
8e298e0b31
commit
5d034ac3fb
@ -53,6 +53,7 @@ advantage of the configuration interface.
|
||||
3. [[https://github.com/roman/golden-ratio.el][golden-ratio.el]] - Window size management for split buffers. Quite handy.
|
||||
4. [[https://github.com/emacs-dashboard/emacs-dashboard][emacs-dashboard]] - A nice handy startup screen, filled with fun facts and stuff.
|
||||
5. [[https://github.com/joaotavora/yasnippet][yasnippet]] - A handy snippet/macro system for commonly used bits.
|
||||
6. [[https://github.com/joaotavora/eglot][eglot]] - Emacs Polyglot LSP library (seems like everything uses this).
|
||||
|
||||
*** Optional packages
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
;;
|
||||
|
||||
;; define the group
|
||||
(defgroup thwap-config-group nil
|
||||
(defgroup thwap-config nil
|
||||
"T.H.W.A.P. Emacs configuration group."
|
||||
:group 'convenience
|
||||
:prefix "thwap-")
|
||||
@ -17,49 +17,49 @@
|
||||
(defcustom thwap-ui-enable-modus-themes nil
|
||||
"Whether or not to install the modus themes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; doom themes toggle
|
||||
(defcustom thwap-ui-enable-doom-themes nil
|
||||
"Whether or not to install the doom themes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; sublime themes toggle
|
||||
(defcustom thwap-ui-enable-sublime-themes nil
|
||||
"Whether or not to install the sublime themes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; kaolin themes toggle
|
||||
(defcustom thwap-ui-enable-kaolin-themes nil
|
||||
"Whether or not to install the kaolin themes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; alect themes toggle
|
||||
(defcustom thwap-ui-enable-alect-themes nil
|
||||
"Whether or not to install the alect themes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; theme to load
|
||||
(defcustom thwap-ui-theme 'wombat ;; 'modus-vivendi-tinted
|
||||
"Name of the theme to load."
|
||||
:type 'string
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; all-the-icons toggle
|
||||
(defcustom thwap-ui-enable-all-the-icons nil
|
||||
"Whether or not to enable all-the-icons."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; nerd-icons toggle
|
||||
(defcustom thwap-ui-enable-nerd-icons nil
|
||||
"Whether or not to enable nerd-icons."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
|
||||
;;
|
||||
@ -70,13 +70,13 @@
|
||||
(defcustom thwap-fm-enable-treemacs nil
|
||||
"Whether or not to enable treemacs."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; neotree toggle
|
||||
(defcustom thwap-fm-enable-neotree nil
|
||||
"Whether or not to enable neotree."
|
||||
:type 'boolean'
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
|
||||
;;
|
||||
@ -87,13 +87,13 @@
|
||||
(defcustom thwap-comp-enable-company nil
|
||||
"Whether or not to enable company."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; auto-complete toggle
|
||||
(defcustom thwap-comp-enable-auto-complete nil
|
||||
"Whether or not to enable auto-complete."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
|
||||
;;
|
||||
@ -104,49 +104,55 @@
|
||||
(defcustom thwap-dev-enable-lsp nil
|
||||
"Whether or not to enable lsp."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; projectile toggle
|
||||
(defcustom thwap-dev-enable-projectile nil
|
||||
"Whether or not to enable projectile."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; magit toggle
|
||||
(defcustom thwap-dev-enable-magit nil
|
||||
"Whether or not to enable magit."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Copilot toggle
|
||||
(defcustom thwap-dev-enable-copilot nil
|
||||
"Whether or not to enable copilot."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Eglot toggle
|
||||
(defcustom thwap-dev-enable-eglot t
|
||||
"Whether or not to setup Eglot."
|
||||
:type 'boolean
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Go toggle
|
||||
(defcustom thwap-dev-enable-go nil
|
||||
"Whether or not to setup Go development modes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Python toggle
|
||||
(defcustom thwap-dev-enable-python nil
|
||||
"Whether or not to setup Python development modes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Terraform toggle
|
||||
(defcustom thwap-dev-enable-terraform nil
|
||||
"Whether or not to setup Terraform development modes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;; Yaml toggle
|
||||
(defcustom thwap-dev-enable-yaml nil
|
||||
"Whether or not to setup Yaml modes."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
;;
|
||||
;; Org mode settings
|
||||
@ -154,73 +160,62 @@
|
||||
(defcustom thwap-org-enable-org nil
|
||||
"Whether or not to enable org-mode."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-bullets nil
|
||||
"Whether or not to enable org-bullets."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-super-agenda nil
|
||||
"Whether or not to enable org-super-agenda."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-modern nil
|
||||
"Whether or not to enable org-modern."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-timeblock nil
|
||||
"Whether or not to enable org-timeblock."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-download nil
|
||||
"Whether or not to enable org-download."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-roam nil
|
||||
"Whether or not to enable org-roam."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-roam-ui nil
|
||||
"Whether or not to enable org-roam-ui."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-ob-mermaid nil
|
||||
"Whether or not to enable ob-mermaid."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-transclusion nil
|
||||
"Whether or not to enable org-transclusion."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-enable-org-ai nil
|
||||
"Whether or not to enable org-ai."
|
||||
:type 'boolean
|
||||
:group 'thwap-config-group)
|
||||
:group 'thwap-config)
|
||||
|
||||
(defcustom thwap-org-openai-api-token nil
|
||||
"OpenAI API Token for use in org-ai."
|
||||
:type 'string
|
||||
:group 'thwap-config-group)
|
||||
|
||||
;;
|
||||
;; Example usage
|
||||
;;
|
||||
|
||||
;; Example usage
|
||||
(defun my-custom-function ()
|
||||
"Function that uses the custom variables."
|
||||
(message "Custom variable 1: %s" thwap-config-enable-modus-themes)
|
||||
(message "Custom variable 2: %s" thwap-config-theme)
|
||||
(message "Custom variable 3: %s" thwap-config-enable-alltheicons))
|
||||
:group 'thwap-config)
|
||||
|
||||
|
||||
;; our provide statement
|
||||
|
@ -42,7 +42,7 @@
|
||||
;; Add a command to customize the T.H.W.A.P. group
|
||||
(thwap/add-key-binding
|
||||
"C-c"
|
||||
(lambda () (interactive) (customize-group 'thwap-config-group))
|
||||
(lambda () (interactive) (customize-group 'thwap-config))
|
||||
"Customize this T.H.W.A.P. Emacs Installation")
|
||||
|
||||
;; quick commenting/uncommenting of a region is just too useful
|
||||
|
5
lib/thwap-eglot.el
Normal file
5
lib/thwap-eglot.el
Normal file
@ -0,0 +1,5 @@
|
||||
(when (or thwap -dev-enable-eglot thwap-dev-enable-lsp)
|
||||
(straight-use-package 'eglot)
|
||||
(require 'eglot))
|
||||
|
||||
(provide 'thwap-eglot)
|
@ -1,7 +1,6 @@
|
||||
|
||||
(when thwap-dev-enable-go
|
||||
(straight-use-package 'go-mode)
|
||||
(straight-use-package 'eglot)
|
||||
(setq lsp-go-analyses '((shadow . t)
|
||||
(simplifycompositelit . :json-false)))
|
||||
(when (executable-find "gopls")
|
||||
|
@ -6,13 +6,12 @@
|
||||
(custom-set-variables
|
||||
'(terraform-indent-level 2)
|
||||
'(terraform-format-on-save t))
|
||||
(when (executable-find "terraform-ls")
|
||||
(add-hook 'terraform-mode-hook 'eglot-ensure))
|
||||
:config
|
||||
(straight-use-package 'eglot)
|
||||
(require 'eglot)
|
||||
(add-to-list 'eglot-server-programs
|
||||
`(terraform-mode . ("terraform-ls" "serve"))))
|
||||
(add-hook 'terraform-mode-hook #'lsp-deferred))
|
||||
(when thwap-dev-enable-lsp
|
||||
(when (executable-find "terraform-ls")
|
||||
(add-hook 'terraform-mode-hook 'eglot-ensure))
|
||||
(add-hook 'terraform-mode-hook #'lsp-deferred)))
|
||||
|
||||
(provide 'thwap-tf)
|
||||
|
Loading…
Reference in New Issue
Block a user