In order to use the MLIR LSP server in Emacs, first the mlir-lsp-client.el
has to be loaded via elisp and then, one should call lsp-mlir-setup function
to setup the LSP client. After that simply calling the lsp function while
the mlir-mode is active with result in finding the language server (default
to mlir-lsp-server) via the lsp-mlir-server-executable customization variable
and connecting to it by the LSP library. Users who use MLIR's language server
library to create their own server can simply set the variable lsp-mlir-server-executable
to point to their own implementation executable.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/utils/emacs/mlir-lsp-client.el | ||
---|---|---|
20 |
Do you want to eventually upstream the support for MLIR to https://github.com/emacs-lsp/lsp-mode/?
I've thought about it, but I had two pros for keeping it here in my head: 1) since the mlir-mode and the mlir-lsp-server are distributed with LLVM, maybe it is better to keep it here (for example to match the compatibility) 2) it might worth merging this client with the mlir-mode
wdyt?
Totally up to you, but lsp-mode ships lsp-clients for many servers that are distributed over different channels. I use at least clangd and rust-analyzer.
So I think, let's keep it here for a while. I'm going to work more on it. and also I'll probably add support for eglot as well
mlir/utils/emacs/mlir-lsp-client.el | ||
---|---|---|
20 | It looks like this change did not get through. |