1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00

Improve ocaml layer

This commit is contained in:
wsdjeg 2018-02-07 13:49:44 +08:00
parent 265ae055b3
commit 40449b13bc
4 changed files with 63 additions and 32 deletions

View File

@ -12,6 +12,9 @@
function! SpaceVim#layers#lang#ocaml#plugins() abort function! SpaceVim#layers#lang#ocaml#plugins() abort
let plugins = [] let plugins = []
call add(plugins, ['ocaml/merlin', {'on_ft' : 'ocaml', 'rtp' : 'vim/merlin'}]) 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 return plugins
endfunction endfunction

View File

@ -99,6 +99,9 @@ let g:deoplete#ignore_sources.vim = get(g:deoplete#ignore_sources, 'vim', ['tag'
" clojure " clojure
let g:deoplete#keyword_patterns.clojure = '[\w!$%&*+/:<=>?@\^_~\-\.#]*' let g:deoplete#keyword_patterns.clojure = '[\w!$%&*+/:<=>?@\^_~\-\.#]*'
" ocaml
let g:deoplete#ignore_sources.ocaml = ['buffer', 'around', 'omni']
" public settings " public settings
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy']) call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy'])
call deoplete#custom#set('file/include', 'matchers', 'matcher_head') call deoplete#custom#set('file/include', 'matchers', 'matcher_head')

View File

@ -28,29 +28,30 @@ CONTENTS *SpaceVim-contents*
5. core#tabline............................|SpaceVim-layer-core-tabline| 5. core#tabline............................|SpaceVim-layer-core-tabline|
6. exprfold....................................|SpaceVim-layer-exprfold| 6. exprfold....................................|SpaceVim-layer-exprfold|
7. format..............................................|SpaceVim-format| 7. format..............................................|SpaceVim-format|
8. incsearch..................................|SpaceVim-layer-incsearch| 8. github........................................|SpaceVim-layer-github|
9. indentmove................................|SpaceVim-layer-indentmove| 9. incsearch..................................|SpaceVim-layer-incsearch|
10. lang#c.......................................|SpaceVim-layer-lang-c| 10. indentmove...............................|SpaceVim-layer-indentmove|
11. lang#crystal...........................|SpaceVim-layer-lang-crystal| 11. lang#c.......................................|SpaceVim-layer-lang-c|
12. lang#elixir.............................|SpaceVim-layer-lang-elixir| 12. lang#crystal...........................|SpaceVim-layer-lang-crystal|
13. lang#go.....................................|SpaceVim-layer-lang-go| 13. lang#elixir.............................|SpaceVim-layer-lang-elixir|
14. lang#java.................................|SpaceVim-layer-lang-java| 14. lang#go.....................................|SpaceVim-layer-lang-go|
15. lang#julia...............................|SpaceVim-layer-lang-julia| 15. lang#java.................................|SpaceVim-layer-lang-java|
16. lang#kotlin.............................|SpaceVim-layer-lang-kotlin| 16. lang#julia...............................|SpaceVim-layer-lang-julia|
17. lang#lua...................................|SpaceVim-layer-lang-lua| 17. lang#kotlin.............................|SpaceVim-layer-lang-kotlin|
18. lang#ocaml...............................|SpaceVim-layer-lang-ocaml| 18. lang#lua...................................|SpaceVim-layer-lang-lua|
19. lang#php...................................|SpaceVim-layer-lang-php| 19. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
20. lang#pony.................................|SpaceVim-layer-lang-pony| 20. lang#php...................................|SpaceVim-layer-lang-php|
21. lang#puppet.............................|SpaceVim-layer-lang-puppet| 21. lang#pony.................................|SpaceVim-layer-lang-pony|
22. lang#python.............................|SpaceVim-layer-lang-python| 22. lang#puppet.............................|SpaceVim-layer-lang-puppet|
23. lang#rust.................................|SpaceVim-layer-lang-rust| 23. lang#python.............................|SpaceVim-layer-lang-python|
24. lang#scala...............................|SpaceVim-layer-lang-scala| 24. lang#rust.................................|SpaceVim-layer-lang-rust|
25. lang#tmux.................................|SpaceVim-layer-lang-tmux| 25. lang#scala...............................|SpaceVim-layer-lang-scala|
26. lang#xml...................................|SpaceVim-layer-lang-xml| 26. lang#tmux.................................|SpaceVim-layer-lang-tmux|
27. operator...................................|SpaceVim-layer-operator| 27. lang#xml...................................|SpaceVim-layer-lang-xml|
28. shell.........................................|SpaceVim-layer-shell| 28. operator...................................|SpaceVim-layer-operator|
29. tmux...........................................|SpaceVim-layer-tmux| 29. shell.........................................|SpaceVim-layer-shell|
30. tools#dash...............................|SpaceVim-layer-tools-dash| 30. tmux...........................................|SpaceVim-layer-tmux|
31. tools#dash...............................|SpaceVim-layer-tools-dash|
6. API........................................................|SpaceVim-api| 6. API........................................................|SpaceVim-api|
1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu| 1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu|
2. data#list....................................|SpaceVim-api-data-list| 2. data#list....................................|SpaceVim-api-data-list|
@ -489,6 +490,13 @@ is on, if any.
*g:ale_echo_delay* *g:ale_echo_delay*
w0rp/ale {{{ 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* *g:dash_map*
rizzatti/dash.vim {{{ Allows configuration of mappings between Vim filetypes rizzatti/dash.vim {{{ Allows configuration of mappings between Vim filetypes
and Dash's docsets. and Dash's docsets.
@ -753,6 +761,24 @@ FORMAT *SpaceVim-format*
SpaceVim uses neoformat as the default code format tools. Neoformat uses a SpaceVim uses neoformat as the default code format tools. Neoformat uses a
variety of formatters for many filetypes. for more info see |neoformat| 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* INCSEARCH *SpaceVim-layer-incsearch*

View File

@ -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" 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 # [SpaceVim Layers:](https://spacevim.org/layers) lang#ocaml
@ -18,6 +10,7 @@ description: "This layer is for OCaml development"
- [Description](#description) - [Description](#description)
- [Install](#install) - [Install](#install)
- [Features](#features) - [Features](#features)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc --> <!-- vim-markdown-toc -->
@ -36,3 +29,9 @@ To use this configuration layer, add `call SpaceVim#layers#load('lang#ocaml')` t
- auto-completion - auto-completion
- syntax checking - syntax checking
- goto definition - goto definition
## Key bindings
| Key Binding | Description |
| ----------- | --------------------------------------------------------- |
| `gd` | jump at the definition of the identifier under the cursor |