File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1
1
VIM_COLORTEMPLATE_VERSION = 2.2.3
2
2
3
- all : colors style-check lint
3
+ all : colors style-check lint filetypes
4
4
5
5
colors : vim-colortemplate
6
6
nvim \
@@ -26,7 +26,10 @@ style-fix:
26
26
lint :
27
27
luacheck lua scripts
28
28
29
+ filetypes :
30
+ ./scripts/filetypes.sh
31
+
29
32
clean :
30
33
rm -rf vim-colortemplate
31
34
32
- .PHONY : all colors style-check style-fix lint
35
+ .PHONY : all colors style-check style-fix lint filetypes
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Iterate over the elements of icons_by_file_extension and check if there are missed filetypes.
4
+
5
+ in_section=false
6
+
7
+ while IFS= read -r line; do
8
+ if [[ $line =~ ^local\ icons_by_file_extension\ = \ \{ $ ]]; then
9
+ in_section=true
10
+ elif [[ $line =~ ^\} $ ]]; then
11
+ in_section=false
12
+ fi
13
+
14
+ if $in_section && [[ $line =~ \[\" (.+)\"\] ]]; then
15
+ key=" ${BASH_REMATCH[1]} "
16
+ # Search for the key in the main file
17
+ line=$( grep -F " \" $key \" " " lua/nvim-web-devicons.lua" )
18
+ if [ -n " $line " ]; then
19
+ continue
20
+ else
21
+ [ -f " /usr/share/nvim/runtime/syntax/$key .vim" ] &&
22
+ echo -e " \e[33mPlease add \" $key \" to filetypes Lua table.\e[0m"
23
+ fi
24
+ fi
25
+ done < " lua/nvim-web-devicons/icons-default.lua"
You can’t perform that action at this time.
0 commit comments