about summary refs log tree commit diff
path: root/users/glittershark/emacs.d/cpp.el
blob: 92b868a52f785e0d325685adb1e0f00cf3922395 (plain) (blame)
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
;;; ~/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++-clangd))

(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-hook 'c++-mode-hook #'+grfn/cpp-setup)

(use-package! protobuf-mode)

(comment
 (setq
  lsp-clients-clangd-executable
  "/home/grfn/code/depot/third_party/nix/clangd.sh"
  lsp-clients-clangd-args nil)
 )