File tree Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Expand file tree Collapse file tree 2 files changed +16
-23
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,7 @@ end_of_line = lf
77[* .lua ]
88indent_style = space
99indent_size = 2
10+
11+ [* .sh ]
12+ indent_style = space
13+ indent_size = 2
Original file line number Diff line number Diff line change 33# Iterate over the elements of icons_by_file_extension and check if there are missed filetypes.
44# $VIMRUNTIME specifies neovim runtime path, defaults to "/usr/share/nvim/runtime" if unset.
55
6- if [ -z " ${VIMRUNTIME} " ]; then
7- export VIMRUNTIME=" /usr/share/nvim/runtime"
8- fi
6+ : " ${VIMRUNTIME:=/ usr/ share/ nvim/ runtime} "
97
108exit_value=0
11- in_section=false
129
13- while IFS= read -r line; do
14- if [[ $line =~ ^local\ icons_by_file_extension\ = \ \{ $ ]]; then
15- in_section=true
16- elif [[ $line =~ ^\} $ ]]; then
17- in_section=false
18- fi
10+ while read -r key; do
11+ # Search for the key in the main file
12+ line=$( grep -F " \" $key \" " " lua/nvim-web-devicons.lua" )
13+ if [ -z " $line " ]; then
14+ [ -f " ${VIMRUNTIME} /syntax/$key .vim" ] &&
15+ echo -e " \e[33mPlease add \" $key \" to filetypes Lua table.\e[0m" &&
16+ exit_value=1
17+ fi
18+ done < <(
19+ sed -nr ' /^local icons_by_file_extension/,/^}/!d; s/.*\["(.*)"\].*/\1/p' lua/nvim-web-devicons/icons-default.lua
20+ )
1921
20- if $in_section && [[ $line =~ \[\" (.+)\"\] ]]; then
21- key=" ${BASH_REMATCH[1]} "
22- # Search for the key in the main file
23- line=$( grep -F " \" $key \" " " lua/nvim-web-devicons.lua" )
24- if [ -n " $line " ]; then
25- continue
26- else
27- [ -f " ${VIMRUNTIME} /syntax/$key .vim" ] &&
28- echo -e " \e[33mPlease add \" $key \" to filetypes Lua table.\e[0m" &&
29- exit_value=1
30- fi
31- fi
32- done < " lua/nvim-web-devicons/icons-default.lua"
3322exit $exit_value
You can’t perform that action at this time.
0 commit comments