Skip to content

Commit

Permalink
docs(vimdoc): Auto-generate user / API documentation + vimtags
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 14, 2024
1 parent d408090 commit 073e1dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
29 changes: 18 additions & 11 deletions doc/lua-console.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ development and Neovim exploration and configuration. Acts as a user friendly
replacement of command mode - messages loop and as a handy scratch pad to store
and test your code gists.

**Update: Although it originated as a tool for Lua development, it has now
**Update: although it originated as a tool for Lua development, it has now
evolved into supporting other languages too. See evaluating other languages.**


Expand Down Expand Up @@ -174,11 +174,11 @@ EVALUATING OTHER LANGUAGES ~
SETTING UP

- It is possible to setup external code executors for other languages. Evaluators
for `ruby` and `racket` are working out of the box, support for other languages
is coming. Meanwhile, you can easily setup your own language.
- Below is the default configuration which can be overridden or extended by your
custom config (`default_process_opts` will be replaced by language specific
opts), e.g. a possible config for `python` could be:
for `ruby`,`racket` and `python` are working out of the box, support for other
languages is coming. Meanwhile, you can easily setup your own language.
- Below is the default configuration, which can be overridden or extended by your
custom config, where `default_process_opts` will be replaced by language
specific opts, e.g. a possible config for `python` could be:
>lua
require('lua-console').setup {
external_evaluators = {
Expand All @@ -191,8 +191,6 @@ SETTING UP
}
}
<
- You can also setup a custom formatter to format the evaluator output before
appending results to the console or buffer. Example is in the config.
Default External Evaluators Settings
~
`exev_config.lua`
Expand Down Expand Up @@ -241,16 +239,16 @@ SETTING UP

return external_evaluators
<
- You can also setup a custom formatter to format the evaluator output before
appending results to the console or buffer. Example is in the config.
USAGE
- The language evaluator is determined either from (in order of precedence):
- The code prefix `===lang` on the line above your code snippet, in which case it only applies to the snippet directly below and it should be included in the selection
for evaluation. The prefix can be changed in the config.
- The code prefix `===lang` on the line above your code snippet, in which case it only applies to the snippet directly below. The prefix can be changed in the config.
- The code prefix on the top line of the console/buffer, in which case it applies to the whole buffer.
- The file type of the buffer.
>racket
===racket


(define (log str)
(displayln (format "~v" str)))

Expand All @@ -266,6 +264,15 @@ SETTING UP
===ruby
5.times { puts 'Hey' }
<
- Code inside Lua comments will be sytax highlighted.
>python
[[===python
list = [1, 3, 5, 7, 9]

for val in a:
print(list)
]]
<


ALTERNATIVES AND COMPARISON*lua-console.nvim-💻-lua-console-main-develop-luarocks-alternatives-and-comparison*
Expand Down
4 changes: 2 additions & 2 deletions doc/lua-console.nvim_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ Return ~
------------------------------------------------------------------------------
*get_lang()*

`get_lang`({buf}, {lines})
`get_lang`({buf}, {range})

the language of the code/console/buffer

lines array to remove the lang_prefix
Parameters ~
{buf} `(number)`
{lines} `(string[])`
{range} `(number[])`

Return ~
`(string)`
Expand Down

0 comments on commit 073e1dd

Please sign in to comment.