Provides a function to get the Go Module info.
You can configure shortcuts to insert import path prefix quickly.
Plug 'Me1onRind/gomodule-info'
Retrun current editing file's go module name. It will lookup parent directory until find out go.mod or arrive root directory.
function InsertGomoduleImportItem()
let str = "\t\"" . GoModuleName() ."/\""
call append(line('.'), l:str)
normal j$
startinsert
endfunction
nmap gii :call InsertGomoduleImportItem()<CR>
You can do change detail according to persion preference or do something else.