Add terraform andt several more cubes
This commit is contained in:
parent
bc72fe47a4
commit
e3c96baa66
11
Makefile
11
Makefile
|
@ -13,6 +13,7 @@ install-ci:
|
|||
@echo "Creating the link..."
|
||||
@echo "#! /bin/sh" > ./fg42
|
||||
@echo "export FG42_HOME=$(shell pwd)" >> ./fg42
|
||||
@echo "# export LIBRARY_PATH=/path/to/libgccjit.so" >> ./fg42
|
||||
@echo 'emacs --name FG42 --no-site-file --no-site-lisp --no-splash --title FG42 -l $$FG42_HOME/fg42-config.el "$$@"' >> ./fg42
|
||||
@chmod +x ./fg42
|
||||
|
||||
|
@ -28,6 +29,8 @@ install:
|
|||
@cp ./scripts/fg42-wm ./fg42-wm
|
||||
@echo "export FG42_HOME=$(shell pwd)" >> ./fg42
|
||||
@echo "export FG42_HOME=$(shell pwd)" >> ./fg42-wm
|
||||
@echo "# export LIBRARY_PATH=/path/to/libgccjit.so" >> ./fg42
|
||||
@echo "# export LIBRARY_PATH=/path/to/libgccjit.so" >> ./fg42-wm
|
||||
@echo 'FG42_WM=false emacs --name FG42 --no-site-file --no-site-lisp --no-splash --title FG42 -l $$FG42_HOME/fg42-config.el "$$@"' >> ./fg42
|
||||
@echo 'FG42_WM=true emacs --name FG42 --no-site-file --no-site-lisp --no-splash --title FG42 -l $$FG42_HOME/fg42-config.el "$$@"' >> ./fg42-wm
|
||||
@chmod +x ./fg42
|
||||
|
@ -67,9 +70,17 @@ clean:
|
|||
dev-docs: clean
|
||||
./build.el docs
|
||||
|
||||
.PHONY: docs
|
||||
docs:
|
||||
FG42_PROD=true ./build.el docs
|
||||
|
||||
serve: build
|
||||
npx http-server ./build
|
||||
|
||||
.PHONY: deploy-docs
|
||||
deploy-docs: docs
|
||||
rsync -vlcr --delete-after ./build/* core.lxsameer.com:/home/www/public/fg42/
|
||||
|
||||
.PHONY: dummy-x
|
||||
dummy-x:
|
||||
Xephyr -br -ac -noreset -screen 800x600 :1
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
(require 'cubes/org)
|
||||
(require 'cubes/git)
|
||||
(require 'cubes/bookmark)
|
||||
(require 'cubes/terraform)
|
||||
|
||||
;; ============== MY STUFF ==============================
|
||||
(custom-set-faces
|
||||
|
@ -48,10 +49,10 @@
|
|||
(t
|
||||
:background "#bd93f9" :height 0.1 :box nil))))
|
||||
|
||||
(defvar global-font-size 10)
|
||||
(defvar global-font-size 14)
|
||||
|
||||
|
||||
(setq lsp-clients-clangd-executable "~/usr/lib/llvm-13/bin/clangd")
|
||||
(setq lsp-clients-clangd-executable "/home/lxsameer/usr/lib/llvm-13rc2/bin/clangd")
|
||||
(defconst LLVM_DIR "/home/lxsameer/src/serene/llvm-project")
|
||||
(defconst llvm-config-dir (concat LLVM_DIR "/llvm/utils/emacs/"))
|
||||
|
||||
|
@ -114,6 +115,7 @@
|
|||
(fg42/font-cube :font-size global-font-size)
|
||||
(fg42/editor-cube)
|
||||
|
||||
;;(fg42/imenu-cube)
|
||||
(fg42/elisp-cube)
|
||||
(fg42/region-expansion-cube)
|
||||
|
||||
|
@ -131,6 +133,7 @@
|
|||
(fg42/vterm-cube)
|
||||
(fg42/git-cube)
|
||||
(fg42/bookmark-cube)
|
||||
(fg42/terraform-cube :terraform-lsp-path "~/bin/terraform-lsp")
|
||||
(fg42/java-cube)
|
||||
(fg42/yasnippet-cube)
|
||||
;; Themes should be the last cube and anything that wants to manipulate a face
|
||||
|
|
|
@ -43,6 +43,14 @@
|
|||
(setq epa-pinentry-mode 'loopback)
|
||||
(pinentry-start))))
|
||||
|
||||
(defcube fg42/imenu-cube
|
||||
(:docs "cubes/fg42/imenu-cube.org"
|
||||
:flag imenu
|
||||
:flag-default t)
|
||||
(fpkg/use imenu-list
|
||||
:init
|
||||
(global-set-key (kbd "C-'") #'imenu-list-smart-toggle)))
|
||||
|
||||
|
||||
(defcube fg42/exec-path-cube
|
||||
(:docs "cubes/fg42/exec-path-cube.org"
|
||||
|
@ -54,6 +62,14 @@
|
|||
(exec-path-from-shell-initialize))))
|
||||
|
||||
|
||||
(defcube fg42/hl-cube
|
||||
(:docs "cubes/fg42/hl-path-cube.org"
|
||||
:flag hl-line
|
||||
:flag-default t)
|
||||
(require 'hl-line)
|
||||
(global-hl-line-mode))
|
||||
|
||||
|
||||
(defcube fg42/cursor-cube
|
||||
(:docs "cubes/fg42/cursor-cube.org"
|
||||
:flag cursor-type
|
||||
|
@ -209,7 +225,8 @@
|
|||
(fg42/buffer-navigation-cube)
|
||||
(fg42/window-navigation-cube)
|
||||
(fg42/selectrum-cube)
|
||||
(fg42/cursor-cube))
|
||||
(fg42/cursor-cube)
|
||||
(fg42/hl-cube))
|
||||
|
||||
|
||||
(provide 'cubes/editor)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; OrgCube --- The elisp cube for FG42 -*- lexical-binding: t; -*-
|
||||
;;; GitCube --- The Git cube for FG42 -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors
|
||||
;;
|
||||
|
@ -34,7 +34,6 @@
|
|||
:flag git
|
||||
:flag-default t)
|
||||
|
||||
|
||||
(fpkg/use magit
|
||||
:bind (("C-x g" . magit-status)))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; OrgCube --- The elisp cube for FG42 -*- lexical-binding: t; -*-
|
||||
;;; OrgCube --- The org cube for FG42 -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors
|
||||
;;
|
||||
|
@ -49,15 +49,17 @@
|
|||
(setq org-directory org-home)
|
||||
(setq org-default-notes-file notes-file)
|
||||
(setq org-capture-templates
|
||||
'(("t" "Todo" entry (file+headline (expand-file-name "main.org" org-home) "New Tasks")
|
||||
(file (expand-file-name "templates/todo" org-home))
|
||||
(eval
|
||||
`(list
|
||||
'("t" "Todo" entry (file+headline ,(expand-file-name "main.org" org-home) "New Tasks")
|
||||
(file ,(expand-file-name "templates/todo" org-home))
|
||||
:prepend t)
|
||||
("l" "Link" entry (file+headline (expand-file-name "bookmarks.org" org-home) "Links")
|
||||
(file (expand-file-name "templates/links" org-home))
|
||||
'("l" "Link" entry (file+headline ,(expand-file-name "bookmarks.org" org-home) "Links")
|
||||
(file ,(expand-file-name "templates/links" org-home))
|
||||
:prepend t
|
||||
:empty-lines 1)
|
||||
("h" "Thoughts" entry (file+datetree (expand-file-name "journal.org" org-home))
|
||||
(file (expand-file-name "templates/thoughts" org-home)))))
|
||||
'("h" "Thoughts" entry (file+datetree ,(expand-file-name "journal.org" org-home))
|
||||
(file ,(expand-file-name "templates/thoughts" org-home))))))
|
||||
(setq org-refile-targets '((org-agenda-files :maxlevel . 3)))
|
||||
|
||||
(with-eval-after-load "ox-latex"
|
||||
|
@ -68,5 +70,6 @@
|
|||
(unless (server-running-p)
|
||||
(require 'org-protocol))))))
|
||||
|
||||
|
||||
(provide 'cubes/org)
|
||||
;;; org.el ends here
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
;;; Terraform --- The terraform cube for FG42 -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors
|
||||
;;
|
||||
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
||||
;; URL: https://gitlab.com/FG42/FG42
|
||||
;; Version: 3.0.0
|
||||
;;
|
||||
;; 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 <http://www.gnu.org/licenses/>.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;; Cubes are the building blocks of any `FG42' editor. Each `cube' is a
|
||||
;; unit which defines different abilities in a deterministic and idempotent
|
||||
;; way. Cubes are composable and a composition of cubes creates an editor.
|
||||
;;
|
||||
;;; Code:
|
||||
(require 'fpkg)
|
||||
(require 'fg42/cube)
|
||||
|
||||
|
||||
(defcube fg42/terraform-cube
|
||||
(:docs "cubes/fg42/terraform-cube.org"
|
||||
:flag terraform
|
||||
:flag-default t)
|
||||
|
||||
;; https://github.com/juliosueiras/terraform-lsp is required
|
||||
(let ((terraform-lsp (or (plist-get fg42/terraform-cube-params :terraform-lsp-path) "terraform-lsp"))
|
||||
(lsp-flags (or (plist-get fg42/terraform-cube-params :terraform-lsp-flags) "-enable-log-file")))
|
||||
(fpkg/use terraform-mode
|
||||
:config
|
||||
(progn
|
||||
(when-flag lsp
|
||||
(require 'lsp)
|
||||
(add-to-list 'lsp-language-id-configuration '(terraform-mode . "terraform"))
|
||||
|
||||
(lsp-register-client
|
||||
(make-lsp-client :new-connection (lsp-stdio-connection (list terraform-lsp lsp-flags))
|
||||
:major-modes '(terraform-mode)
|
||||
:server-id 'terraform-ls))
|
||||
|
||||
(add-hook 'terraform-mode-hook #'lsp))))))
|
||||
|
||||
|
||||
(provide 'cubes/terraform)
|
||||
;;; terraform.el ends here
|
1
dev.org
1
dev.org
|
@ -48,6 +48,7 @@ On the first level, I should feel comfortable with it.
|
|||
(package-install 'exec-path-from-shell)
|
||||
(exec-path-from-shell-initialize)
|
||||
#+END_SRC
|
||||
** TODO Integrate window-purpose mode
|
||||
** TODO Turn on yasnippet mode for Go mode
|
||||
* Things that didn't work out
|
||||
- rbenv
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
;;
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(setq debug-on-error t)
|
||||
(defvar fg42-v3 (string= (or (getenv "FG42_V3") "false") "true"))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue