tvl-depot/users/glittershark/emacs.d/cpp.el
Griffin Smith d1d6830c58 feat(gs/emacs): Install clang-format+
Change-Id: I3560932953718ab9324bc490488f39605f03ee5e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1264
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-18 01:02:08 +00:00

34 lines
967 B
EmacsLisp

;;; ~/code/depot/users/glittershark/emacs.d/cpp.el -*- lexical-binding: t; -*-
(load! "google-c-style")
(after! flycheck
(add-to-list 'flycheck-disabled-checkers 'c/c++-gcc)
(add-to-list 'flycheck-disabled-checkers 'c/c++-clang))
(defun +grfn/cpp-setup ()
(when (s-starts-with?
"/home/grfn/code/depot/third_party/nix"
(buffer-file-name))
(setq lsp-clients-clangd-executable "/home/grfn/code/depot/users/glittershark/emacs.d/nix-clangd.sh"
lsp-clients-clangd-args nil)
(google-set-c-style)
(lsp)
(add-to-list 'flycheck-disabled-checkers 'c/c++-gcc)
(add-to-list 'flycheck-disabled-checkers 'c/c++-clang)))
(add-hook 'c++-mode-hook #'+grfn/cpp-setup)
(use-package! protobuf-mode)
(use-package! clang-format+
:config
(add-hook 'c-mode-common-hook #'clang-format+-mode))
(comment
(setq
lsp-clients-clangd-executable
"/home/grfn/code/depot/third_party/nix/clangd.sh"
lsp-clients-clangd-args nil)
)