Changeset 09e91e8 in dotfiles


Ignore:
Timestamp:
Apr 16, 2023, 5:57:05 PM (21 months ago)
Author:
w96k <w96k@…>
Branches:
master
Children:
420782f
Parents:
56a7a86
Message:

Update emacs config

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • emacs/.emacs.d/.emacs-config.org

    r56a7a86 r09e91e8  
    153153      (package-install 'org-sql)
    154154      ;;(package-install 'eglot)
     155      (package-install 'eglot-java)
    155156      (package-install 'mastodon)
    156157      (package-install 'exec-path-from-shell)
     
    905906По большей части я использую дефолтный Completion Buffer и Corfu
    906907#+begin_src elisp :tangle init.el
    907     (when (package-loaded? "corfu")
    908       (progn
    909         (setq corfu-preview-current 'nil
    910               corfu-popupinfo-delay t)
     908  (when (package-loaded? "corfu")
     909    (progn
     910      (setq corfu-preview-current 'nil
     911            corfu-popupinfo-delay t)
     912      (corfu-mode 1)
     913      (corfu-popupinfo-mode 1)
     914      (defun show-default-completion-buffer ()
     915        (interactive)
     916        (corfu-quit)
     917        (corfu-mode -1)
     918        (completion-at-point)
    911919        (corfu-mode 1)
    912         (defun show-default-completion-buffer ()
    913           (interactive)
    914           (corfu-quit)
    915           (corfu-mode -1)
    916           (completion-at-point)
    917           (corfu-mode 1)
    918           (corfu-popupinfo-mode 1))
    919         (define-key corfu-map (kbd "M-TAB") 'show-default-completion-buffer)
    920         (define-key corfu-map (kbd "TAB") 'show-default-completion-buffer)
    921         (define-key corfu-map (kbd "C-M-i") 'show-default-completion-buffer)     
    922         (corfu-mode -1)
    923         (add-hook 'prog-mode-hook 'corfu-mode)
    924 
    925         (defun corfu-send-shell (&rest _)
    926           "Send completion candidate when inside comint/eshell."
    927           (cond
    928            ((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input))
    929             (eshell-send-input))
    930            ((and (derived-mode-p 'comint-mode)  (fboundp 'comint-send-input))
    931             (comint-send-input))))
    932 
    933         (advice-add #'corfu-insert :after #'corfu-send-shell)
    934 
    935         (add-hook 'eshell-mode-hook 'corfu-mode)))
     920        (corfu-popupinfo-mode 1))
     921      (define-key corfu-map (kbd "M-TAB") 'show-default-completion-buffer)
     922      (define-key corfu-map (kbd "TAB") 'show-default-completion-buffer)
     923      (define-key corfu-map (kbd "C-M-i") 'show-default-completion-buffer)     
     924      (corfu-mode -1)
     925      (add-hook 'prog-mode-hook 'corfu-mode)
     926
     927      (defun corfu-send-shell (&rest _)
     928        "Send completion candidate when inside comint/eshell."
     929        (cond
     930         ((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input))
     931          (eshell-send-input))
     932         ((and (derived-mode-p 'comint-mode)  (fboundp 'comint-send-input))
     933          (comint-send-input))))
     934
     935      (advice-add #'corfu-insert :after #'corfu-send-shell)
     936
     937      (add-hook 'eshell-mode-hook 'corfu-mode)))
     938
    936939#+end_src
    937940*** Модификация дефолта
     
    10331036** Клиент LSP
    10341037#+begin_src emacs-lisp :tangle init.el
    1035     (with-eval-after-load 'eglot
    1036       (add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
    1037 
    1038       ;; No event buffers, disable providers cause a lot of hover traffic. Shutdown unused servers.
    1039       (setq eglot-events-buffer-size 0
    1040             eglot-ignored-server-capabilities '(:hoverProvider
    1041                                                 :documentHighlightProvider)
    1042             eglot-autoshutdown t))
    1043 
    1044     ;; Show all of the available eldoc information when we want it. This way Flymake errors
    1045     ;; don't just get clobbered by docstrings.       
    1046     (add-hook 'eglot-managed-mode-hook
    1047               (lambda ()
    1048                 "Make sure Eldoc will show us all of the feedback at point."
    1049                 (setq-local eldoc-documentation-strategy
    1050                             #'eldoc-documentation-compose)))
    1051 #+end_src
    1052    
     1038  (with-eval-after-load 'eglot
     1039    (add-to-list 'eglot-server-programs '((php-mode phps-mode) . ("~/projects/phpactor/bin/phpactor" "language-server" "-vvv")))
     1040    (add-to-list 'eglot-server-programs '((php-mode phps-mode) . ("intelephense" "--stdio")))
     1041
     1042    ;; No event buffers, disable providers cause a lot of hover traffic. Shutdown unused servers.
     1043    (setq eglot-events-buffer-size 0
     1044          eglot-ignored-server-capabilities '(:hoverProvider
     1045                                              :documentHighlightProvider)
     1046          eglot-autoshutdown t))
     1047
     1048  ;; Show all of the available eldoc information when we want it. This way Flymake errors
     1049  ;; don't just get clobbered by docstrings.       
     1050  (add-hook 'eglot-managed-mode-hook
     1051            (lambda ()
     1052              "Make sure Eldoc will show us all of the feedback at point."
     1053              (setq-local eldoc-documentation-strategy
     1054                          #'eldoc-documentation-compose)))
     1055#+end_src
     1056
    10531057** Линтеры
    1054 #+BEGIN_SRC emacs-lisp :tangle nil
    1055   ;;(add-hook 'php-mode-hook 'flymake-php-load)
    1056   ;; (add-hook 'php-mode-hook 'flymake-phpstan-turn-on)p
    1057   ;;(add-hook 'php-mode-hook 'flymake-phpcs-load)
     1058#+BEGIN_SRC emacs-lisp :tangle init.el
     1059  ;; (add-hook 'php-mode-hook 'flymake-php-load)
     1060   ;; (add-hook 'php-mode-hook 'flymake-phpstan-turn-on)
     1061
     1062    ;; (require 'flycheck-phpstan)
     1063
    10581064
    10591065  ;;(add-to-list 'auto-mode-alist '("\\.\\(php\\|phtml\\)\\'" . phps-mode))
     
    11961202  ;; (require 'realgud-xdebug)
    11971203
     1204  (defun init-php-mode ()
     1205    (eglot-ensure))
     1206
     1207  (with-eval-after-load 'php-mode
     1208    (custom-set-variables '(lsp-phpactor-path "/home/w96k/projects/phpactor"))
     1209    ;; (add-hook 'php-mode-hook #'init-php-mode)
     1210    )
     1211
    11981212  (when (package-loaded? "transient")
    11991213    (progn
    12001214      (transient-define-prefix
    1201        php ()
    1202        "Php"
    1203        [["Class"
    1204          ("cc" "Copy" phpactor-copy-class)
    1205          ("cn" "New" phpactor-create-new-class)
    1206          ("cr" "Move" phpactor-move-class)
    1207          ("ci" "Inflect" phpactor-inflect-class)
    1208          ("n"  "Namespace" phpactor-fix-namespace)]
    1209         ["Properties"
    1210          ("a"  "Accessor" phpactor-generate-accessors)
    1211          ("pc" "Constructor" phpactor-complete-constructor)
    1212          ("pm" "Add missing props" phpactor-complete-properties)
    1213          ("r" "Rename var locally" phpactor-rename-variable-local)
    1214          ("R" "Rename var in file" phpactor-rename-variable-file)]
    1215         ["Extract"
    1216          ("ec" "constant" phpactor-extract-constant)
    1217          ("ee" "expression" phpactor-extract-expression)
    1218          ("em"  "method" phpactor-extract-method)]
    1219         ["Methods"
    1220          ("i" "Implement Contracts" phpactor-implement-contracts)
    1221          ("m"  "Generate method" phpactor-generate-method)]
    1222         ["Navigate"
    1223          ("x" "List refs" phpactor-list-references)
    1224          ("X" "Replace refs" phpactor-replace-references)
    1225          ("."  "Goto def" phpactor-goto-definition)]
    1226         ["Phpactor"
    1227          ("s" "Status" phpactor-status)
    1228          ("u" "Install" phpactor-install-or-update)]])))
     1215        php ()
     1216        "Php"
     1217        [["Class"
     1218          ("cc" "Copy" phpactor-copy-class)
     1219          ("cn" "New" phpactor-create-new-class)
     1220          ("cr" "Move" phpactor-move-class)
     1221          ("ci" "Inflect" phpactor-inflect-class)
     1222          ("n"  "Namespace" phpactor-fix-namespace)]
     1223         ["Properties"
     1224          ("a"  "Accessor" phpactor-generate-accessors)
     1225          ("pc" "Constructor" phpactor-complete-constructor)
     1226          ("pm" "Add missing props" phpactor-complete-properties)
     1227          ("r" "Rename var locally" phpactor-rename-variable-local)
     1228          ("R" "Rename var in file" phpactor-rename-variable-file)]
     1229         ["Extract"
     1230          ("ec" "constant" phpactor-extract-constant)
     1231          ("ee" "expression" phpactor-extract-expression)
     1232          ("em"  "method" phpactor-extract-method)]
     1233         ["Methods"
     1234          ("i" "Implement Contracts" phpactor-implement-contracts)
     1235          ("m"  "Generate method" phpactor-generate-method)]
     1236         ["Navigate"
     1237          ("x" "List refs" phpactor-list-references)
     1238          ("X" "Replace refs" phpactor-replace-references)
     1239          ("."  "Goto def" phpactor-goto-definition)]
     1240         ["Phpactor"
     1241          ("s" "Status" phpactor-status)
     1242          ("u" "Install" phpactor-install-or-update)]])))
    12291243
    12301244  (when (package-loaded? "php-mode")
     
    12321246      (add-hook 'php-mode-hook 'php-enable-symfony2-coding-style)
    12331247      (setq lsp-intelephense-php-version "8.1.6")
    1234       (defvar phpactor-executable "~/.bin/phpactor")
     1248      (defvar phpactor-executable "~/.local/bin/phpactor")
     1249      (custom-set-variables '(lsp-phpactor-path "~/.local/bin/phpactor"))
    12351250
    12361251      (add-hook 'php-mode-hook
     
    12411256                   (set-fill-column 120)
    12421257
    1243                    (make-local-variable 'eldoc-documentation-function)
    1244                    (setq eldoc-documentation-function
    1245                         'phpactor-hover)
     1258                   ;; (make-local-variable 'eldoc-documentation-function)
     1259                   ;; (setq eldoc-documentation-function
     1260                   ;;      'phpactor-hover)
    12461261                   (yas-minor-mode t)
    12471262                   (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point)))
     
    14461461        org-outline-path-complete-in-steps nil
    14471462        org-src-tab-acts-natively t
     1463        org-id-track-globally t
    14481464        org-confirm-babel-evaluate nil)
    14491465
     
    14861502  (when (package-loaded? "org-roam")
    14871503    (progn
    1488       (setq org-roam-directory (file-truename "~/projects/at-w96k/content/digarden/")
     1504      (setq org-roam-directory (file-truename "~/projects/at-w96k/content/digarden/pages/")
    14891505            org-roam-v2-ack t
    14901506            org-roam-completion-everywhere t
    1491             org-roam-index-file (concat org-roam-directory "/20210409054712-жизнь.org"))
    1492 
    1493       ;; (load "org-roam-ui-autoloads")
    1494       ;; (org-roam-db-sync)
    1495 
    1496       ;; (org-roam-db-autosync-mode t)
     1507            org-roam-index-file (concat org-roam-directory "/20210409054712-жизнь.org")
     1508            org-roam-dailies-directory (concat org-roam-directory "journals/"))
     1509
     1510      (org-roam-db-autosync-mode t)
    14971511
    14981512      (defun org-roam-jump-to-index ()
     
    15041518
    15051519      (define-key global-map
    1506         (kbd "C-c n l") 'org-roam-node-insert)
     1520                  (kbd "C-c n l") 'org-roam-node-insert)
    15071521      (define-key global-map
    1508         (kbd "C-c n f") 'org-roam-node-find)
     1522                  (kbd "C-c n f") 'org-roam-node-find)
    15091523      (define-key global-map
    1510         (kbd "C-c n b") 'org-roam-buffer-toggle)
     1524                  (kbd "C-c n b") 'org-roam-buffer-toggle)
    15111525      (define-key global-map
    1512         (kbd "C-c n t t") 'org-roam-tag-add)
     1526                  (kbd "C-c n t t") 'org-roam-tag-add)
    15131527      (define-key global-map
    1514         (kbd "C-c n t r") 'org-roam-tag-remove)
     1528                  (kbd "C-c n t r") 'org-roam-tag-remove)
    15151529      (define-key global-map
    1516         (kbd "C-c n i") 'org-roam-jump-to-index)
     1530                  (kbd "C-c n i") 'org-roam-jump-to-index)
    15171531      (define-key global-map
    1518         (kbd "C-c n g") 'org-roam-graph)
     1532                  (kbd "C-c n g") 'org-roam-graph)
    15191533      (define-key global-map
    1520         (kbd "C-c n d") 'org-roam-db-build-cache)
     1534                  (kbd "C-c n d") 'org-roam-db-build-cache)
    15211535      (define-key global-map
    1522         (kbd "C-c n r") 'org-roam-node-random)
     1536                  (kbd "C-c n r") 'org-roam-node-random)
    15231537      (define-key global-map 
    1524         (kbd "C-c n j") 'org-roam-dailies-find-date)))
     1538                  (kbd "C-c n j") 'org-roam-dailies-find-date)))
    15251539
    15261540  (customize-set-variable 'org-link-descriptive t)
  • wm/.stumpwmrc

    r56a7a86 r09e91e8  
    1212(defcommand icecat () ()
    1313            (run-or-raise "icecat" '(:class "IceCat")))
     14
     15(defcommand firefox () ()
     16            (run-or-raise "firefox" '(:class "Firefox")))
    1417
    1518(defcommand nyxt () ()
     
    5255
    5356;; Gaps: useless concept to be honest
    54 (load-module "swm-gaps")
     57;; (load-module "swm-gaps")
    5558;; (setf swm-gaps:*inner-gaps-size* 0)
    5659;; (setf swm-gaps:*outer-gaps-size* 2)
Note: See TracChangeset for help on using the changeset viewer.