diff options
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | examples/test.css | 9 | ||||
-rw-r--r-- | init.el | 25 | ||||
-rw-r--r-- | lisp/general.el | 3 | ||||
-rw-r--r-- | lisp/go.el | 10 | ||||
-rw-r--r-- | lisp/web.el | 9 |
6 files changed, 46 insertions, 16 deletions
@@ -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; +} @@ -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 |