[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / mlir / utils / emacs / mlir-lsp-client.el
blob09dfa835deccdc72e13d1b4dd1c7f417b09ce41a
1 ;;; mlir-lsp-clinet.el --- LSP clinet for the MLIR.
3 ;; Copyright (C) 2022 The MLIR Authors.
4 ;;
5 ;; Licensed under the Apache License, Version 2.0 (the "License");
6 ;; you may not use this file except in compliance with the License.
7 ;; You may obtain a copy of the License at
8 ;;
9 ;; http://www.apache.org/licenses/LICENSE-2.0
11 ;; Unless required by applicable law or agreed to in writing, software
12 ;; distributed under the License is distributed on an "AS IS" BASIS,
13 ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ;; See the License for the specific language governing permissions and
15 ;; limitations under the License.
17 ;;; Commentary:
19 ;; LSP clinet to use with `mlir-mode' that uses `mlir-lsp-server' or any
20 ;; user made compatible server.
22 ;;; Code:
23 (require 'lsp-mode)
25 (defgroup lsp-mlir nil
26 "LSP support for MLIR."
27 :group 'lsp-mode
28 :link '(url-link "https://mlir.llvm.org/docs/Tools/MLIRLSP/"))
31 (defcustom lsp-mlir-server-executable "mlir-lsp-server"
32 "Command to start the mlir language server."
33 :group 'lsp-mlir
34 :risky t
35 :type 'file)
38 (defun lsp-mlir-setup ()
39 "Setup the LSP client for MLIR."
40 (add-to-list 'lsp-language-id-configuration '(mlir-mode . "mlir"))
42 (lsp-register-client
43 (make-lsp-client
44 :new-connection (lsp-stdio-connection (lambda () lsp-mlir-server-executable))
45 :activation-fn (lsp-activate-on "mlir")
46 :priority -1
47 :server-id 'mlir-lsp)))
50 (provide 'mlir-lsp-client)
51 ;;; mlir-lsp-client.el ends here