A collection of scripts and configurations for Bash (and others)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
971B

  1. func! GodotSettings() abort
  2. setlocal foldmethod=expr
  3. setlocal tabstop=4
  4. nnoremap <buffer> <F4> :GodotRunLast<CR>
  5. nnoremap <buffer> <F5> :GodotRun<CR>
  6. nnoremap <buffer> <F6> :GodotRunCurrent<CR>
  7. nnoremap <buffer> <F7> :GodotRunFZF<CR>
  8. endfunc
  9. augroup godot | au!
  10. au FileType gdscript call GodotSettings()
  11. augroup end
  12. " Setup YouCompleteMe to use Godot Language Server.
  13. " NOTE: Godot must be running and you must go to Project -> Project Settings -> Global and set Language Server to On.
  14. if !has_key( g:, 'ycm_language_server' )
  15. let g:ycm_language_server = []
  16. endif
  17. let g:ycm_language_server += [
  18. \ {
  19. \ 'name': 'godot',
  20. \ 'filetypes': [ 'gdscript' ],
  21. \ 'project_root_files': [ 'project.godot' ],
  22. \ 'port': 6008
  23. \ }
  24. \ ]
  25. " Register LSP server for Godot:
  26. call ale#linter#Define('gdscript', {
  27. \ 'name': 'godot',
  28. \ 'lsp': 'socket',
  29. \ 'address': '127.0.0.1:6008',
  30. \ 'project_root': 'project.godot',
  31. \})