docs: remove extra whitespaces

This commit is contained in:
Daiki Mizukami
2022-03-13 21:48:14 +09:00
parent be2def4100
commit ecc36c3d1c
6 changed files with 94 additions and 98 deletions

View File

@@ -1248,8 +1248,8 @@ nvim_input_mouse({button}, {action}, {modifier}, {grid}, {row}, {col})
nvim_list_bufs() *nvim_list_bufs()* nvim_list_bufs() *nvim_list_bufs()*
Gets the current list of buffer handles Gets the current list of buffer handles
Includes unlisted (unloaded/deleted) buffers, like `:ls!` . Includes unlisted (unloaded/deleted) buffers, like `:ls!`. Use
Use |nvim_buf_is_loaded()| to check if a buffer is loaded. |nvim_buf_is_loaded()| to check if a buffer is loaded.
Return: ~ Return: ~
List of buffer handles List of buffer handles
@@ -1548,18 +1548,21 @@ nvim_set_hl({ns_id}, {name}, {*val}) *nvim_set_hl()*
Sets a highlight group. Sets a highlight group.
Parameters: ~ Parameters: ~
{ns_id} Namespace id for this highlight |nvim_create_namespace()|. {ns_id} Namespace id for this highlight
Use 0 to set a highlight group globally |:highlight|. |nvim_create_namespace()|. Use 0 to set a
highlight group globally |:highlight|.
{name} Highlight group name, e.g. "ErrorMsg" {name} Highlight group name, e.g. "ErrorMsg"
{val} Highlight definition map, like |synIDattr()|. In {val} Highlight definition map, like |synIDattr()|. In
addition, the following keys are recognized: addition, the following keys are recognized:
• default: Don't override existing definition |:hi-default| • default: Don't override existing definition
• ctermfg: Sets foreground of cterm color |highlight-ctermfg| |:hi-default|
• ctermbg: Sets background of cterm color |highlight-ctermbg| • ctermfg: Sets foreground of cterm color
|highlight-ctermfg|
• ctermbg: Sets background of cterm color
|highlight-ctermbg|
• cterm: cterm attribute map, like • cterm: cterm attribute map, like
|highlight-args|. |highlight-args|. Note: Attributes default to
Note: Attributes default to those set for `gui` those set for `gui` if not set.
if not set.
nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()* nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()*
Sets a global |mapping| for the given mode. Sets a global |mapping| for the given mode.
@@ -1880,8 +1883,9 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
{buffer} Buffer handle, or 0 for current buffer {buffer} Buffer handle, or 0 for current buffer
{send_buffer} True if the initial notification should {send_buffer} True if the initial notification should
contain the whole buffer: first contain the whole buffer: first
notification will be `nvim_buf_lines_event` notification will be
. Else the first notification will be `nvim_buf_lines_event`. Else the first
notification will be
`nvim_buf_changedtick_event`. Not for Lua `nvim_buf_changedtick_event`. Not for Lua
callbacks. callbacks.
{opts} Optional parameters. {opts} Optional parameters.

View File

@@ -800,8 +800,8 @@ start_client({config}) *vim.lsp.start_client()*
its result. its result.
• Note: To send an empty dictionary • Note: To send an empty dictionary
use use
`{[vim.type_idx]=vim.types.dictionary}` `{[vim.type_idx]=vim.types.dictionary}`,
, else it will be encoded as an else it will be encoded as an
array. array.
{handlers} Map of language server method names {handlers} Map of language server method names
to |lsp-handler| to |lsp-handler|

View File

@@ -1990,9 +1990,9 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
vim.keymap.set('n', 'asdf', require('jkl').my_fun) vim.keymap.set('n', 'asdf', require('jkl').my_fun)
< <
the require('jkl') gets evaluated during this call in order to the require('jkl )` gets evaluated during this call in order to access the
access the function. If you want to avoid this cost at startup function. If you want to avoid this cost at startup you can
you can wrap it in a function, for example: > wrap it in a function, for example: >
vim.keymap.set('n', 'asdf', function() return require('jkl').my_fun() end) vim.keymap.set('n', 'asdf', function() return require('jkl').my_fun() end)
< <

View File

@@ -528,8 +528,8 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop})
a table mapping capture indices to nodes, and metadata from a table mapping capture indices to nodes, and metadata from
any directives processing the match. If the query has more any directives processing the match. If the query has more
than one pattern the capture table might be sparse, and e.g. than one pattern the capture table might be sparse, and e.g.
`pairs()` method should be used over `ipairs` . Here an `pairs()` method should be used over `ipairs`. Here an example
example iterating over all captures in every match: iterating over all captures in every match:
> >
for pattern, match, metadata in cquery:iter_matches(tree:root(), bufnr, first, last) do for pattern, match, metadata in cquery:iter_matches(tree:root(), bufnr, first, last) do

View File

@@ -343,14 +343,6 @@ def self_or_child(n):
return n.childNodes[0] return n.childNodes[0]
def clean_text(text):
"""Cleans text.
Only cleans superfluous whitespace at the moment.
"""
return ' '.join(text.split()).strip()
def clean_lines(text): def clean_lines(text):
"""Removes superfluous lines. """Removes superfluous lines.
@@ -374,9 +366,9 @@ def get_text(n, preformatted=False):
return '`{}`'.format(text) return '`{}`'.format(text)
for node in n.childNodes: for node in n.childNodes:
if node.nodeType == node.TEXT_NODE: if node.nodeType == node.TEXT_NODE:
text += node.data if preformatted else clean_text(node.data) text += node.data
elif node.nodeType == node.ELEMENT_NODE: elif node.nodeType == node.ELEMENT_NODE:
text += ' ' + get_text(node, preformatted) text += get_text(node, preformatted)
return text return text