LSPCE
Introduction
LSPCE - LSP Client for Emacs, is a simple lsp client that is implemented as an Emacs module.
It does not want to be a full-featured lsp client. The features it supports are:
- find definitions/references/implementatoins (as a xref backend)
- completion (as a capf function) support snippet too.
- diagnostics (as a flymake backend) process diagnostics when idle.
- hover (triggered by `lspce-help-at-point`)
The features planed to implement:
- signature help
- code action
- rename
- ā¦
I have tested LSPCE with `pyright` and `rust-analyzer`, and Iām using it to develop itself :).
Installation
At the moment, you can only install LSPCE by cloning this repo and compile rust code manually.
Installing from the Git Repository
Before installing LSPCE, you should install rust and cargo.
$ git https://github.com/zbelial/lspce.git ~/.emacs.d/site-lisp/lspce
$ cd ~/.emacs.d/site-lisp/lspce/rs
$ cargo build
Or (if you use Linux) you can download a .so file I compiled on a Manjaro with rust 1.61.0.
Get started
(use-package lspce
:load-path "/path/to/lspce/lisp"
:init (progn
(add-to-list 'load-path "/path/to/lspce/rs/target/debug")
(require 'lspce-module)
)
:config (progn
(setq lspce-send-changes-idle-time 1)
;; enable lspce in particular buffers
;; (add-hook 'rust-mode-hook 'lspce-mode)
)
)
Acknowledgements
Thanks to emacs-module-rs, which makes implementing LSPCE possible. Thanks to eglot and lsp-mode, I learned a lot about LSP while developing this package.