Add eglot.

This commit is contained in:
kj 2022-11-18 22:56:34 -04:00
parent 051e902d64
commit 2d02d9e5bc
2 changed files with 22 additions and 2 deletions

View File

@ -47,8 +47,10 @@
(defun lsp-citre-capf-function ()
"A capf backend that tries lsp first, then Citre."
(let ((lsp-result (if (bound-and-true-p lsp-mode)
(lsp-completion-at-point))))
(let ((lsp-result (if (fboundp #'eglot-completion-at-point)
(eglot-completion-at-point)
(when (fboundp #'lsp-completion-at-point)
(lsp-completion-at-point)))))
(if (and lsp-result
(try-completion
(buffer-substring (nth 0 lsp-result)

18
configs/base-eglot.el Normal file
View File

@ -0,0 +1,18 @@
;;; base-eglot.el --- Configuración de eglot (LSP) -*- lexical-binding: t -*-
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;;; Code:
(use-package eglot
:defer t
:straight (:type built-in)
:config
(add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
)
(provide 'base-eglot)
;;; base-eglot.el ends here