mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:10:07 +08:00
parent
ac5d8fa5fc
commit
797457ee2a
31
autoload/SpaceVim/layers/lang/dockerfile.vim
Normal file
31
autoload/SpaceVim/layers/lang/dockerfile.vim
Normal file
@ -0,0 +1,31 @@
|
||||
"=============================================================================
|
||||
" dockerfile.vim --- layer for editing Dockerfile
|
||||
" Copyright (c) 2016-2017 Wang Shidong & Contributors
|
||||
" Author: Wang Shidong < wsdjeg at 163.com >
|
||||
" URL: https://spacevim.org
|
||||
" License: GPLv3
|
||||
"=============================================================================
|
||||
|
||||
function! SpaceVim#layers#lang#dockerfile#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, ['ekalinin/Dockerfile.vim', {'merged' : 0}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
|
||||
function! SpaceVim#layers#lang#dockerfile#config() abort
|
||||
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('dockerfile', function('s:language_specified_mappings'))
|
||||
|
||||
endfunction
|
||||
|
||||
function! s:language_specified_mappings() abort
|
||||
if SpaceVim#layers#lsp#check_filetype('dockerfile')
|
||||
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
|
||||
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
|
||||
\ 'call SpaceVim#lsp#show_doc()', 'show_document', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
|
||||
\ 'call SpaceVim#lsp#rename()', 'rename symbol', 1)
|
||||
endif
|
||||
endfunction
|
@ -88,6 +88,7 @@ let s:lsp_servers = {
|
||||
\ 'objcpp' : ['clangd'],
|
||||
\ 'dart' : ['dart_language_server'],
|
||||
\ 'go' : ['go-langserver', '-mode', 'stdio'],
|
||||
\ 'dockerfile' : ['docker-langserver', '--stdio'],
|
||||
\ 'rust' : ['rustup', 'run', 'nightly', 'rls'],
|
||||
\ 'python' : ['pyls'],
|
||||
\ 'html' : ['html-languageserver', '--stdio'],
|
||||
|
@ -70,6 +70,7 @@ enable = false
|
||||
| [lang#c](lang/c/) | c/c++/object-c language support for SpaceVim, include code completion, jump to definition, quick runner. |
|
||||
| [lang#csharp](lang/csharp/) | This layer is for csharp development |
|
||||
| [lang#dart](lang/dart/) | This layer is for dart development, provide autocompletion, syntax checking, code format for dart file. |
|
||||
| [lang#dockerfile](lang/dockerfile/) | This layer adds DockerFile to SpaceVim |
|
||||
| [lang#elixir](lang/elixir/) | This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file. |
|
||||
| [lang#go](lang/go/) | This layer is for golang development. It also provides additional language-specific key mappings. |
|
||||
| [lang#haskell](lang/haskell/) | haskell language support for SpaceVim, includes code completion, syntax checking, jumping to definition, also provides language server protocol support for haskell |
|
||||
|
36
docs/layers/lang/dockerfile.md
Normal file
36
docs/layers/lang/dockerfile.md
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "SpaceVim lang#dockerfile layer"
|
||||
description: "This layer adds DockerFile to SpaceVim"
|
||||
---
|
||||
|
||||
# [Available Layers](../../) >> lang#dockerfile
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Features](#features)
|
||||
- [Install](#install)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer adds dockerfile language support to SpaceVim.
|
||||
|
||||
## Features
|
||||
|
||||
- syntax highlighting
|
||||
- lsp support (require [lsp](https://spacevim.org/layers/language-server-protocol/) layer)
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, update custom configuration file with:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "lang#dockerfile"
|
||||
```
|
||||
|
||||
to enable language server protocol, you need to install:
|
||||
|
||||
https://github.com/rcjsuen/dockerfile-language-server-nodejs
|
@ -15,7 +15,8 @@ The next release is v0.9.0.
|
||||
- Add option for disabling parentheses autocompletion ([#1920](https://github.com/SpaceVim/SpaceVim/pull/1920))
|
||||
- Add Docker build of Neovim and SpaceVim ([#1923](https://github.com/SpaceVim/SpaceVim/pull/1923))
|
||||
- Add gist manager vim-gista ([#1936](https://github.com/SpaceVim/SpaceVim/pull/1936))
|
||||
- Add kotlin layer ([#1996](https://github.com/SpaceVim/SpaceVim/pull/1996))
|
||||
- Add lang#kotlin layer ([#1996](https://github.com/SpaceVim/SpaceVim/pull/1996))
|
||||
- Add lang#dockerfile layer ([#2001](https://github.com/SpaceVim/SpaceVim/pull/2001))
|
||||
|
||||
### Improvement
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user