From 40449b13bca9ac4277d903851a0a02b118d53663 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Wed, 7 Feb 2018 13:49:44 +0800 Subject: [PATCH] Improve ocaml layer --- autoload/SpaceVim/layers/lang/ocaml.vim | 3 ++ config/plugins/deoplete.vim | 3 ++ doc/SpaceVim.txt | 72 +++++++++++++++++-------- docs/layers/lang/ocaml.md | 17 +++--- 4 files changed, 63 insertions(+), 32 deletions(-) diff --git a/autoload/SpaceVim/layers/lang/ocaml.vim b/autoload/SpaceVim/layers/lang/ocaml.vim index 9271995a5..8a97e385e 100644 --- a/autoload/SpaceVim/layers/lang/ocaml.vim +++ b/autoload/SpaceVim/layers/lang/ocaml.vim @@ -12,6 +12,9 @@ function! SpaceVim#layers#lang#ocaml#plugins() abort let plugins = [] call add(plugins, ['ocaml/merlin', {'on_ft' : 'ocaml', 'rtp' : 'vim/merlin'}]) + if g:spacevim_autocomplete_method ==# 'deoplete' + call add(plugins, ['copy/deoplete-ocaml']) + endif return plugins endfunction diff --git a/config/plugins/deoplete.vim b/config/plugins/deoplete.vim index a9ef10164..4c288d9f6 100644 --- a/config/plugins/deoplete.vim +++ b/config/plugins/deoplete.vim @@ -99,6 +99,9 @@ let g:deoplete#ignore_sources.vim = get(g:deoplete#ignore_sources, 'vim', ['tag' " clojure let g:deoplete#keyword_patterns.clojure = '[\w!$%&*+/:<=>?@\^_~\-\.#]*' +" ocaml +let g:deoplete#ignore_sources.ocaml = ['buffer', 'around', 'omni'] + " public settings call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy']) call deoplete#custom#set('file/include', 'matchers', 'matcher_head') diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 369c1bda0..b9945acf4 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -28,29 +28,30 @@ CONTENTS *SpaceVim-contents* 5. core#tabline............................|SpaceVim-layer-core-tabline| 6. exprfold....................................|SpaceVim-layer-exprfold| 7. format..............................................|SpaceVim-format| - 8. incsearch..................................|SpaceVim-layer-incsearch| - 9. indentmove................................|SpaceVim-layer-indentmove| - 10. lang#c.......................................|SpaceVim-layer-lang-c| - 11. lang#crystal...........................|SpaceVim-layer-lang-crystal| - 12. lang#elixir.............................|SpaceVim-layer-lang-elixir| - 13. lang#go.....................................|SpaceVim-layer-lang-go| - 14. lang#java.................................|SpaceVim-layer-lang-java| - 15. lang#julia...............................|SpaceVim-layer-lang-julia| - 16. lang#kotlin.............................|SpaceVim-layer-lang-kotlin| - 17. lang#lua...................................|SpaceVim-layer-lang-lua| - 18. lang#ocaml...............................|SpaceVim-layer-lang-ocaml| - 19. lang#php...................................|SpaceVim-layer-lang-php| - 20. lang#pony.................................|SpaceVim-layer-lang-pony| - 21. lang#puppet.............................|SpaceVim-layer-lang-puppet| - 22. lang#python.............................|SpaceVim-layer-lang-python| - 23. lang#rust.................................|SpaceVim-layer-lang-rust| - 24. lang#scala...............................|SpaceVim-layer-lang-scala| - 25. lang#tmux.................................|SpaceVim-layer-lang-tmux| - 26. lang#xml...................................|SpaceVim-layer-lang-xml| - 27. operator...................................|SpaceVim-layer-operator| - 28. shell.........................................|SpaceVim-layer-shell| - 29. tmux...........................................|SpaceVim-layer-tmux| - 30. tools#dash...............................|SpaceVim-layer-tools-dash| + 8. github........................................|SpaceVim-layer-github| + 9. incsearch..................................|SpaceVim-layer-incsearch| + 10. indentmove...............................|SpaceVim-layer-indentmove| + 11. lang#c.......................................|SpaceVim-layer-lang-c| + 12. lang#crystal...........................|SpaceVim-layer-lang-crystal| + 13. lang#elixir.............................|SpaceVim-layer-lang-elixir| + 14. lang#go.....................................|SpaceVim-layer-lang-go| + 15. lang#java.................................|SpaceVim-layer-lang-java| + 16. lang#julia...............................|SpaceVim-layer-lang-julia| + 17. lang#kotlin.............................|SpaceVim-layer-lang-kotlin| + 18. lang#lua...................................|SpaceVim-layer-lang-lua| + 19. lang#ocaml...............................|SpaceVim-layer-lang-ocaml| + 20. lang#php...................................|SpaceVim-layer-lang-php| + 21. lang#pony.................................|SpaceVim-layer-lang-pony| + 22. lang#puppet.............................|SpaceVim-layer-lang-puppet| + 23. lang#python.............................|SpaceVim-layer-lang-python| + 24. lang#rust.................................|SpaceVim-layer-lang-rust| + 25. lang#scala...............................|SpaceVim-layer-lang-scala| + 26. lang#tmux.................................|SpaceVim-layer-lang-tmux| + 27. lang#xml...................................|SpaceVim-layer-lang-xml| + 28. operator...................................|SpaceVim-layer-operator| + 29. shell.........................................|SpaceVim-layer-shell| + 30. tmux...........................................|SpaceVim-layer-tmux| + 31. tools#dash...............................|SpaceVim-layer-tools-dash| 6. API........................................................|SpaceVim-api| 1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu| 2. data#list....................................|SpaceVim-api-data-list| @@ -489,6 +490,13 @@ is on, if any. *g:ale_echo_delay* w0rp/ale {{{ + *g:github_issues_no_omni* +jaxbot/github-issues.vim {{{ Disable completion by github-issues.vim. Because +github-complete.vim provides more powerful completion. + + *g:github_dashboard* +junegunn/vim-github-dashboard {{{ + *g:dash_map* rizzatti/dash.vim {{{ Allows configuration of mappings between Vim filetypes and Dash's docsets. @@ -753,6 +761,24 @@ FORMAT *SpaceVim-format* SpaceVim uses neoformat as the default code format tools. Neoformat uses a variety of formatters for many filetypes. for more info see |neoformat| +============================================================================== +GITHUB *SpaceVim-layer-github* + +This layer provides GitHub integration for SpaceVim + +MAPPINGS + +> + Mode Key Function + ------------------------------------------------------------- + normal SPC g h i show issues + normal SPC g h a show activities + normal SPC g h d show dashboard + normal SPC g h f show current file in browser + normal SPC g h I show issues in browser + normal SPC g h p show PRs in browser +< + ============================================================================== INCSEARCH *SpaceVim-layer-incsearch* diff --git a/docs/layers/lang/ocaml.md b/docs/layers/lang/ocaml.md index 6216daf60..fb86dd1bb 100644 --- a/docs/layers/lang/ocaml.md +++ b/docs/layers/lang/ocaml.md @@ -1,14 +1,6 @@ -"============================================================================= -" ocaml.md --- OCaml layer file for SpaceVim -" Copyright (c) 2012-2016 Shidong Wang & Contributors -" Author: -" URL: https://spacevim.org -" License: MIT license -"============================================================================= - --- title: "SpaceVim lang#ocaml layer" -description: "This layer is for OCaml development" +description: "This layer is for Python development, provide autocompletion, syntax checking, code format for ocaml file." --- # [SpaceVim Layers:](https://spacevim.org/layers) lang#ocaml @@ -18,6 +10,7 @@ description: "This layer is for OCaml development" - [Description](#description) - [Install](#install) - [Features](#features) +- [Key bindings](#key-bindings) @@ -36,3 +29,9 @@ To use this configuration layer, add `call SpaceVim#layers#load('lang#ocaml')` t - auto-completion - syntax checking - goto definition + +## Key bindings + +| Key Binding | Description | +| ----------- | --------------------------------------------------------- | +| `gd` | jump at the definition of the identifier under the cursor |