2020-07-14 21:34:23 +02:00
|
|
|
;;; ~/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)
|
2020-07-17 16:28:50 +02:00
|
|
|
(add-to-list 'flycheck-disabled-checkers 'c/c++-clang))
|
2020-07-14 21:34:23 +02:00
|
|
|
|
|
|
|
(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)
|
2020-07-17 16:28:50 +02:00
|
|
|
(lsp)
|
|
|
|
(add-to-list 'flycheck-disabled-checkers 'c/c++-gcc)
|
|
|
|
(add-to-list 'flycheck-disabled-checkers 'c/c++-clang)))
|
2020-07-14 21:34:23 +02:00
|
|
|
|
|
|
|
(add-hook 'c++-mode-hook #'+grfn/cpp-setup)
|
|
|
|
|
2020-07-17 00:38:19 +02:00
|
|
|
(use-package! protobuf-mode)
|
|
|
|
|
2020-07-18 03:00:25 +02:00
|
|
|
(use-package! clang-format+
|
|
|
|
:config
|
|
|
|
(add-hook 'c-mode-common-hook #'clang-format+-mode))
|
|
|
|
|
2020-08-01 20:35:11 +02:00
|
|
|
(map!
|
|
|
|
(:map c++-mode-map
|
|
|
|
:leader
|
|
|
|
(:n "/ i" #'counsel-semantic-or-imenu)))
|
|
|
|
|
2020-07-14 21:34:23 +02:00
|
|
|
(comment
|
|
|
|
(setq
|
|
|
|
lsp-clients-clangd-executable
|
|
|
|
"/home/grfn/code/depot/third_party/nix/clangd.sh"
|
|
|
|
lsp-clients-clangd-args nil)
|
|
|
|
)
|