This repository has been archived by the owner on Jul 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
lsp-clangd.el
executable file
·54 lines (42 loc) · 1.75 KB
/
lsp-clangd.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;;; lsp-clangd.el --- clangd support for lsp-mode -*- lexical-binding: t; -*-
;; Copyright (C) 2017 Thomas Brown <tabsoftwareconsulting@gmail.com>
;; Author: Thomas Brown <tabsoftwareconsulting@gmail.com>
;; Version: 3.0
;; Package-Requires: ((lsp-mode "3.0") (emacs "24.3"))
;; Keywords: lsp, clang, clangd, c, c++, objective-c, objective-c++
;; URL: https://github.com/tee3/lsp-clangd
;;; Commentary:
;;; Code:
(require 'lsp-mode)
(require 'lsp-common)
(defcustom lsp-clangd-executable
"clangd"
"The clangd executable."
:type '(string)
:group 'lsp-mode)
(lsp-define-stdio-client lsp-clangd-c++
"cpp"
(lsp-make-traverser "compile_commands.json")
(list lsp-clangd-executable)
:ignore-regexps
'("^Error -[0-9]+: .+$"))
(lsp-define-stdio-client lsp-clangd-c
"c"
(lsp-make-traverser "compile_commands.json")
(list lsp-clangd-executable)
:ignore-regexps
'("^Error -[0-9]+: .+$"))
(lsp-define-stdio-client lsp-clangd-objc
"objective-c"
(lsp-make-traverser "compile_commands.json")
(list lsp-clangd-executable)
:ignore-regexps
'("^Error -[0-9]+: .+$"))
(lsp-define-stdio-client lsp-clangd-objc++
"objective-cpp"
(lsp-make-traverser "compile_commands.json")
(list lsp-clangd-executable)
:ignore-regexps
'("^Error -[0-9]+: .+$"))
(provide 'lsp-clangd)
;;; lsp-clangd.el ends here