force lsp on c++ major mode

This commit is contained in:
Sameer Rahmani 2023-10-17 10:45:06 +01:00
parent 5159d37cf6
commit 5cd3bde92c
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ https://github.com/ninja-build/ninja/blob/master/misc/ninja-mode.el"
(lsp)
(require 'company-capf)
(require 'company-box)
(add-hook 'before-save-hook
(lambda ()
(when (and lsp-mode (eq major-mode 'c++-mode))
(lsp-format-buffer))))
(setq company-backends
'((company-capf
company-keywords))))))