[vim/vim] feat(filetype): detect ghostty configuration files as ft=ghostty (PR #20002)

4 views
Skip to first unread message

Bez Hermoso

unread,
2:48 AM (8 hours ago) 2:48 AM
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20002

Commit Summary

  • 2506ebe feat: detect ghostty configuration files as ft=ghostty

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002@github.com>

WieeRd

unread,
4:24 AM (6 hours ago) 4:24 AM
to vim/vim, Subscribed

@WieeRd commented on this pull request.


In runtime/filetype.vim:

> @@ -1617,6 +1617,8 @@ au BufNewFile,BufRead *.txt
 	\|   setf text
 	\| endif
 
+" Ghostty configuration
+au BufNewFile,BufRead */ghostty/config*        call s:StarSetf('ghostty')

https://ghostty.org/docs/config#file-location
https://ghostty.org/docs/config/reference#theme

  • Ghostty added support for config.ghostty in v1.3, so I believe it should be exactly config or any files with the .ghostty extension rather than config*.

  • Ghostty themes also use the exact same syntax so it would be nice to add them as well. They are located in ghostty/themes/*.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/review/4134001713@github.com>

WieeRd

unread,
4:24 AM (6 hours ago) 4:24 AM
to vim/vim, Subscribed

@WieeRd commented on this pull request.


In src/testdir/test_filetype.vim:

> @@ -327,6 +327,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     gedcom: ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
     gel: ['file.gel'],
     gemtext: ['file.gmi', 'file.gemini'],
+    ghostty: ['ghostty/config', 'ghostty/config.keymaps', '/.config/ghostty/config', '/.config/ghostty/config.keymaps'],
  • Change config.keymaps to keymaps.ghostty
  • Add ~/.config/ghostty/themes/Custom Theme & /usr/share/ghostty/themes/Builtin Theme


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/review/4134001764@github.com>

WieeRd

unread,
4:24 AM (6 hours ago) 4:24 AM
to vim/vim, Subscribed

@WieeRd requested changes on this pull request.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/review/4134001887@github.com>

Bez Hermoso

unread,
4:40 AM (6 hours ago) 4:40 AM
to vim/vim, Push

@bezhermoso pushed 1 commit.

  • 3caa88d feat: support more ghostty locations & file names


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/before/8095b2d86f0ff688850dd9963eda3412dd68ae76/after/3caa88d59625887d5e7fc7add7ad915d3bc93671@github.com>

Bez Hermoso

unread,
4:40 AM (6 hours ago) 4:40 AM
to vim/vim, Subscribed

@bezhermoso commented on this pull request.


In runtime/filetype.vim:

> @@ -1617,6 +1617,8 @@ au BufNewFile,BufRead *.txt
 	\|   setf text
 	\| endif
 
+" Ghostty configuration
+au BufNewFile,BufRead */ghostty/config*        call s:StarSetf('ghostty')

Oh TIL!


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/review/4134025305@github.com>

WieeRd

unread,
4:53 AM (6 hours ago) 4:53 AM
to vim/vim, Subscribed

@WieeRd approved this pull request.

👍


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20002/review/4134042927@github.com>

Reply all
Reply to author
Forward
0 new messages