1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-31 16:20:59 +08:00
SpaceVim/autoload/SpaceVim/api/language.vim
2022-02-03 17:24:51 +08:00

35 lines
901 B
VimL

"=============================================================================
" language.vim --- programming language information layer
" Copyright (c) 2016-2022 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
let s:self = {}
let s:self.__aliases = {
\ 'typescript' : 'TypeScript',
\ 'typescriptreact' : 'TypeScript React',
\ 'python' : 'Python',
\ 'java' : 'Java',
\ 'smalltalk' : 'SmallTalk',
\ 'objc' : 'Objective-C',
\ }
function! s:self.get_alias(filetype) abort
if !empty(a:filetype) && has_key(self.__aliases, a:filetype)
return self.__aliases[a:filetype]
else
return a:filetype
endif
endfunction
function! SpaceVim#api#language#get() abort
return deepcopy(s:self)
endfunction