Compare commits
No commits in common. "b9afc66ee2a0969b11e266a00d971da7c4250a18" and "06cdcfbab7ec4acde68f65cb8d2a08fb37f16ccc" have entirely different histories.
b9afc66ee2
...
06cdcfbab7
61
configs/init-company.el
Normal file
61
configs/init-company.el
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
;;; init-company.el --- Autocompletado con company-mode -*- lexical-binding: t -*-
|
||||||
|
|
||||||
|
;; Author: kj <webmaster@outcontrol.net>
|
||||||
|
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; Archivo de configuración específico para el paquete company.
|
||||||
|
;; Company, de manera resumida, es el que nos muestra el autocompletado
|
||||||
|
;; en Emacs, tanto para código como para otro tipo de textos.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package company
|
||||||
|
:defer t
|
||||||
|
:straight t
|
||||||
|
:defines (company-dabbrev-ignore-case company-dabbrev-downcase)
|
||||||
|
:custom-face
|
||||||
|
(company-box-selection ((t (:inherit company-tooltip :weight semibold :extend t))))
|
||||||
|
:hook (after-init . global-company-mode)
|
||||||
|
:bind (
|
||||||
|
:map company-active-map
|
||||||
|
("<tab>" . company-indent-or-complete-common) ; Completar con tab como en la terminal de linux
|
||||||
|
("<escape>" . company-abort) ; Cerrar company con ESC
|
||||||
|
)
|
||||||
|
:config
|
||||||
|
(setq company-tooltip-align-annotations t
|
||||||
|
company-tooltip-limit 12
|
||||||
|
company-idle-delay 0.5 ; mostrar autocompletado luego de medio segundo mostrar
|
||||||
|
company-echo-delay (if (display-graphic-p) nil 0)
|
||||||
|
company-minimum-prefix-length 1 ; mostrar autocompletado desde que se coloca la primera letra.
|
||||||
|
company-icon-margin 3
|
||||||
|
company-require-match nil
|
||||||
|
company-dabbrev-ignore-case nil
|
||||||
|
company-dabbrev-downcase nil ; autocompletado case-sensitive.
|
||||||
|
company-global-modes '(not erc-mode message-mode help-mode
|
||||||
|
gud-mode eshell-mode shell-mode))
|
||||||
|
(add-to-list 'company-backends 'company-paths)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Rutas en company
|
||||||
|
(use-package company-paths
|
||||||
|
:straight (company-paths :type git :host github :repo "emacs-vs/company-paths")
|
||||||
|
:defer t
|
||||||
|
:after (company-mode)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Hacer que el autocompletado se vea más bonito con íconos
|
||||||
|
(use-package company-box
|
||||||
|
:defer t
|
||||||
|
:straight t
|
||||||
|
:diminish
|
||||||
|
:hook (company-mode . company-box-mode)
|
||||||
|
:config
|
||||||
|
(setq company-box-backends-colors nil
|
||||||
|
company-box-doc-delay 0.1
|
||||||
|
company-box-scrollbar 'right)
|
||||||
|
)
|
||||||
|
|
||||||
|
(provide 'init-company)
|
||||||
|
;;; init-company.el ends here
|
@ -29,7 +29,6 @@
|
|||||||
(corfu-auto t)
|
(corfu-auto t)
|
||||||
:config
|
:config
|
||||||
(setq corfu-popupinfo-delay 0
|
(setq corfu-popupinfo-delay 0
|
||||||
corfu-auto-delay 0.5
|
|
||||||
corfu-auto-prefix 1
|
corfu-auto-prefix 1
|
||||||
corfu-cycle t
|
corfu-cycle t
|
||||||
corfu-preview-current nil
|
corfu-preview-current nil
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
:config
|
:config
|
||||||
;; (add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
|
;; (add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
|
||||||
(add-to-list 'eglot-server-programs '(php-mode . ("phpactor" "language-server" "-vvv")))
|
(add-to-list 'eglot-server-programs '(php-mode . ("phpactor" "language-server" "-vvv")))
|
||||||
|
(setq eglot-stay-out-of '(company))
|
||||||
;; (add-to-list 'eglot-ignored-server-capabilites :hoverProvider)
|
;; (add-to-list 'eglot-ignored-server-capabilites :hoverProvider)
|
||||||
;; (add-to-list 'eglot-server-programs '(css-mode . ("vscode-css-language-server" "--stdio")))
|
;; (add-to-list 'eglot-server-programs '(css-mode . ("vscode-css-language-server" "--stdio")))
|
||||||
;; (add-to-list 'eglot-server-programs '(html-mode . ("vscode-html-language-server" "--stdio")))
|
;; (add-to-list 'eglot-server-programs '(html-mode . ("vscode-html-language-server" "--stdio")))
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
ivy-use-virtual-buffers t ; Enable bookmarks and recentf
|
ivy-use-virtual-buffers t ; Enable bookmarks and recentf
|
||||||
ivy-fixed-height-minibuffer t
|
ivy-fixed-height-minibuffer t
|
||||||
ivy-count-format "(%d/%d) "
|
ivy-count-format "(%d/%d) "
|
||||||
|
ivy-ignore-buffers '("\\` " "\\`\\*tramp/" "\\`\\*xref" "\\`\\*helpful "
|
||||||
|
"\\`\\*.+-posframe-buffer\\*" "\\` ?\\*company-.+\\*")
|
||||||
ivy-on-del-error-function #'ignore
|
ivy-on-del-error-function #'ignore
|
||||||
ivy-initial-inputs-alist nil)
|
ivy-initial-inputs-alist nil)
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
:hook
|
:hook
|
||||||
(org-mode . kj/org-hook)
|
(org-mode . kj/org-hook)
|
||||||
:config
|
:config
|
||||||
|
(setq company-dabbrev-ignore-case nil) ; Hacer el autocompletado case-sensitive.
|
||||||
(setq org-ellipsis " ▾")
|
(setq org-ellipsis " ▾")
|
||||||
(setq org-hide-emphasis-markers t)
|
(setq org-hide-emphasis-markers t)
|
||||||
;;(setq org-startup-folded 'content)
|
;;(setq org-startup-folded 'content)
|
||||||
|
1
init.el
1
init.el
@ -19,6 +19,7 @@
|
|||||||
(require 'init-functions)
|
(require 'init-functions)
|
||||||
(require 'init-org)
|
(require 'init-org)
|
||||||
(require 'init-eglot)
|
(require 'init-eglot)
|
||||||
|
;; (require 'init-company)
|
||||||
(require 'init-corfu)
|
(require 'init-corfu)
|
||||||
(require 'init-ctags)
|
(require 'init-ctags)
|
||||||
(require 'init-minibuffer)
|
(require 'init-minibuffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user