Changeset 5211578 in dotfiles for emacs/.emacs.d/.emacs-config.org
- Timestamp:
- Sep 25, 2024, 11:43:27 PM (7 weeks ago)
- Branches:
- master
- Children:
- ead573e
- Parents:
- fc6fa17
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/.emacs.d/.emacs-config.org
rfc6fa17 r5211578 104 104 #+BEGIN_SRC emacs-lisp :tangle init.el 105 105 (define-key global-map 106 (kbd "<f7>") ' global-display-line-numbers-mode)106 (kbd "<f7>") 'display-line-numbers-mode) 107 107 108 108 (define-key global-map … … 111 111 112 112 * Editing 113 ** Completion styles 114 #+begin_src emacs-lisp :tangle init.el 115 (setq completion-styles '(basic partial-completion emacs22 substring)) 116 #+end_src 117 113 118 ** Dired 114 119 #+BEGIN_SRC emacs-lisp :tangle init.el … … 170 175 ** Imenu List 171 176 #+begin_src emacs-lisp :tangle init.el 172 173 (setq imenu-list-focus-after-activation nil 174 imenu-list-auto-resize nil 175 imenu-list-mode-line-format '() 176 imenu-list-size 0.4) 177 (global-set-key (kbd "C-x C-d") #'imenu-list-smart-toggle) 177 (use-package imenu-list 178 :bind 179 ("C-x C-d" . imenu-list-smart-toggle) 180 :config 181 (setq imenu-list-focus-after-activation nil 182 imenu-list-auto-resize nil 183 imenu-list-mode-line-format '() 184 imenu-list-size 0.4)) 178 185 #+end_src 179 186 … … 213 220 :defer t 214 221 :bind (("M-s M-s" . avy-goto-char) 215 216 217 218 219 220 221 222 ("M-s s" . avy-goto-char) 223 ("M-s g" . avy-goto-line) 224 ("M-s l" . avy-goto-char-in-line) 225 ("M-s M-l" . avy-goto-char-in-line) 226 227 ("M-g g" . avy-goto-line) 228 ("M-s M-g" . avy-goto-line))) 222 229 223 230 (use-package link-hint … … 229 236 :defer t 230 237 :bind (("C-z" . goto-last-change) 231 238 ("M-z" . goto-last-change-reverse))) 232 239 233 240 ;; Jumps using grep and similar tools 234 241 (use-package dumb-jump 235 242 :defer t 236 :bind (("C-." . dumb-jump-go))) 243 :bind (("M-g o" . dumb-jump-go-other-window) 244 ("M-g j" . dumb-jump-go) 245 ("M-g b" . dumb-jump-back) 246 ("M-g q" . dumb-jump-quick-look) 247 ("M-g x" . dumb-jump-go-prefer-external) 248 ("M-g z" . dumb-jump-go-prefer-external-other-window))) 237 249 238 250 #+END_SRC … … 267 279 ** Tags 268 280 Для прыжков и поиска функций/классов и т.д. 269 #+BEGIN_SRC emacs-lisp :tangle nil270 (setq path-to-ctags "~/.guix- profile/bin/ctags")271 281 #+BEGIN_SRC emacs-lisp :tangle init.el 282 (setq path-to-ctags "~/.guix-home/profile/bin/ctags") 283 272 284 (defun tags-create (dir-name) 273 285 "Create tags file." … … 275 287 (shell-command 276 288 (format "%s -f TAGS -e -R %s" path-to-ctags 277 (directory-file-name dir-name))))278 289 (directory-file-name dir-name)))) 290 279 291 (defun tags-create-python (dir-name) 280 292 "Create tags with python interpreter" … … 282 294 (shell-command 283 295 (format "%s -f TAGS -e -R --fields=+l --languages=python --python-kinds=-iv $(python -c \"import os, sys; print(' '.join('{}'.format(d) for d in sys.path if os.path.isdir(d)))\") %s" path-to-ctags 284 (directory-file-name dir-name)))) 285 #+END_SRC 296 (directory-file-name dir-name)))) 297 #+END_SRC 298 299 #+begin_src emacs-lisp :tangle init.el 300 (use-package ggtags 301 :defer t 302 :hook 303 (c-mode . ggtags-mode)) 304 #+end_src 305 286 306 287 307 ** Дебаггер … … 369 389 ** Клиент LSP 370 390 #+begin_src emacs-lisp :tangle init.el 391 (with-eval-after-load 'eglot 392 (add-to-list 'eglot-server-programs 393 '((php-mode phps-mode php-ts-mode) . ("/home/w96k/projects/phpactor/bin/phpactor" "language-server" "-vvv")))) 394 371 395 ;; (with-eval-after-load 'eglot 372 396 ;; (add-to-list 'eglot-server-programs '((php-mode phps-mode) . ("~/projects/phpactor/bin/phpactor" "language-server" "-vvv"))) … … 382 406 ;; don't just get clobbered by docstrings. 383 407 (add-hook 'eglot-managed-mode-hook 384 385 386 387 408 (lambda () 409 "Make sure Eldoc will show us all of the feedback at point." 410 (setq-local eldoc-documentation-strategy 411 #'eldoc-documentation-compose))) 388 412 #+end_src 389 413 … … 557 581 ;; (defun init-php-mode () 558 582 ;; (eglot-ensure)) 559 560 (with-eval-after-load 'php-mode 561 562 ;; (add-hook 'php-mode-hook #'init-php-mode) 563 ) 564 565 (when (package-loaded? "php-mode") 566 (progn 567 (add-hook 'php-mode-hook 'php-enable-symfony2-coding-style) 568 (setq lsp-intelephense-php-version "8.1.16") 569 (defvar phpactor-executable "~/.bin/phpactor") 570 (custom-set-variables '(lsp-phpactor-path "~/usr/local/bin/phpactor")) 571 572 (add-hook 'php-mode-hook 573 '(lambda () 574 ;; (require 'yasnippet) 575 ;; (require 'yasnippet-snippets) 576 577 (set-fill-column 120) 578 579 ;; (make-local-variable 'eldoc-documentation-function) 580 ;; (setq eldoc-documentation-function 581 ;; 'phpactor-hover) 582 ;; (yas-minor-mode t) 583 (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point))) 584 585 (setq php-manual-path 586 "~/php/php-manual/" 587 php-quickhelp-dir "~/php/php-manual/" 588 php-quickhelp--dest "~/.emacs.d/php-manual/php_manual_en.json") 589 590 591 ;; (add-hook 'php-mode-hook 592 ;; '(lambda () 593 ;; ;; (auto-complete-mode t) 594 595 ;; ;; (require 'ac-php) 596 ;; (require 'php-quickhelp) 597 ;; (require 'company) 598 ;; (company-mode t) 599 ;; (require 'company-php) 600 ;; (require 'company-quickhelp) 601 602 ;; (require 'yasnippet) 603 ;; (require 'yasnippet-snippets) 604 605 ;; (set (make-local-variable 'company-backends) 606 ;; '((company-ac-php-backend company-dabbrev-code) 607 ;; php-quickhelp-company-php 608 ;; company-capf company-files)) 609 610 ;; (company-quickhelp-mode t) 611 612 ;; (define-key php-mode-map (kbd "C-M-i") 'company-complete) 613 ;; (define-key company-mode-map (kbd "M-TAB") 'company-complete) 614 615 ;; ;; (setq ac-sources '(ac-source-php php-quickhelp-company-php)) 616 ;; ;; (setq eldoc-documentation-function 617 ;; ;; 'php-quickhelp-eldoc-func) 618 619 ;; (yas-minor-mode t) 620 621 ;; ;; (define-key php-mode-map (kbd "C-M-i") 'auto-complete) 622 ;; ;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 623 624 ;; (define-key php-mode-map (kbd "C-c H") 625 ;; 'php-local-manual-search) 626 627 ;; (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 628 ;; (define-key company-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 629 630 ;; ;; (define-key php-mode-map (kbd "C-c t") 'ac-php-show-tip) 631 632 ;; ;; Jump to definition (optional) 633 ;; (define-key php-mode-map 634 ;; (kbd "M-.") 'ac-php-find-symbol-at-point) 635 636 ;; ;; Return back (optional) 637 ;; (define-key php-mode-map 638 ;; (kbd "M-,") 'ac-php-location-stack-back))) 639 )) 583 584 (use-package php-mode 585 :bind ("C-c h" . 'php-quickhelp-at-point) 586 :config 587 588 (setq php-manual-path 589 "~/projects/php-manual/" 590 php-quickhelp-dir "~/projects/php-manual/" 591 php-quickhelp--dest "~/projects/php-manual/php_manual_en.json")) 592 593 594 ;; (add-hook 'php-mode-hook 595 ;; '(lambda () 596 ;; ;; (auto-complete-mode t) 597 598 ;; ;; (require 'ac-php) 599 ;; (require 'php-quickhelp) 600 ;; (require 'company) 601 ;; (company-mode t) 602 ;; (require 'company-php) 603 ;; (require 'company-quickhelp) 604 605 ;; (require 'yasnippet) 606 ;; (require 'yasnippet-snippets) 607 608 ;; (set (make-local-variable 'company-backends) 609 ;; '((company-ac-php-backend company-dabbrev-code) 610 ;; php-quickhelp-company-php 611 ;; company-capf company-files)) 612 613 ;; (company-quickhelp-mode t) 614 615 ;; (define-key php-mode-map (kbd "C-M-i") 'company-complete) 616 ;; (define-key company-mode-map (kbd "M-TAB") 'company-complete) 617 618 ;; ;; (setq ac-sources '(ac-source-php php-quickhelp-company-php)) 619 ;; ;; (setq eldoc-documentation-function 620 ;; ;; 'php-quickhelp-eldoc-func) 621 622 ;; (yas-minor-mode t) 623 624 ;; ;; (define-key php-mode-map (kbd "C-M-i") 'auto-complete) 625 ;; ;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 626 627 ;; (define-key php-mode-map (kbd "C-c H") 628 ;; 'php-local-manual-search) 629 630 ;; (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 631 ;; (define-key company-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 632 633 ;; ;; (define-key php-mode-map (kbd "C-c t") 'ac-php-show-tip) 634 635 ;; ;; Jump to definition (optional) 636 ;; (define-key php-mode-map 637 ;; (kbd "M-.") 'ac-php-find-symbol-at-point) 638 639 ;; ;; Return back (optional) 640 ;; (define-key php-mode-map 641 ;; (kbd "M-,") 'ac-php-location-stack-back))) 642 )) 640 643 #+end_src 641 644 … … 727 730 (sql-database "testdb") 728 731 (sql-port 3306)))) 732 #+end_src 733 734 *** Sql Viewer 735 #+begin_src emacs-lisp :tangle init.el 736 (unless (package-installed-p 'pg) 737 (package-vc-install "https://github.com/emarsden/pg-el" nil nil 'pg)) 738 (unless (package-installed-p 'pgmacs) 739 (package-vc-install "https://github.com/emarsden/pgmacs")) 740 741 (use-package pgmacs) 729 742 #+end_src 730 743 … … 1249 1262 (add-hook 'dired-mode-hook 'set-normal-font) 1250 1263 (add-hook 'org-mode-hook 'set-normal-font) 1251 #+end_src 1264 (add-hook 'Info-mode-hook 'set-normal-font) 1265 #+end_src
Note:
See TracChangeset
for help on using the changeset viewer.