From 02cf0f9b678eae0815d9da4347cab8971b160cb6 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 10 Dec 2021 01:26:20 +0800 Subject: Add several ycm commands --- .vim/plugin/godot.vim | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to '.vim/plugin/godot.vim') diff --git a/.vim/plugin/godot.vim b/.vim/plugin/godot.vim index 6bcf679..655710e 100644 --- a/.vim/plugin/godot.vim +++ b/.vim/plugin/godot.vim @@ -1,19 +1,11 @@ if has('macunix') let g:godot_executable = '/Applications/Godot.app' endif + if has('win32') || has('win32unix') let g:godot_executable = '' endif -let g:ycm_language_server += [ - \ { - \ 'name': 'godot', - \ 'filetypes': ['gdscript'], - \ 'project_root_files': ['project.godot'], - \ 'port': 6008 - \ } - \ ] - func! s:godot_settings() abort setlocal tabstop=4 nnoremap rl :GodotRunLast @@ -25,6 +17,23 @@ augroup godot | au! au FileType gdscript call s:godot_settings() augroup end +"YCM config + +if !has_key( g:, 'ycm_language_server' ) + let g:ycm_language_server = [] +endif + +let g:ycm_language_server += [ + \ { + \ 'name': 'godot', + \ 'filetypes': ['gdscript'], + \ 'project_root_files': ['project.godot'], + \ 'port': 6008 + \ } + \ ] + +" ALE config + call ale#linter#Define('gdscript', { \ 'name': 'godot', \ 'lsp': 'socket', -- cgit v1.2.3