def-docset
This commit is contained in:
parent
99e2e4c5ea
commit
ec9c12e17e
20 changed files with 42 additions and 21 deletions
|
@ -75,12 +75,10 @@
|
||||||
|
|
||||||
(use-package helm-dash
|
(use-package helm-dash
|
||||||
:when (not IS-WINDOWS)
|
:when (not IS-WINDOWS)
|
||||||
:commands (helm-dash helm-dash-at-point helm-dash-install-docset def-docset!)
|
:commands (helm-dash helm-dash-at-point helm-dash-install-docset)
|
||||||
:config
|
:config
|
||||||
(setq helm-dash-browser-func 'doom/dash-open
|
(setq helm-dash-browser-func 'doom/dash-open
|
||||||
helm-dash-candidate-format "%d → %n (%t)")
|
helm-dash-candidate-format "%d → %n (%t)"))
|
||||||
(defmacro def-docset! (mode docsets)
|
|
||||||
`(add-hook! ,mode (setq-local helm-dash-docsets ',docsets))))
|
|
||||||
|
|
||||||
(use-package helm-tags
|
(use-package helm-tags
|
||||||
:commands (helm-tags-get-tag-file helm-etags-select))
|
:commands (helm-tags-get-tag-file helm-etags-select))
|
||||||
|
|
8
core/defuns/macros-dash.el
Normal file
8
core/defuns/macros-dash.el
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
;;; macros-dash.el
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defmacro def-docset! (mode docsets)
|
||||||
|
`(add-hook! ,mode (setq-local helm-dash-docsets ',docsets)))
|
||||||
|
|
||||||
|
(provide 'macros-dash)
|
||||||
|
;;; macros-dash.el ends here
|
|
@ -24,8 +24,8 @@
|
||||||
:config
|
:config
|
||||||
(def-electric! (c-mode c++-mode objc-mode) :chars (?\n ?\}))
|
(def-electric! (c-mode c++-mode objc-mode) :chars (?\n ?\}))
|
||||||
(def-company-backend! (c-mode c++-mode objc-mode) (irony-c-headers irony))
|
(def-company-backend! (c-mode c++-mode objc-mode) (irony-c-headers irony))
|
||||||
(def-docset! c-mode "c,sdl,glib,gl2,gl3,gl4,manpages")
|
(def-docset! c-mode ("C" "org.libsdl.sdl20"))
|
||||||
(def-docset! c++-mode "cpp,sdl,net,boost,qt,cvcpp,cocos2dx,c,manpages")
|
(def-docset! c++-mode ("C++" "C" "Boost" "Qt_4" "Qt_5" "Cocos2D" "Cocos2D-X" "org.libsdl.sdl20"))
|
||||||
|
|
||||||
(setq c-tab-always-indent nil
|
(setq c-tab-always-indent nil
|
||||||
c-electric-flag nil)
|
c-electric-flag nil)
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
:mode "\\.cr$"
|
:mode "\\.cr$"
|
||||||
:interpreter "crystal"
|
:interpreter "crystal"
|
||||||
:config
|
:config
|
||||||
|
(def-docset! crystal-mode ("crystal"))
|
||||||
(after! quickrun
|
(after! quickrun
|
||||||
(quickrun-add-command
|
(quickrun-add-command
|
||||||
"crystal" '((:command . "crystal")
|
"crystal" '((:command . "crystal")
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
:config
|
:config
|
||||||
(def-builder! sass-mode doom/sass-build)
|
(def-builder! sass-mode doom/sass-build)
|
||||||
(def-company-backend! sass-mode (css yasnippet))
|
(def-company-backend! sass-mode (css yasnippet))
|
||||||
(def-docset! sass-mode "sass,bourbon")
|
(def-docset! sass-mode ("CSS" "Sass" "Bourbon"))
|
||||||
(push '("sass" "css") projectile-other-file-alist))
|
(push '("sass" "css") projectile-other-file-alist))
|
||||||
|
|
||||||
(use-package scss-mode
|
(use-package scss-mode
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
:config
|
:config
|
||||||
(def-builder! scss-mode doom/scss-build)
|
(def-builder! scss-mode doom/scss-build)
|
||||||
(def-company-backend! scss-mode (css yasnippet))
|
(def-company-backend! scss-mode (css yasnippet))
|
||||||
(def-docset! scss-mode "sass,bourbon")
|
(def-docset! scss-mode ("CSS" "Sass" "Bourbon"))
|
||||||
(push '("scss" "css") projectile-other-file-alist)
|
(push '("scss" "css") projectile-other-file-alist)
|
||||||
(setq scss-compile-at-save nil))
|
(setq scss-compile-at-save nil))
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
(use-package dockerfile-mode :mode "/Dockerfile$"
|
(use-package dockerfile-mode :mode "/Dockerfile$"
|
||||||
:config
|
:config
|
||||||
(def-docset! dockerfile-mode "docker")
|
(def-docset! dockerfile-mode ("Docker"))
|
||||||
(def-builder! dockerfile-mode dockerfile-build-buffer "Dockerfile"))
|
(def-builder! dockerfile-mode dockerfile-build-buffer "Dockerfile"))
|
||||||
|
|
||||||
;; For ROM hacking or debugging
|
;; For ROM hacking or debugging
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
:config
|
:config
|
||||||
(def-builder! go-mode "go build")
|
(def-builder! go-mode "go build")
|
||||||
(def-company-backend! go-mode (go yasnippet))
|
(def-company-backend! go-mode (go yasnippet))
|
||||||
|
(def-docset! go-mode ("Go"))
|
||||||
(def-repl! go-mode gorepl-run)
|
(def-repl! go-mode gorepl-run)
|
||||||
(map! :map go-mode-map
|
(map! :map go-mode-map
|
||||||
:n "gd" 'godef-jump
|
:n "gd" 'godef-jump
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
:init
|
:init
|
||||||
(add-hook! haskell-mode '(interactive-haskell-mode flycheck-mode))
|
(add-hook! haskell-mode '(interactive-haskell-mode flycheck-mode))
|
||||||
:config
|
:config
|
||||||
|
(def-docset! haskell-mode ("Haskell"))
|
||||||
(def-popup! "*debug:haskell*" :size 20)
|
(def-popup! "*debug:haskell*" :size 20)
|
||||||
(def-repl! haskell-mode switch-to-haskell)
|
(def-repl! haskell-mode switch-to-haskell)
|
||||||
(push ".hi" completion-ignored-extensions))
|
(push ".hi" completion-ignored-extensions))
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
;;; module-java.el --- the poster child for carpal tunnel
|
;;; module-java.el --- the poster child for carpal tunnel
|
||||||
|
|
||||||
(after! c-initialization
|
(after! c-initialization
|
||||||
(def-docset! java-mode
|
(def-docset! java-mode ("Java" "Android" "JavaFX")))
|
||||||
"java,droid,javafx,grails,groovy,playjava,spring,cvj,processing,javadoc"))
|
|
||||||
|
|
||||||
(use-package eclim
|
(use-package eclim
|
||||||
:functions (eclim--project-dir eclim--project-name)
|
:functions (eclim--project-dir eclim--project-name)
|
||||||
|
|
|
@ -6,8 +6,11 @@
|
||||||
:init (add-hook 'js2-mode-hook 'tern-mode)
|
:init (add-hook 'js2-mode-hook 'tern-mode)
|
||||||
:config
|
:config
|
||||||
(def-repl! js2-mode nodejs-repl)
|
(def-repl! js2-mode nodejs-repl)
|
||||||
(def-docset! js2-mode "js,javascript,nodejs,angularjs,express,jquery,mongoose")
|
|
||||||
(def-company-backend! js2-mode (tern yasnippet))
|
(def-company-backend! js2-mode (tern yasnippet))
|
||||||
|
(def-docset! js2-mode
|
||||||
|
("JavaScript" "jQuery" "jQuery_Mobile" "jQuery_UI" "AngularJS" "BackboneJS"
|
||||||
|
"D3JS" "EmberJS" "ExtJS" "KnockoutJS" "MarionetteJS" "MomentJS" "NodeJS"
|
||||||
|
"PrototypeJS" "RequireJS" "SailsJS" "UnderscoreJS" "VueJS" "ZeptoJS"))
|
||||||
(def-electric! js2-mode :chars (?\} ?\) ?.) :words ("||" "&&"))
|
(def-electric! js2-mode :chars (?\} ?\) ?.) :words ("||" "&&"))
|
||||||
(setq-default
|
(setq-default
|
||||||
js2-skip-preprocessor-directives t
|
js2-skip-preprocessor-directives t
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
(use-package julia-mode
|
(use-package julia-mode
|
||||||
:mode "\\.jl$"
|
:mode "\\.jl$"
|
||||||
:interpreter "julia"
|
:interpreter "julia"
|
||||||
:config (def-repl! julia-mode doom/julia-repl))
|
:config
|
||||||
|
(def-docset! julia-mode ("Julia"))
|
||||||
|
(def-repl! julia-mode doom/julia-repl))
|
||||||
|
|
||||||
(provide 'module-julia)
|
(provide 'module-julia)
|
||||||
;;; module-julia.el ends here
|
;;; module-julia.el ends here
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
:init (add-hook 'lua-mode-hook 'flycheck-mode)
|
:init (add-hook 'lua-mode-hook 'flycheck-mode)
|
||||||
:config
|
:config
|
||||||
(def-company-backend! lua-mode (lua yasnippet))
|
(def-company-backend! lua-mode (lua yasnippet))
|
||||||
|
(def-docset! lua-mode ("Lua_5.2" "Lua_5.3"))
|
||||||
(def-electric! lua-mode :words ("else" "end"))
|
(def-electric! lua-mode :words ("else" "end"))
|
||||||
(def-repl! lua-mode doom/inf-lua)
|
(def-repl! lua-mode doom/inf-lua)
|
||||||
(sp-with-modes '(lua-mode)
|
(sp-with-modes '(lua-mode)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(def-repl! php-mode php-boris)
|
(def-repl! php-mode php-boris)
|
||||||
(def-docset! php-mode "php,laravel")
|
(def-docset! php-mode ("PHP" "Laravel" "PHPUnit"))
|
||||||
(def-company-backend! php-mode '(php-extras-company company-yasnippet))
|
(def-company-backend! php-mode '(php-extras-company company-yasnippet))
|
||||||
|
|
||||||
(map! :map php-mode-map (:localleader :nv ";" 'doom/append-semicolon))
|
(map! :map php-mode-map (:localleader :nv ";" 'doom/append-semicolon))
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(def-builder! processing-mode processing-sketch-build)
|
(def-builder! processing-mode processing-sketch-build)
|
||||||
|
(def-docset! processing-mode ("Processing"))
|
||||||
(def-popup! "*processing-compilation*" :align below :size 10 :noselect t)
|
(def-popup! "*processing-compilation*" :align below :size 10 :noselect t)
|
||||||
(setq processing-location "/usr/local/bin/processing-java"
|
(setq processing-location "/usr/local/bin/processing-java"
|
||||||
processing-application-dir "/Applications/Processing.app"
|
processing-application-dir "/Applications/Processing.app"
|
||||||
|
|
|
@ -21,10 +21,13 @@
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(def-company-backend! python-mode (anaconda))
|
(def-company-backend! python-mode (anaconda))
|
||||||
(def-docset! python-mode "py,py3,python")
|
(def-docset! python-mode ("OpenCV_Python"))
|
||||||
(def-version-cmd! python-mode "python --version 2>&1 | cut -d' ' -f2")
|
|
||||||
(def-repl! python-mode doom/inf-python)
|
(def-repl! python-mode doom/inf-python)
|
||||||
(define-key python-mode-map (kbd "DEL") nil)) ; interferes with smartparens
|
(def-version-cmd! python-mode "python --version 2>&1 | cut -d' ' -f2")
|
||||||
|
(define-key python-mode-map (kbd "DEL") nil) ; interferes with smartparens
|
||||||
|
(add-hook 'doom-env-version-hook
|
||||||
|
(lambda (v) (when (eq major-mode 'python-mode)
|
||||||
|
(push (if (string-prefix-p "2" v) "Python_2" "Python_3") helm-dash-docsets)))))
|
||||||
|
|
||||||
(use-package anaconda-mode
|
(use-package anaconda-mode
|
||||||
:after python
|
:after python
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:config
|
:config
|
||||||
(def-builder! ruby-mode "rake %s" "Rakefile")
|
(def-builder! ruby-mode "rake %s" "Rakefile")
|
||||||
(def-company-backend! ruby-mode (dabbrev-code))
|
(def-company-backend! ruby-mode (dabbrev-code))
|
||||||
(def-docset! ruby-mode "rb,ruby,rubygem")
|
(def-docset! ruby-mode ("Ruby_2" "Ruby_on_Rails_5"))
|
||||||
(def-electric! ruby-mode :words ("else" "end" "elseif"))
|
(def-electric! ruby-mode :words ("else" "end" "elseif"))
|
||||||
(def-repl! ruby-mode inf-ruby)
|
(def-repl! ruby-mode inf-ruby)
|
||||||
(def-version-cmd! ruby-mode "ruby --version | cut -d' ' -f2")
|
(def-version-cmd! ruby-mode "ruby --version | cut -d' ' -f2")
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
:init (add-hook 'rust-mode-hook 'flycheck-mode)
|
:init (add-hook 'rust-mode-hook 'flycheck-mode)
|
||||||
:config
|
:config
|
||||||
(def-builder! rust-mode "cargo run" "Cargo.toml")
|
(def-builder! rust-mode "cargo run" "Cargo.toml")
|
||||||
(def-builder! toml-mode "cargo run" "Cargo.toml"))
|
(def-builder! toml-mode "cargo run" "Cargo.toml")
|
||||||
|
(def-docset! rust-mode ("Rust")))
|
||||||
|
|
||||||
(use-package flycheck-rust :after rust-mode)
|
(use-package flycheck-rust :after rust-mode)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
:init (add-hook 'scala-mode-hook 'turn-on-eldoc-mode)
|
:init (add-hook 'scala-mode-hook 'turn-on-eldoc-mode)
|
||||||
:config
|
:config
|
||||||
(def-company-backend! scala-mode '(ensime-company (company-yasnippet)))
|
(def-company-backend! scala-mode '(ensime-company (company-yasnippet)))
|
||||||
(def-docset! scala-mode "scala"))
|
(def-docset! scala-mode ("Scala")))
|
||||||
|
|
||||||
(use-package sbt-mode
|
(use-package sbt-mode
|
||||||
:after scala-mode)
|
:after scala-mode)
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
:init (add-hook 'swift-mode-hook 'flycheck-mode)
|
:init (add-hook 'swift-mode-hook 'flycheck-mode)
|
||||||
:config
|
:config
|
||||||
(def-company-backend! swift-mode (sourcekit yasnippet))
|
(def-company-backend! swift-mode (sourcekit yasnippet))
|
||||||
(def-repl! swift-mode swift-mode-run-repl)
|
(def-docset! swift-mode ("Swift"))
|
||||||
|
(def-repl! swift-mode swift-mode-run-repl) ; TODO test this
|
||||||
(after! flycheck (push 'swift flycheck-checkers)))
|
(after! flycheck (push 'swift flycheck-checkers)))
|
||||||
|
|
||||||
(use-package company-sourcekit
|
(use-package company-sourcekit
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
markdown-gfm-additional-languages '("sh"))
|
markdown-gfm-additional-languages '("sh"))
|
||||||
|
|
||||||
:config
|
:config
|
||||||
|
(def-docset! markdown-mode ("Markdown"))
|
||||||
(map! :map markdown-mode-map
|
(map! :map markdown-mode-map
|
||||||
"<backspace>" nil
|
"<backspace>" nil
|
||||||
"<M-left>" nil
|
"<M-left>" nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue