Emacs: Move my/clangd-version to programming/common.el.
This commit is contained in:
parent
adfdde47fd
commit
db84b0f02e
|
@ -1,16 +1,15 @@
|
|||
;;; global-variables.el --- Set some global variables. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-10T12:48:23+0100>
|
||||
;; Time-stamp: <2020-03-10T12:59:21+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Set `slow-computer'.
|
||||
;; * Set `LANG'.
|
||||
;; * Set `LC_MESSAGES'.
|
||||
;; * Banish customizations.
|
||||
;; * Fewer startup messages.
|
||||
;; * Configure backup settings.
|
||||
;; * Set username and email-address.
|
||||
;; * Set up authentication sources
|
||||
;; * Define some essential functions.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
@ -59,13 +58,7 @@
|
|||
(setq read-process-output-max (* 1024 1024))
|
||||
(defalias 'yes-or-no-p 'y-or-n-p) ; Just type y/n instead of yes/no.
|
||||
(savehist-mode t) ; Save minibuffer history.
|
||||
(global-auto-revert-mode t) ; Auto-revert file if changed on disk.
|
||||
|
||||
(defun my/clangd-version ()
|
||||
"Returns the version of clangd as float."
|
||||
(string-to-number
|
||||
(nth 2 (split-string (shell-command-to-string "clangd --version")))))
|
||||
)
|
||||
(global-auto-revert-mode t)) ; Auto-revert file if changed on disk.
|
||||
|
||||
(provide 'basics/global-variables)
|
||||
;;; global-variables.el ends here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-10T10:28:52+0100>
|
||||
;; Time-stamp: <2020-03-10T12:56:35+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -15,7 +15,13 @@
|
|||
:config (progn
|
||||
(setq-default indent-tabs-mode nil ; Set default indentation.
|
||||
tab-width 4)
|
||||
(electric-pair-mode t)) ; Auto-type closing brackets.
|
||||
(electric-pair-mode t) ; Auto-type closing brackets.
|
||||
|
||||
(defun my/clangd-version ()
|
||||
"Returns the version of clangd as float."
|
||||
(string-to-number
|
||||
(nth 2 (split-string
|
||||
(shell-command-to-string "clangd --version"))))))
|
||||
:bind (("C-:" . ff-find-other-file) ; Switch between header and source.
|
||||
(:map compilation-mode-map
|
||||
("<f5>" . compilation-previous-error)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
;;; lsp.el --- Language Server Protocol. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-09T15:14:33+0100>
|
||||
;; Time-stamp: <2020-03-10T12:58:15+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'basics/global-variables)
|
||||
(require 'programming/common)
|
||||
|
||||
(unless slow-computer
|
||||
;; Client for Language Server Protocol servers.
|
||||
|
|
Loading…
Reference in New Issue