docs: remove extra whitespaces

This commit is contained in:
Daiki Mizukami 2022-03-13 21:48:14 +09:00
parent be2def4100
commit ecc36c3d1c
No known key found for this signature in database
GPG Key ID: 10478E598B944AA2
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()*
Gets the current list of buffer handles
Includes unlisted (unloaded/deleted) buffers, like `:ls!` .
Use |nvim_buf_is_loaded()| to check if a buffer is loaded.
Includes unlisted (unloaded/deleted) buffers, like `:ls!`. Use
|nvim_buf_is_loaded()| to check if a buffer is loaded.
Return: ~
List of buffer handles
@ -1548,18 +1548,21 @@ nvim_set_hl({ns_id}, {name}, {*val}) *nvim_set_hl()*
Sets a highlight group.
Parameters: ~
{ns_id} Namespace id for this highlight |nvim_create_namespace()|.
Use 0 to set a highlight group globally |:highlight|.
{ns_id} Namespace id for this highlight
|nvim_create_namespace()|. Use 0 to set a
highlight group globally |:highlight|.
{name} Highlight group name, e.g. "ErrorMsg"
{val} Highlight definition map, like |synIDattr()|. In
addition, the following keys are recognized:
• default: Don't override existing definition |:hi-default|
• ctermfg: Sets foreground of cterm color |highlight-ctermfg|
• ctermbg: Sets background of cterm color |highlight-ctermbg|
• default: Don't override existing definition
|:hi-default|
• ctermfg: Sets foreground of cterm color
|highlight-ctermfg|
• ctermbg: Sets background of cterm color
|highlight-ctermbg|
• cterm: cterm attribute map, like
|highlight-args|.
Note: Attributes default to those set for `gui`
if not set.
|highlight-args|. Note: Attributes default to
those set for `gui` if not set.
nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()*
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
{send_buffer} True if the initial notification should
contain the whole buffer: first
notification will be `nvim_buf_lines_event`
. Else the first notification will be
notification will be
`nvim_buf_lines_event`. Else the first
notification will be
`nvim_buf_changedtick_event`. Not for Lua
callbacks.
{opts} Optional parameters.

View File

@ -800,8 +800,8 @@ start_client({config}) *vim.lsp.start_client()*
its result.
• Note: To send an empty dictionary
use
`{[vim.type_idx]=vim.types.dictionary}`
, else it will be encoded as an
`{[vim.type_idx]=vim.types.dictionary}`,
else it will be encoded as an
array.
{handlers} Map of language server method names
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)
<
the require('jkl') gets evaluated during this call in order to
access the function. If you want to avoid this cost at startup
you can wrap it in a function, for example: >
the require('jkl )` gets evaluated during this call in order to access the
function. If you want to avoid this cost at startup you can
wrap it in a function, for example: >
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
any directives processing the match. If the query has more
than one pattern the capture table might be sparse, and e.g.
`pairs()` method should be used over `ipairs` . Here an
example iterating over all captures in every match:
`pairs()` method should be used over `ipairs`. Here an example
iterating over all captures in every match:
>
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]
def clean_text(text):
"""Cleans text.
Only cleans superfluous whitespace at the moment.
"""
return ' '.join(text.split()).strip()
def clean_lines(text):
"""Removes superfluous lines.
@ -374,9 +366,9 @@ def get_text(n, preformatted=False):
return '`{}`'.format(text)
for node in n.childNodes:
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:
text += ' ' + get_text(node, preformatted)
text += get_text(node, preformatted)
return text