1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:10:07 +08:00

Add dockerfile support (#2001)

* Add dockerfile support

* Update wiki
This commit is contained in:
Wang Shidong 2018-07-30 23:34:44 +08:00 committed by GitHub
parent ac5d8fa5fc
commit 797457ee2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 71 additions and 1 deletions

View 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

View File

@ -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'],

View File

@ -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 |

View 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

View File

@ -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