[Help needed] customizing nvim comment out feature

I got this from voyeg3r’s gist
He and @dave-kennedy made it 3 years ago.
I am here 'cause I couldn’t contact them

Can someone help me add a feature such that
this vimscript code puts comment out signs at the first of each line?

my init.vim code

let s:comment_map = {
    \   "c": '\/\/',
    \   "cpp": '\/\/',
    \   "go": '\/\/',
    \   "java": '\/\/',
    \   "javascript": '\/\/',
    \   "lua": '--',
    \   "scala": '\/\/',
    \   "php": '\/\/',
    \   "python": '#',
    \   "ruby": '#',
    \   "rust": '\/\/',
    \   "sh": '#',
    \   "desktop": '#',
    \   "fstab": '#',
    \   "conf": '#',
    \   "profile": '#',
    \   "bashrc": '#',
    \   "bash_profile": '#',
    \   "mail": '>',
    \   "eml": '>',
    \   "bat": 'REM',
    \   "ahk": ';',
    \   "vim": '"',
    \   "tex": '%',
    \ }

function! ToggleComment()
    if has_key(s:comment_map, &filetype)
        let comment_leader = s:comment_map[&filetype]
        if getline('.') =~ '^\s*$'
            " Skip empty line
            return
        endif
        if getline('.') =~ '^\s*' . comment_leader
            " Uncomment the line
            execute 'silent s/\v\s*\zs' . comment_leader . '\s*\ze//'
        else
            " Comment the line
            execute 'silent s/\v^(\s*)/\1' . comment_leader . ' /'
        endif
    else
        echo "No comment leader found for filetype"
    endif
endfunction

nnoremap <Leader>t :call ToggleComment()<CR>
vnoremap <Leader>t :call ToggleComment()<CR>

PS: this works perfectly. But i need the extra feature which will put comment out signs at the first of each line

Not exactly sure what you’re asking, but why not just use GitHub - tpope/vim-commentary: commentary.vim: comment stuff out?

I want my init.vim to be neat and clean…
don’t want to use any plugin 'cause it causes nvim to open a little-bit slower

The performance impact of vim-commentary will be minimal… it’s of comparable size to to the snippet you posted above. Worst case you can literally copy/paste functions out of vim-commentary/commentary.vim at master · tpope/vim-commentary · GitHub, but again, that will not lower your startup time…