forked from camel-tooling/camel-lsp-client-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Theoritical emacs extension for lsp-mode camel-tooling#2
currently unable to configure Emacs with lsp mode so not at the point to test the Camel extension. Signed-off-by: Aurélien Pupier <[email protected]>
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
;;; lsp-apachecamel.el | ||
|
||
;; Version: 0.1 | ||
;; Homepage: https://github.com/camel-tooling/camel-lsp-client-emacs | ||
;; Package-Requires: ((emacs "25.1") (lsp-mode "5")) | ||
;; Keywords: languages, lsp, camel, fuse, integration | ||
|
||
;;; Code: | ||
|
||
(defcustom lsp-apachecamel-executable | ||
"sourcekit" | ||
"Path of the lsp-apachecamel executable." | ||
:type 'file | ||
:group 'apachecamel) | ||
|
||
(defcustom lsp-apachecamel-extra-args | ||
nil | ||
"Additional command line options passed to the lsp-apachecamel executable." | ||
:type '(repeat string) | ||
:group 'apachecamel) | ||
|
||
(defun lsp-apachecamel--lsp-command () | ||
"Generate the language server startup command." | ||
`(,lsp-apachecamel-executable | ||
,@lsp-apachecamel-extra-args)) | ||
|
||
(lsp-register-client | ||
(make-lsp-client :new-connection (lsp-stdio-connection 'lsp-apachecamel--lsp-command) | ||
:activation-fn (lambda (file-name _mode) | ||
(string= (f-ext file-name) "xml")) | ||
:server-id 'apachecamel-ls)) | ||
|
||
(provide 'lsp-apachecamel) | ||
;;; lsp-apachecamel.el ends here |