[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot f3f8531 58/62: Close #94: Prefer ccls over cquery
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot f3f8531 58/62: Close #94: Prefer ccls over cquery for C/C++ |
Date: |
Sat, 29 Sep 2018 17:13:38 -0400 (EDT) |
branch: externals/eglot
commit f3f8531e30e3f1e99be713208879bfa8b5996c81
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Close #94: Prefer ccls over cquery for C/C++
* README.md (Installation and usage): Prefer ccls to cquery. Mention clangd.
* eglot.el (eglot-server-programs): Suggest ccls for c/c++ by default.
---
README.md | 18 ++++++++++++++----
eglot.el | 3 +--
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 88a0ac2..fc06d52 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ for the language of your choice. Otherwise, it prompts you to
enter one:
* Ruby's [solargraph][solargraph]
* Bash's [bash-language-server][bash-language-server]
* PHP's [php-language-server][php-language-server]
-* C/C++'s [cquery][cquery]
+* C/C++'s [ccls][ccls] ([cquery][cquery] and [clangd][clangd] also work)
* Haskell's [IDE engine][haskell-ide-engine]
* Kotlin's [kotlin-language-server][kotlin-language-server]
* Golang's [go-langserver][go-langserver]
@@ -42,9 +42,17 @@ customize `eglot-server-programs`:
(add-to-list 'eglot-server-programs '(foo-mode . ("foo-language-server"
"--args")))
```
-Let me know how well it works and we can add it to the list. You can
-also enter a `server:port` pattern to connect to an LSP server. To
-skip the guess and always be prompted use `C-u M-x eglot`.
+Let me know how well it works and we can add it to the list. If the
+server has some quirk or non-conformity, it's possible to extend Eglot
+to adapt to it. Here's how to get [cquery][cquery] working for
+example:
+
+```lisp
+(add-to-list 'eglot-server-programs '((c++ mode c-mode) . (eglot-cquery
"cquery")))
+```
+
+You can also enter a `server:port` pattern to connect to an LSP
+server. To skip the guess and always be prompted use `C-u M-x eglot`.
## Connecting automatically
@@ -286,6 +294,8 @@ Under the hood:
[php-language-server]: https://github.com/felixfbecker/php-language-server
[company-mode]: https://github.com/company-mode/company-mode
[cquery]: https://github.com/cquery-project/cquery
+[ccls]: https://github.com/MaskRay/ccls
+[clangd]: https://clang.llvm.org/extra/clangd.html
[solargraph]: https://github.com/castwide/solargraph
[windows-subprocess-hang]:
https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Subprocess-hang.html
[haskell-ide-engine]: https://github.com/haskell/haskell-ide-engine
diff --git a/eglot.el b/eglot.el
index 14c32db..49cfce2 100644
--- a/eglot.el
+++ b/eglot.el
@@ -83,8 +83,7 @@
js2-mode
rjsx-mode) . ("javascript-typescript-stdio"))
(sh-mode . ("bash-language-server" "start"))
- ((c++-mode
- c-mode) . (eglot-cquery "cquery"))
+ ((c++-mode c-mode) . ("ccls"))
(ruby-mode
. ("solargraph" "socket" "--port"
:autoport))
- [elpa] externals/eglot 8e1a91b 31/62: Add a generic eglot-execute-command API, (continued)
- [elpa] externals/eglot 8e1a91b 31/62: Add a generic eglot-execute-command API, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot d5167ea 29/62: Minor fixes to test infrastructure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot b0b16e2 37/62: Allow tests to be run with custom jsonrpc.el, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8e0cf60 45/62: Fix textDocument/hover responses where MarkedString is a plist (#72), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 40f151b 51/62: Close #80: Consider :triggerCharacters in company completion, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot e5b89af 53/62: Close #82: Correctly delete text before expanding snippet completions, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot f9beb19 55/62: When exiting emacs, don't ask the user to confirm killing processes (#83), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot badcaec 56/62: Don't warn on implementation-specific notifications (#93), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 042a236 49/62: * README.md (Obligatory animated gif section): Add snippet gif., Stefan Monnier, 2018/09/29
- [elpa] externals/eglot b061873 61/62: Autoload eglot-ensure (#120), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot f3f8531 58/62: Close #94: Prefer ccls over cquery for C/C++,
Stefan Monnier <=