feat(language/protobuf): enable use of bufls language server

This commit is contained in:
2023-09-27 11:51:24 +01:00
parent d405e962da
commit 359e692d8e
2 changed files with 76 additions and 1 deletions

View File

@@ -28,7 +28,12 @@
(if (not (flycheck-protobuf-buf-project-root))
(clang-format-on-save-mode t)
(setq-local flycheck-checker 'protobuf-buf)
(buf-format-on-save-mode t)))
(buf-format-on-save-mode t))
(lsp)
(when (fboundp 'flycheck-select-checker)
(flycheck-select-checker 'protobuf-buf)
(flycheck-add-next-checker 'protobuf-buf 'lsp)))
(defun flycheck-protobuf-buf-project-root (&optional _checker)
"Return the nearest directory holding the buf.yaml configuration."
@@ -58,5 +63,9 @@ See URL `https://github.com/bufbuild/buf'."
(add-to-list 'flycheck-checkers 'protobuf-buf))
(use-package lsp-bufls
;; from vendor directory
:straight (:type built-in))
(provide 'siren-protobuf)
;;; siren-protobuf.el ends here