summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-12-17 10:46:19 -0500
committermattkae <mattkae@protonmail.com>2022-12-17 10:46:19 -0500
commit18cccf8ce0b0ac454b74f6ce81219a42117aa447 (patch)
treedbb58d704c8499d639a2a39578dd0876370efe4b
parent1ef51c8468872b70eea8335a8166b64711c9fe98 (diff)
Improved CSS mode, removed the dashboard (it was useless), and added go mode
-rw-r--r--README.md6
-rw-r--r--examples/test.css9
-rw-r--r--init.el25
-rw-r--r--lisp/general.el3
-rw-r--r--lisp/go.el10
-rw-r--r--lisp/web.el9
6 files changed, 46 insertions, 16 deletions
diff --git a/README.md b/README.md
index 52d1caa..1fe6f06 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,12 @@ Must have installed the Typescript language server: https://github.com/typescrip
sudo pip install python-lsp-server
```
+### Go
+Make sure you have installed `gopls`! On arch, this is:
+```sh
+sudo pacman -S gopls
+```
+
### Text
`hunspell` is used to provide spell check on `.txt` files. Make sure to have install the hunspell package for your language. In my instance, I had to do:
```sh
diff --git a/examples/test.css b/examples/test.css
new file mode 100644
index 0000000..ab7e74b
--- /dev/null
+++ b/examples/test.css
@@ -0,0 +1,9 @@
+
+.f123 {
+ font-family: "Helvetica";
+}
+
+.f123 {
+ display: flex;
+ flex-basis: row;
+}
diff --git a/init.el b/init.el
index 5c7edd6..7f4ceca 100644
--- a/init.el
+++ b/init.el
@@ -11,19 +11,19 @@
;; https://stackoverflow.com/questions/31079204/emacs-package-install-script-in-init-file
(package-initialize)
-(use-package dashboard
- :ensure t
- :config
- (dashboard-setup-startup-hook)
- (setq dashboard-projects-backend 'projectile)
- (setq dashboard-items '((recents . 5)
- (bookmarks . 5)
- (projects . 5)
- (agenda . 5)
- (registers . 5))))
+;; (use-package dashboard
+;; :ensure t
+;; :config
+;; (dashboard-setup-startup-hook)
+;; (setq dashboard-projects-backend 'projectile)
+;; (setq dashboard-items '((recents . 5)
+;; (bookmarks . 5)
+;; (projects . 5)
+;; (agenda . 5)
+;; (registers . 5))))
(setq package-list
- '(highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))
+ '(go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org))
;; Fetch the list of packages available
(unless package-archive-contents
@@ -52,6 +52,7 @@
(require 'general)
(require 'cpp)
+(require 'go)
(require 'text)
(require 'org-custom)
(require 'web)
@@ -75,7 +76,7 @@
'(org-agenda-files (list org-directory))
'(org-directory "~/Documents/org")
'(package-selected-packages
- '(dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
+ '(go-mode css-eldoc dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
;;; init.el ends here
(custom-set-faces
diff --git a/lisp/general.el b/lisp/general.el
index 901e132..9516133 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -256,7 +256,7 @@
company-show-quick-access t
company-tooltip-limit 20
company-dabbrev-downcase nil
- company-backends '((company-capf company-gtags company-elisp)) ; TODO: do i need company-irony here
+ company-backends '((company-capf company-gtags company-elisp company-css)) ; TODO: do i need company-irony here
company-vscode-light-icons-margin 1
)
)
@@ -284,6 +284,7 @@
:defer t)
(add-hook 'emacs-lisp-mode-hook #'eldoc-box-hover-at-point-mode t)
+(add-hook 'css-mode-hook #'eldoc-box-hover-at-point-mode t)
(add-hook 'eglot-managed-mode-hook #'eldoc-box-hover-at-point-mode t)
(use-package tree-sitter
diff --git a/lisp/go.el b/lisp/go.el
new file mode 100644
index 0000000..2adb035
--- /dev/null
+++ b/lisp/go.el
@@ -0,0 +1,10 @@
+
+;;; Code:
+(require 'eglot)
+
+(use-package go-mode
+ :config
+ (add-hook 'go-mode-hook 'eglot-ensure))
+
+(provide 'go)
+;;; go.el ends here.
diff --git a/lisp/web.el b/lisp/web.el
index e71673d..d05fa34 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -10,7 +10,6 @@
)
(use-package web-mode
- :mode ("\\.html\\'" . web-mode)
:config (setq
web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2
@@ -20,8 +19,6 @@
)
(my-web-mode-colors)
)
-(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
-(add-to-list 'auto-mode-alist '("\\.css\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
@@ -93,5 +90,11 @@
(add-to-list 'projectile-globally-ignored-directories "node_modules")
(add-to-list 'projectile-project-root-files "package.json"))
+;; CSS eldoc
+(use-package css-eldoc
+ :commands turn-on-css-eldoc
+ :config
+ (add-hook 'css-mode-hook 'turn-on-css-eldoc))
+
(provide 'web)
;;; web.el ends here