Use xdg-mime to set nvim as default

As @abenz1267 pointed out, the previous solution wasn't the greatest.
This is the proper solution.
This commit is contained in:
Ryan Hughes
2025-10-29 13:25:45 -04:00
parent 407d283cb7
commit 3344f33104
3 changed files with 40 additions and 7 deletions

View File

@@ -36,3 +36,22 @@ xdg-mime default mpv.desktop application/ogg
# Use Hey for mailto: links
xdg-mime default HEY.desktop x-scheme-handler/mailto
# Open text files with nvim
xdg-mime default nvim.desktop text/plain
xdg-mime default nvim.desktop text/english
xdg-mime default nvim.desktop text/x-makefile
xdg-mime default nvim.desktop text/x-c++hdr
xdg-mime default nvim.desktop text/x-c++src
xdg-mime default nvim.desktop text/x-chdr
xdg-mime default nvim.desktop text/x-csrc
xdg-mime default nvim.desktop text/x-java
xdg-mime default nvim.desktop text/x-moc
xdg-mime default nvim.desktop text/x-pascal
xdg-mime default nvim.desktop text/x-tcl
xdg-mime default nvim.desktop text/x-tex
xdg-mime default nvim.desktop application/x-shellscript
xdg-mime default nvim.desktop text/x-c
xdg-mime default nvim.desktop text/x-c++
xdg-mime default nvim.desktop application/xml
xdg-mime default nvim.desktop text/xml