.editorconfig 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # EditorConfig is a file format and collection of text editor plugins
  2. # for maintaining consistent coding styles between different editors
  3. # and IDEs. Most popular editors support this either natively or via
  4. # plugin.
  5. #
  6. # Check https://editorconfig.org for details.
  7. #
  8. # Emacs: you need https://github.com/10sr/editorconfig-custom-majormode-el
  9. # to automatically enable the appropriate major-mode for your files
  10. # that aren't already caught by your existing config.
  11. #
  12. root = true
  13. [*]
  14. end_of_line = lf
  15. insert_final_newline = true
  16. charset = utf-8
  17. [*.mak]
  18. indent_style = tab
  19. indent_size = 8
  20. emacs_mode = makefile
  21. [Makefile*]
  22. indent_style = tab
  23. indent_size = 8
  24. emacs_mode = makefile
  25. [*.{c,h,c.inc,h.inc}]
  26. indent_style = space
  27. indent_size = 4
  28. emacs_mode = c
  29. [*.sh]
  30. indent_style = space
  31. indent_size = 4
  32. [*.{s,S}]
  33. indent_style = tab
  34. indent_size = 8
  35. emacs_mode = asm
  36. [*.{vert,frag}]
  37. emacs_mode = glsl
  38. [*.json]
  39. indent_style = space
  40. emacs_mode = python
  41. # by default follow QEMU's style
  42. [*.pl]
  43. indent_style = space
  44. indent_size = 4
  45. emacs_mode = perl
  46. # but user kernel "style" for imported scripts
  47. [scripts/{kernel-doc,get_maintainer.pl,checkpatch.pl}]
  48. indent_style = tab
  49. indent_size = 8
  50. emacs_mode = perl