Skip to content

Commit

Permalink
Merge pull request willelz#16 from hituzi-no-sippo/feature/update-unt…
Browse files Browse the repository at this point in the history
…il-commit-that-update-vim-namespace

Feature/update until commit that update vim namespace
  • Loading branch information
willelz authored Feb 18, 2022
2 parents 5b32fb0 + 782c2d0 commit cd2a7ef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
5 changes: 3 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,10 @@ NeovimはLuaからAPIを使うためのエントリーポイントとして、`v

いくつかの注目すべき関数とモジュール:

- `vim.inspect`: 読みやすい形式のLuaオブジェクト(テーブルを調べるのに便利です。)
- `vim.inspect`: Luaオブジェクトを人間が読みやすい文字列に変換する(テーブルを調べるのに便利です。)
- `vim.regex`: LuaからVimの正規表現を使う
- `vim.api`: API関数を公開するモジュール(リモートプラグインで使うAPIと同じです)
- `vim.ui`: プラグインから利用できる上書き可能な関数
- `vim.loop`: Neovimのイベントループ機能を公開するモジュール(LibUVを使います)
- `vim.lsp`: 組込みのLSPクライアントを操作するモジュール
- `vim.treesitter`: tree-sitterライブラリの機能を公開するモジュール
Expand All @@ -414,7 +415,7 @@ API関数は、[`:help api-global`](https://neovim.io/doc/user/api.html#api-glob

#### Tips

オブジェクトの中身を検査するのに毎回`print(vim.inspect(x)`を書くのは面倒です。設定にグローバルなラッパー関数を含めることは価値があるかもしれません。:
オブジェクトの中身を検査するのに毎回`print(vim.inspect(x)`を書くのは面倒です。設定にグローバルなラッパー関数を含めることは価値があるかもしれません。(Neovim 0.7.0+では、この関数は組込み関数です。参照 [`:help vim.pretty_print()`](https://neovim.io/doc/user/lua.html#vim.pretty_print())):

```lua
function _G.put(...)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,10 @@ Neovim exposes a global `vim` variable which serves as an entry point to interac

Some notable functions and modules include:

- `vim.inspect`: pretty-print Lua objects (useful for inspecting tables)
- `vim.inspect`: transform Lua objects into human-readable strings (useful for inspecting tables)
- `vim.regex`: use Vim regexes from Lua
- `vim.api`: module that exposes API functions (the same API used by remote plugins)
- `vim.ui`: overridable UI functions that can be leveraged by plugins
- `vim.loop`: module that exposes the functionality of Neovim's event-loop (using LibUV)
- `vim.lsp`: module that controls the built-in LSP client
- `vim.treesitter`: module that exposes the functionality of the tree-sitter library
Expand All @@ -407,7 +408,7 @@ This list is by no means comprehensive. If you wish to know more about what's ma

#### Tips

Writing `print(vim.inspect(x))` every time you want to inspect the contents of an object can get pretty tedious. It might be worthwhile to have a global wrapper function somewhere in your configuration:
Writing `print(vim.inspect(x))` every time you want to inspect the contents of an object can get pretty tedious. It might be worthwhile to have a global wrapper function somewhere in your configuration (in Neovim 0.7.0+, this function is built-in, see [`:help vim.pretty_print()`](https://neovim.io/doc/user/lua.html#vim.pretty_print())):

```lua
function _G.put(...)
Expand Down
7 changes: 5 additions & 2 deletions doc/nvim-lua-guide.jax
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,12 @@ NeovimはLuaからAPIを使うためのエントリーポイントとして、`v
いくつかの注目すべき関数とモジュール:

- `vim.inspect`:
読みやすい形式のLuaオブジェクト(テーブルを調べるのに便利です。)
Luaオブジェクトを人間が読みやすい文字列に変換する(テーブルを調べるのに便利です。)
- `vim.regex`: LuaからVimの正規表現を使う
- `vim.api`:
API関数を公開するモジュール(リモートプラグインで使うAPIと同じです)
- `vim.ui`:
プラグインから利用できる上書き可能な関数
- `vim.loop`:
Neovimのイベントループ機能を公開するモジュール(LibUVを使います)
- `vim.lsp`:
Expand All @@ -485,7 +487,8 @@ API関数は、`:help api-global`にあります。

Tips~

オブジェクトの中身を検査するのに毎回`print(vim.inspect(x)`を書くのは面倒です。設定にグローバルなラッパー関数を含めることは価値があるかもしれません。:
オブジェクトの中身を検査するのに毎回`print(vim.inspect(x)`を書くのは面倒です。設定にグローバルなラッパー関数を含めることは価値があるかもしれません。
(Neovim 0.7.0+では、この関数は組込み関数です。参照 |help vim.pretty_print()|):

>
function _G.put(...)
Expand Down
9 changes: 6 additions & 3 deletions doc/nvim-lua-guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,12 @@ to interact with its APIs from Lua. It provides users with an extended

Some notable functions and modules include:

- `vim.inspect`: pretty-print Lua objects (useful for inspecting tables)
- `vim.inspect`: transform Lua objects into human-readable strings
(useful for inspecting tables)
- `vim.regex`: use Vim regexes from Lua
- `vim.api`: module that exposes API functions (the same API used by
remote plugins)
- `vim.ui`: overridable UI functions that can be leveraged by plugins
- `vim.loop`: module that exposes the functionality of Neovim's event-loop
(using LibUV)
- `vim.lsp`: module that controls the built-in LSP client
Expand All @@ -501,8 +503,9 @@ of every module. API functions are documented under |api-global|.
Tips~

Writing `print(vim.inspect(x))` every time you want to inspect the
contents of an object can get pretty tedious. It might be worthwhile to
have a global wrapper function somewhere in your configuration:
contents of an object can get pretty tedious. It might be worthwhile
to have a global wrapper function somewhere in your configuration (in
Neovim 0.7.0+, this function is built-in, see |vim.pretty_print()|):

>
function _G.put(...)
Expand Down

0 comments on commit cd2a7ef

Please sign in to comment.