generic development

Table of Contents

1. generic

1.1. vterm

(use-package vterm
  :straight t)

1.2. Magit

(use-package magit
  :straight t
  :ensure t)

1.3. TODO eglot

(use-package eglot
  :straight t
  :bind (:map eglot-mode-map ("C-c e = =" . eglot-format-buffer)
              ("C-c e r r" . eglot-rename)
              ("C-c e g i" . eglot-find-implementation)
              ("C-c e g d" . eglot-find-declaration)
              ("C-c e g g" . eglot-find-typeDefinition)
              ("C-c e a o" . eglot-code-action-organize-imports)
              ("C-c e a a" . eglot-code-actions))
                                        ;(with-eval-after-load "eglot"
                                        ;  (add-to-list 'eglot-server-programs '(php-mode "phpstan")))

1.4. TODO project.el (projecctile?)

1.5. treemacs

(use-package treemacs
  :straight t
  (setq treemacs-width (if (display-graphic-p)
      treemacs-read-string-input 'from-minibuffer)
  (treemacs-git-mode 'simple)           
  (treemacs-git-commit-diff-mode 1)
  (treemacs-hide-gitignored-files-mode 1))

(use-package treemacs-magit
  :after (treemacs magit)
  :straight t)

2. language specific

2.1. PHP

2.1.1. PHP mode

(use-package php-mode
  :straight t)

2.1.2. Eglot config

(with-eval-after-load "eglot"
  (add-to-list 'eglot-server-programs 
               '(php-mode . ("phpactor" "language-server"))))

(defun init-php-mode ()

(with-eval-after-load 'php-mode
  ;; If phpactor command is not installed as global, remove next ;; and write the full path
  ;; (custom-set-variables '(lsp-phpactor-path "/path/to/phpactor"))
  (add-hook 'php-mode-hook #'init-php-mode))

2.2. TODO GO

2.3. TODO Clojure

2.4. TODO python

2.5. TODO TS/js/Node

2.6. TODO C