1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:40:04 +08:00

feat(lang#vala): add lang#vala layer

close https://github.com/SpaceVim/SpaceVim/issues/4525
This commit is contained in:
Shidong Wang 2021-11-21 20:48:53 +08:00
parent 5f37a4014f
commit ce7652a7ac
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
2 changed files with 123 additions and 21 deletions

View File

@ -0,0 +1,64 @@
"=============================================================================
" pascal.vim --- vlang language support in SpaceVim
" Copyright (c) 2016-2021 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
""
" @section lang#vala, layers-lang-vala
" @parentsection layers
" This layer is for v development, disabled by default, to enable this
" layer, add following snippet to your SpaceVim configuration file.
" >
" [[layers]]
" name = 'lang#vala'
" <
" @subsection Enable language server
"
" To enable lsp layer for vala language. you need to install
" vala-language-server, for example, use AUR in Arch Linux.
" >
" yay -S vala-language-server
" <
" If you are using `nvim(>=0.5.0)`. You need to use `enabled_clients`
" to specific the language servers. For example:
" >
" [[layers]]
" name = 'lsp'
" enabled_clients = ['vala_ls']
" <
" If you are using `nvim(<0.5.0)` or `vim`, you need to use `override_cmd`
" option. For example:
" >
" [[layers]]
" name = "lsp"
" filetypes = [
" "vala",
" "genie",
" ]
" [layers.override_cmd]
" vala = ["vala-language-server"]
" genie = ["vala-language-server"]
" <
function! SpaceVim#layers#lang#vala#plugins() abort
let plugins = []
call add(plugins, ['arrufat/vala.vim', {'merged' : 0}])
return plugins
endfunction
function! SpaceVim#layers#lang#vala#config() abort
call SpaceVim#mapping#space#regesit_lang_mappings('vala', function('s:language_specified_mappings'))
endfunction
function! s:language_specified_mappings() abort
endfunction
function! SpaceVim#layers#lang#vala#health() abort
call SpaceVim#layers#lang#vala#plugins()
call SpaceVim#layers#lang#vala#config()
return 1
endfunction

View File

@ -184,27 +184,28 @@ CONTENTS *SpaceVim-contents*
97. lang#toml................................|SpaceVim-layers-lang-toml|
98. lang#typescript....................|SpaceVim-layers-lang-typescript|
99. lang#v......................................|SpaceVim-layers-lang-v|
100. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
101. lang#vim.................................|SpaceVim-layers-lang-vim|
102. lang#vue.................................|SpaceVim-layers-lang-vue|
103. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
104. lang#xml.................................|SpaceVim-layers-lang-xml|
105. lang#xquery...........................|SpaceVim-layers-lang-xquery|
106. lang#zig.................................|SpaceVim-layers-lang-zig|
107. language server protocol......................|SpaceVim-layers-lsp|
108. leaderf...................................|SpaceVim-layers-leaderf|
109. mail.........................................|SpaceVim-layers-mail|
110. operator.................................|SpaceVim-layers-operator|
111. shell.......................................|SpaceVim-layers-shell|
112. ssh...........................................|SpaceVim-layers-ssh|
113. test.........................................|SpaceVim-layers-test|
114. tmux.........................................|SpaceVim-layers-tmux|
115. tools#dash.............................|SpaceVim-layers-tools-dash|
116. tools#mpv...............................|SpaceVim-layers-tools-mpv|
117. tools#zeal.............................|SpaceVim-layers-tools-zeal|
118. treesitter.............................|SpaceVim-layers-treesitter|
119. ui.............................................|SpaceVim-layers-ui|
120. unite.......................................|SpaceVim-layers-unite|
100. lang#vala...............................|SpaceVim-layers-lang-vala|
101. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
102. lang#vim.................................|SpaceVim-layers-lang-vim|
103. lang#vue.................................|SpaceVim-layers-lang-vue|
104. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
105. lang#xml.................................|SpaceVim-layers-lang-xml|
106. lang#xquery...........................|SpaceVim-layers-lang-xquery|
107. lang#zig.................................|SpaceVim-layers-lang-zig|
108. language server protocol......................|SpaceVim-layers-lsp|
109. leaderf...................................|SpaceVim-layers-leaderf|
110. mail.........................................|SpaceVim-layers-mail|
111. operator.................................|SpaceVim-layers-operator|
112. shell.......................................|SpaceVim-layers-shell|
113. ssh...........................................|SpaceVim-layers-ssh|
114. test.........................................|SpaceVim-layers-test|
115. tmux.........................................|SpaceVim-layers-tmux|
116. tools#dash.............................|SpaceVim-layers-tools-dash|
117. tools#mpv...............................|SpaceVim-layers-tools-mpv|
118. tools#zeal.............................|SpaceVim-layers-tools-zeal|
119. treesitter.............................|SpaceVim-layers-treesitter|
120. ui.............................................|SpaceVim-layers-ui|
121. unite.......................................|SpaceVim-layers-unite|
7. Usage....................................................|SpaceVim-usage|
1. buffers-and-files..................|SpaceVim-usage-buffers-and-files|
2. custom_plugins........................|SpaceVim-usage-custom_plugins|
@ -4448,6 +4449,43 @@ This layer also provides REPL support for v, the key bindings are:
<
==============================================================================
LANG#VALA *SpaceVim-layers-lang-vala*
This layer is for v development, disabled by default, to enable this layer,
add following snippet to your SpaceVim configuration file.
>
[[layers]]
name = 'lang#vala'
<
ENABLE LANGUAGE SERVER
To enable lsp layer for vala language. you need to install
vala-language-server, for example, use AUR in Arch Linux.
>
yay -S vala-language-server
<
If you are using `nvim(>=0.5.0)`. You need to use `enabled_clients` to
specific the language servers. For example:
>
[[layers]]
name = 'lsp'
enabled_clients = ['vala_ls']
<
If you are using `nvim(<0.5.0)` or `vim`, you need to use `override_cmd`
option. For example:
>
[[layers]]
name = "lsp"
filetypes = [
"vala",
"genie",
]
[layers.override_cmd]
vala = ["vala-language-server"]
genie = ["vala-language-server"]
<
==============================================================================
LANG#VBNET *SpaceVim-layers-lang-vbnet*