diff --git a/doc/deno.nvim.txt b/doc/deno.nvim.txt index 2bd90b7..6347a6b 100644 --- a/doc/deno.nvim.txt +++ b/doc/deno.nvim.txt @@ -1,6 +1,81 @@ -______ _ _ _ -| _ \ | | | (_) -| | | |___ _ __ ___ | | | |_ _ __ ___ -| | | / _ \ '_ \ / _ \ | | | | | '_ ` _ \ -| |/ / __/ | | | (_) | \ \_/ / | | | | | | -|___/ \___|_| |_|\___/ \___/|_|_| |_| |_| + ______ _ _ _ + | _ \ | | | (_) + | | | |___ _ __ ___ | | | |_ _ __ ___ + | | | / _ \ '_ \ / _ \ | | | | | '_ ` _ \ + | |/ / __/ | | | (_) | \ \_/ / | | | | | | + |___/ \___|_| |_|\___/ \___/|_|_| |_| |_| + +==================================================================== +CONTENTS *PotionContents* + + 1. Usage ................ |DenoVimUsage| + 2. License .............. |DenoVimLicense| + 3. Bugs ................. |DenoVimBugs| + 4. Contributing ......... |DenoVimContributing| + 5. Credits .............. |DenoVimCredits| + +==================================================================== +Section 1: Usage *DenoVimUsage* + +The Deno Vim plugin is a tools for a best usage for Deno Vim Lover + +Section 1.1: Deno Fmt + +The **DenoFmt** Command format the files in the current directory. +If you want customize the command use: + +```` +let g:deno_fmt = 'deno fmt ' (DEFAULT) +```` +Section 1.2: Deno Cache + +The **DenoCache** command cache the dependencies for the current file. +If you want customize the command use: + +```` +let g:deno_cache = 'deno cache ' (DEFAULT) +```` + +Section 1.3: Deno Run + +The **DenoRun** command run the current file with deno. +If you want customize use: + +```` +let g:deno_run = 'deno run -A' (DEFAULT) +```` + +Section 1.4: Deno Doc + +The **DenoDoc** command run the doc command ask you the file. +If you want customize use: + +```` +let g:deno_doc='deno doc --json ' (DEFAULT) +```` + +==================================================================== +Section 2: License *DenoVimLicense* + +The plugin have the MIT License check the LICENSE file for more information + +==================================================================== +Section 3: Bugs *DenoVimBugs* + +If you find any bug report the bug in the github repo: github.com/TeoDev1611/deno.vim + +==================================================================== +Section 4: Contributing *DenoVimContributing* + +For contribute check the issues with the label bug or feature request +if that isnt resolved you can make a pull request mentioning the issue +or describing the feature. + +==================================================================== +Section 5: Credits *DenoVimContributing* + +Original project by: Teo | TeoDev1611 in github + +--- + +If you make a contribution feel free to add here and the github diff --git a/plugin/deno.vim b/plugin/deno.vim index 8f2e4c3..b94cfff 100644 --- a/plugin/deno.vim +++ b/plugin/deno.vim @@ -21,32 +21,39 @@ endif function DenoFmt() execute "!" . g:deno_fmt echo "Succesfuly formated with: " . g:deno_fmt - echomsg "Fmt runned at" . s:current_time . "with: " . g:deno_fmt "path: " . s:path + echomsg "Fmt runned at " . s:current_time . "with: " . g:deno_fmt "path: " . s:path endfunction " Cache runner function DenoCache() execute "!". g:deno_cache . s:path echo "Cached succesfuly with: " . g:deno_cache - echomsg "Cache runned at" . s:current_time . "with: " . g:deno_cache "path: " . s:path + echomsg "Cache runned at " . s:current_time . "with: " . g:deno_cache "path: " . s:path endfunction " Run current file function DenoRun() execute "!". g:deno_run . s:path echo "Script runned succesfuly with: " . g:deno_run - echomsg "Script runned at" . s:current_time . "with: " . g:deno_run "path: " . s:path + echomsg "Script runned at " . s:current_time . "with: " . g:deno_run "path: " . s:path endfunction " Deno Doc arg -function DenoDoc(file) - execute "!". g:deno_doc . file - echo "Documentation runned with: ". g:deno_doc - echomsg "Script runned at" . s:current_time . "with: " . g:deno_doc "path: " . s:path +function DenoDoc() + let s:inputUser = input("Name of the module or the file?: ") + if empty(s:inputUser) + echoerr "The input is required" + echomsg "Command Runned at " . s:current_time . "with: " . g:deno_doc + finish + else + execute "!". g:deno_doc . s:inputUser + echo "Documentation runned with: ". g:deno_doc + echomsg "Script runned at " . s:current_time . "with: " . g:deno_doc "path: " . s:path + endif endfunction " Register the commands command! -nargs=0 DenoFmt call DenoFmt() command! -nargs=0 DenoCache call DenoCache() command! -nargs=0 DenoRun call DenoRun() -command! -nargs=1 DenoDoc call DenoDoc() +command! -nargs=0 DenoDoc call DenoDoc()