add glsl-company to shaders layer
This commit is contained in:
parent
0477040f7e
commit
628562f0f7
|
@ -16,6 +16,11 @@ provide highlighting for files ending in:
|
||||||
- =.frag=
|
- =.frag=
|
||||||
- =.geom=
|
- =.geom=
|
||||||
|
|
||||||
|
Also this layer provides completion for =.vert=, =.tesc=, =.tese=, =.geom=,
|
||||||
|
=.frag= and =.comp= shaders via =company-glsl= when [[https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/][=glslangValidator=]] can be
|
||||||
|
found on your system and =auto-completion= layer is enabled. Note that
|
||||||
|
completion is [[https://github.com/Kaali/company-glsl][rather simple]].
|
||||||
|
|
||||||
* Install
|
* Install
|
||||||
To use this configuration layer, add it to your =~.spacemacs=. You will need to
|
To use this configuration layer, add it to your =~.spacemacs=. You will need to
|
||||||
add =shaders= to the existing =dotspacemacs-configuration-layers= list in this
|
add =shaders= to the existing =dotspacemacs-configuration-layers= list in this
|
||||||
|
|
14
layers/+lang/shaders/config.el
Normal file
14
layers/+lang/shaders/config.el
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
;;; config.el --- Shaders Layer configuration File for Spacemacs
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
||||||
|
;;
|
||||||
|
;; Author: Boris Buliga <boris@d12frosted.io>
|
||||||
|
;; URL: https://github.com/syl20bnr/spacemacs
|
||||||
|
;;
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
;;
|
||||||
|
;;; License: GPLv3
|
||||||
|
|
||||||
|
;; Variables
|
||||||
|
|
||||||
|
(spacemacs|defvar-company-backends glsl-mode)
|
|
@ -8,7 +8,25 @@
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
;;
|
;;
|
||||||
;;; License: GLPv3
|
;;; License: GLPv3
|
||||||
(setq shaders-packages '(glsl-mode))
|
(setq shaders-packages
|
||||||
|
'(glsl-mode
|
||||||
|
company
|
||||||
|
(company-glsl
|
||||||
|
:location (recipe
|
||||||
|
:fetcher github
|
||||||
|
:repo "Kaali/company-glsl")
|
||||||
|
:toggle (and (configuration-layer/package-usedp 'company)
|
||||||
|
(executable-find "glslangValidator")))))
|
||||||
|
|
||||||
|
(defun shaders/post-init-company ()
|
||||||
|
(spacemacs|add-company-hook glsl-mode))
|
||||||
|
|
||||||
|
(defun shaders/init-company-glsl ()
|
||||||
|
(use-package company-glsl
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(push 'company-glsl
|
||||||
|
company-backends-glsl-mode)))
|
||||||
|
|
||||||
(defun shaders/init-glsl-mode ()
|
(defun shaders/init-glsl-mode ()
|
||||||
"Initialize GLSL mode"
|
"Initialize GLSL mode"
|
||||||
|
|
Loading…
Reference in a new issue