Skip to content

Commit

Permalink
"feat: add the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoDev1611 committed Jun 21, 2021
1 parent 401c5ac commit a346ff9
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 14 deletions.
87 changes: 81 additions & 6 deletions doc/deno.nvim.txt
Original file line number Diff line number Diff line change
@@ -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
23 changes: 15 additions & 8 deletions plugin/deno.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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(<args>)
command! -nargs=0 DenoDoc call DenoDoc()

0 comments on commit a346ff9

Please sign in to comment.