|
- func! GodotSettings() abort
- setlocal foldmethod=expr
- setlocal tabstop=4
- nnoremap <buffer> <F4> :GodotRunLast<CR>
- nnoremap <buffer> <F5> :GodotRun<CR>
- nnoremap <buffer> <F6> :GodotRunCurrent<CR>
- nnoremap <buffer> <F7> :GodotRunFZF<CR>
- endfunc
- augroup godot | au!
- au FileType gdscript call GodotSettings()
- augroup end
-
- " Setup YouCompleteMe to use Godot Language Server.
- " NOTE: Godot must be running and you must go to Project -> Project Settings -> Global and set Language Server to On.
- 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
- \ }
- \ ]
-
-
- " Register LSP server for Godot:
- call ale#linter#Define('gdscript', {
- \ 'name': 'godot',
- \ 'lsp': 'socket',
- \ 'address': '127.0.0.1:6008',
- \ 'project_root': 'project.godot',
- \})
|