summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2023-11-25 10:02:42 -0800
committerbenj <benj@rse8.com>2023-11-25 10:02:42 -0800
commit4cfa8246ea7eec4139ba6c34d3fb3a4545956824 (patch)
tree450ba709847d3740eef79753c428095bdb08fe62 /utils
parent4f78ee33bfc828707a79cd79d296bf4a9c25b5b9 (diff)
downloademacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.gz
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.bz2
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.lz
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.xz
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.zst
emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.zip
rewrite emacs init.el and go back to basics
This is a complete rewrite leveraging the very popular use-package to see how I like it. We reduce init.el to a bare minimum configuration and remove the previous homebrew organizational scheme. A number of packages have yet to be setup, but we'll wait and do in JIT.
Diffstat (limited to '')
-rw-r--r--utils/bindKeys.el25
-rw-r--r--utils/fetch-includes.el59
2 files changed, 0 insertions, 84 deletions
diff --git a/utils/bindKeys.el b/utils/bindKeys.el
deleted file mode 100644
index c07c393..0000000
--- a/utils/bindKeys.el
+++ /dev/null
@@ -1,25 +0,0 @@
-;;; bindKeys.el --- bind key sequence to a key map -*- lexical-binding: t; -*-
-
-;; Author: Benj Bellon
-;; Keywords: lisp
-
-;;; Commentary:
-
-;; Bind key seqeuence to a keymap
-
-;;; Code:
-(require 'dash)
-
-(defun bindKeys (triggerSeq bindings)
- "Bind keys to a trigger sequence.
-TRIGGERSEQ is a sequence of key(s) to trigger the binding.
-BINDINGS is an alist of bindings."
- (let ((trigger (concat (-reduce (lambda (acc cur) (concat acc cur)) triggerSeq) " ")))
- (mapcar (lambda (binding)
- (global-set-key
- (kbd (concat (concat "C-c " trigger) (car binding)))
- (cdr binding)))
- bindings)))
-
-(provide 'bindKeys)
-;;; bindKeys.el ends here
diff --git a/utils/fetch-includes.el b/utils/fetch-includes.el
deleted file mode 100644
index ce386af..0000000
--- a/utils/fetch-includes.el
+++ /dev/null
@@ -1,59 +0,0 @@
-;;; fetch-includes.el --- add headers to clang checker -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2018 Benj Bellon
-
-;; Author: Benj Bellon
-;; Keywords: lisp
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Parses the compile_commands.json db and adds headers
-;; to company-mode's company-clang backend.
-
-;;; Code:
-
-(require 'json)
-(require 'dash)
-
-(defun get-commands (json-file)
- "Retrieves list of command strings possibly including header paths.
-JSON-FILE is the path to the json-file to parse."
- (let* ((json-object-type 'hash-table)
- (json-array-type 'list)
- (json-key-type 'string)
- (json (json-read-file json-file)))
- (mapcar
- (function (lambda (el) (gethash "command" el)))
- json)))
-
-(defun get-include-paths (commands-list)
- "Retrieve the include paths from a list of string which may be include paths.
-COMMANDS-LIST a list of commands"
- (remove nil
- (mapcar
- (function (lambda (cmd) (if (string-match "-I" cmd) cmd)))
- (split-string commands-list))))
-
-(defun company-clang-header-paths (db-path)
- "Provides list of include paths to add to company-clang backend.
-DB-PATH the path to compile_commands.json"
- (-flatten (mapcar
- (function (lambda(cmd-list)
- (get-include-paths cmd-list)))
- (get-commands db-path))))
-
-(provide 'fetch-includes)
-;;; fetch-includes.el ends here