mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:30:03 +08:00
feat(lang#vala): add lang#vala
layer
close https://github.com/SpaceVim/SpaceVim/issues/4525
This commit is contained in:
parent
5f37a4014f
commit
ce7652a7ac
64
autoload/SpaceVim/layers/lang/vala.vim
Normal file
64
autoload/SpaceVim/layers/lang/vala.vim
Normal 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
|
||||||
|
|
@ -184,27 +184,28 @@ CONTENTS *SpaceVim-contents*
|
|||||||
97. lang#toml................................|SpaceVim-layers-lang-toml|
|
97. lang#toml................................|SpaceVim-layers-lang-toml|
|
||||||
98. lang#typescript....................|SpaceVim-layers-lang-typescript|
|
98. lang#typescript....................|SpaceVim-layers-lang-typescript|
|
||||||
99. lang#v......................................|SpaceVim-layers-lang-v|
|
99. lang#v......................................|SpaceVim-layers-lang-v|
|
||||||
100. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
|
100. lang#vala...............................|SpaceVim-layers-lang-vala|
|
||||||
101. lang#vim.................................|SpaceVim-layers-lang-vim|
|
101. lang#vbnet.............................|SpaceVim-layers-lang-vbnet|
|
||||||
102. lang#vue.................................|SpaceVim-layers-lang-vue|
|
102. lang#vim.................................|SpaceVim-layers-lang-vim|
|
||||||
103. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
|
103. lang#vue.................................|SpaceVim-layers-lang-vue|
|
||||||
104. lang#xml.................................|SpaceVim-layers-lang-xml|
|
104. lang#wolfram.........................|SpaceVim-layers-lang-wolfram|
|
||||||
105. lang#xquery...........................|SpaceVim-layers-lang-xquery|
|
105. lang#xml.................................|SpaceVim-layers-lang-xml|
|
||||||
106. lang#zig.................................|SpaceVim-layers-lang-zig|
|
106. lang#xquery...........................|SpaceVim-layers-lang-xquery|
|
||||||
107. language server protocol......................|SpaceVim-layers-lsp|
|
107. lang#zig.................................|SpaceVim-layers-lang-zig|
|
||||||
108. leaderf...................................|SpaceVim-layers-leaderf|
|
108. language server protocol......................|SpaceVim-layers-lsp|
|
||||||
109. mail.........................................|SpaceVim-layers-mail|
|
109. leaderf...................................|SpaceVim-layers-leaderf|
|
||||||
110. operator.................................|SpaceVim-layers-operator|
|
110. mail.........................................|SpaceVim-layers-mail|
|
||||||
111. shell.......................................|SpaceVim-layers-shell|
|
111. operator.................................|SpaceVim-layers-operator|
|
||||||
112. ssh...........................................|SpaceVim-layers-ssh|
|
112. shell.......................................|SpaceVim-layers-shell|
|
||||||
113. test.........................................|SpaceVim-layers-test|
|
113. ssh...........................................|SpaceVim-layers-ssh|
|
||||||
114. tmux.........................................|SpaceVim-layers-tmux|
|
114. test.........................................|SpaceVim-layers-test|
|
||||||
115. tools#dash.............................|SpaceVim-layers-tools-dash|
|
115. tmux.........................................|SpaceVim-layers-tmux|
|
||||||
116. tools#mpv...............................|SpaceVim-layers-tools-mpv|
|
116. tools#dash.............................|SpaceVim-layers-tools-dash|
|
||||||
117. tools#zeal.............................|SpaceVim-layers-tools-zeal|
|
117. tools#mpv...............................|SpaceVim-layers-tools-mpv|
|
||||||
118. treesitter.............................|SpaceVim-layers-treesitter|
|
118. tools#zeal.............................|SpaceVim-layers-tools-zeal|
|
||||||
119. ui.............................................|SpaceVim-layers-ui|
|
119. treesitter.............................|SpaceVim-layers-treesitter|
|
||||||
120. unite.......................................|SpaceVim-layers-unite|
|
120. ui.............................................|SpaceVim-layers-ui|
|
||||||
|
121. unite.......................................|SpaceVim-layers-unite|
|
||||||
7. Usage....................................................|SpaceVim-usage|
|
7. Usage....................................................|SpaceVim-usage|
|
||||||
1. buffers-and-files..................|SpaceVim-usage-buffers-and-files|
|
1. buffers-and-files..................|SpaceVim-usage-buffers-and-files|
|
||||||
2. custom_plugins........................|SpaceVim-usage-custom_plugins|
|
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*
|
LANG#VBNET *SpaceVim-layers-lang-vbnet*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user