Merge branch 'master' of github.com:FG42/FG42

This commit is contained in:
Keyvan Hedayati 2015-07-21 15:46:48 +04:30
commit 3898b72bab
16 changed files with 121 additions and 18 deletions

View File

@ -1,3 +0,0 @@
#! /bin/sh
emacs -Q --no-splash --name KusoIDE --title KusoIDE -q -l --PATH--/kuso.config.el "$@"

View File

@ -1,10 +1,13 @@
(add-to-list 'load-path (concat (getenv "FG42_HOME") "/lib"))
(toggle-debug-on-error)
;(toggle-debug-on-error)
(require 'fg42)
;; Load the default theme
(theme themes/color-theme-monokai)
;; Disable abilities which we do not want to load
(disable 'rbenv 'helm)
;; Activate these extensions
(activate-extensions 'editor
'development
@ -15,9 +18,6 @@
'python
'ruby)
;; Disable abilities which we do not want to load
(disable 'rbenv)
;; Load user config file in ~/.fg42
(load-user-config "~/.fg42")

View File

@ -3,12 +3,18 @@
(require 'extensions/editor/init)
;; Dependencies ----------------------------------
(depends-on 'ido)
(depends-on 'ido-vertical-mode)
(depends-on 'multiple-cursors)
(depends-on 'expand-region)
(depends-on 'flx-ido)
(depends-on 'dired+)
(depends-on 'ov)
(with-ability ido
(depends-on 'ido)
(depends-on 'ido-vertical-mode)
(depends-on 'flx-ido))
(with-ability helm
(depends-on 'helm))
;; Extension -------------------------------------
(extension editor

View File

@ -94,16 +94,43 @@
(hs-minor-mode)
;; IDO configurations ---------------------------------------------
(require 'flx-ido)
(require 'ido-vertical-mode)
(ido-mode t)
(ido-everywhere t)
(flx-ido-mode 1)
(setq ido-use-faces nil)
(with-ability ido
(require 'flx-ido)
(require 'ido-vertical-mode)
(setq ido-enable-flex-matching t)
(ido-vertical-mode 1)
(ido-mode t)
(ido-everywhere t)
(flx-ido-mode 1)
(setq ido-use-faces nil)
(setq ido-use-filename-at-point 'guess)
(setq ido-enable-flex-matching t)
(ido-vertical-mode 1))
;; Helm -----------------------------------------------------
(with-ability helm
(require 'helm)
(global-set-key (kbd "C-c h") 'helm-command-prefix)
(global-unset-key (kbd "C-x c"))
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to run persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
(define-key helm-map (kbd "C-z") 'helm-select-action) ; list actions using C-z
(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))
(setq helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source.
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.
helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior>
helm-ff-file-name-history-use-recentf t)
(helm-mode 1))
;; Session Management ---------------------------------------
(desktop-save-mode 1)
;; Backup files ---------------------------------------------

View File

@ -4,6 +4,9 @@
(require 'jquery-doc)
(js2-minor-mode t)
;; FIXME: don't hard code the indent size
(setq js2-basic-offset 2)
(tern-mode t)
(jquery-doc-setup))

View File

@ -8,12 +8,16 @@
'company-backends) '(company-web-html))
(define-key web-mode-map (kbd "C-'") 'company-web-html))
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(setq web-mode-markup-indent-offset 2))
;;;###autoload
(defun extensions/web-activate-modes ()
"Activate necessary modes"
(setq css-indent-offset 2)
(with-ability rainbow
(rainbow-mode t))

View File

@ -26,6 +26,7 @@
;;; Code:
(require 'fpkg)
(require 'fg42/base)
(require 'fg42/splash)
(defvar fg42-home (getenv "FG42_HOME")
"The pass to fg42-home")

65
lib/fg42/splash.el Normal file
View File

@ -0,0 +1,65 @@
(defconst fg42-about-text
`("FG42")
"A list of texts to show in the middle part of the About screen.
Each element in the list should be a list of strings or pairs
`:face FACE', like `fancy-splash-insert' accepts them.")
;; Vars ------------------------------
(defvar fg42-logo-image (concat (getenv "FG42_HOME") "/assets/images/logo.png")
"Default fg42 logo")
;; Functions -------------------------
(defun fg42-about-screen ()
"Display fancy About screen."
(interactive)
(let ((frame (fancy-splash-frame)))
(save-selected-window
(select-frame frame)
(switch-to-buffer "*FG42 About*")
(setq buffer-undo-list t)
(let ((inhibit-read-only t))
(erase-buffer)
(if pure-space-overflow
(insert pure-space-overflow-message))
;(fg42-splash-head)
(dolist (text fg42-about-text)
;(apply #'fancy-splash-insert text)
(insert (propertize text 'display `(space :align-to (+ center 5))))
(insert "\n"))
(set-buffer-modified-p nil)
(goto-char (point-min))
(force-mode-line-update))
(use-local-map splash-screen-keymap)
(setq-local browse-url-browser-function 'eww-browse-url)
(setq tab-width 22)
(setq buffer-read-only t)
(goto-char (point-min))
(forward-line 3))))
(defun fg42-splash-head ()
"Insert the head part of the splash screen into the current buffer."
(let* ((img (create-image fg42-logo-image))
(image-width (and img (car (image-size img))))
(window-width (window-width)))
(when img
(when (> window-width image-width)
;; Center the image in the window.
(insert (propertize " " 'display
`(space :align-to (+ center (-0.5 . ,img)))))
;; Change the color of the XPM version of the splash image
;; so that it is visible with a dark frame background.
(when (and (memq 'xpm img)
(eq (frame-parameter nil 'background-mode) 'dark))
(setq img (append img '(:color-symbols (("#000000" . "gray30"))))))
;; Insert the image with a help-echo and a link.
(make-button (prog1 (point) (insert-image img)) (point)
'face 'default
'help-echo "mouse-2, RET: Browse http://www.gnu.org/"
'action (lambda (_button) (browse-url "http://www.gnu.org/"))
'follow-link t)
(insert "\n\n")))))
(provide 'fg42/splash)

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 765 B

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB