mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
docs: small fixes (#27213)
Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
This commit is contained in:
parent
9a761019da
commit
63b810c9d8
@ -104,10 +104,10 @@ The following changes may require adaptations in user config or plugins.
|
|||||||
• |hl-WinSeparator| is linked to |hl-Normal| instead of |hl-VertSplit|.
|
• |hl-WinSeparator| is linked to |hl-Normal| instead of |hl-VertSplit|.
|
||||||
|
|
||||||
This also might result into some color schemes looking differently due to
|
This also might result into some color schemes looking differently due to
|
||||||
them relying on an implicit assumptions about how highlight groups are
|
them relying on implicit assumptions about how highlight groups are defined
|
||||||
defined by default. To account for this, define all attributes of highlight
|
by default. To account for this, define all attributes of highlight groups
|
||||||
groups explicitly. Alternatively, use `:colorscheme vim` or
|
explicitly. Alternatively, use `:colorscheme vim` or `:source
|
||||||
`:source $VIMRUNTIME/colors/vim.lua` to restore previous definitions.
|
$VIMRUNTIME/colors/vim.lua` to restore previous definitions.
|
||||||
|
|
||||||
• 'termguicolors' is enabled by default when Nvim is able to determine that
|
• 'termguicolors' is enabled by default when Nvim is able to determine that
|
||||||
the host terminal emulator supports 24-bit color.
|
the host terminal emulator supports 24-bit color.
|
||||||
@ -125,7 +125,6 @@ unreleased features on Nvim HEAD.
|
|||||||
|
|
||||||
• Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
|
• Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
|
||||||
https://github.com/neovim/neovim/pull/20750
|
https://github.com/neovim/neovim/pull/20750
|
||||||
• ...
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
NEW FEATURES *news-features*
|
NEW FEATURES *news-features*
|
||||||
|
@ -1023,7 +1023,7 @@ end
|
|||||||
|
|
||||||
--- @class vim.diagnostic.GotoOpts : vim.diagnostic.GetOpts
|
--- @class vim.diagnostic.GotoOpts : vim.diagnostic.GetOpts
|
||||||
--- @field cursor_position? {[1]:integer,[2]:integer}
|
--- @field cursor_position? {[1]:integer,[2]:integer}
|
||||||
--- @field wrap? integer
|
--- @field wrap? boolean
|
||||||
--- @field float? boolean|vim.diagnostic.Opts.Float
|
--- @field float? boolean|vim.diagnostic.Opts.Float
|
||||||
--- @field win_id? integer
|
--- @field win_id? integer
|
||||||
|
|
||||||
|
@ -10,14 +10,14 @@ local tohex = require('bit').tohex
|
|||||||
local URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):.*'
|
local URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):.*'
|
||||||
local WINDOWS_URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):[a-zA-Z]:.*'
|
local WINDOWS_URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9.+-]*):[a-zA-Z]:.*'
|
||||||
local PATTERNS = {
|
local PATTERNS = {
|
||||||
---RFC 2396
|
-- RFC 2396
|
||||||
---https://tools.ietf.org/html/rfc2396#section-2.2
|
-- https://tools.ietf.org/html/rfc2396#section-2.2
|
||||||
rfc2396 = "^A-Za-z0-9%-_.!~*'()",
|
rfc2396 = "^A-Za-z0-9%-_.!~*'()",
|
||||||
---RFC 2732
|
-- RFC 2732
|
||||||
---https://tools.ietf.org/html/rfc2732
|
-- https://tools.ietf.org/html/rfc2732
|
||||||
rfc2732 = "^A-Za-z0-9%-_.!~*'()[]",
|
rfc2732 = "^A-Za-z0-9%-_.!~*'()[]",
|
||||||
---RFC 3986
|
-- RFC 3986
|
||||||
---https://tools.ietf.org/html/rfc3986#section-2.2
|
-- https://tools.ietf.org/html/rfc3986#section-2.2
|
||||||
rfc3986 = "^A-Za-z0-9%-._~!$&'()*+,;=:@/",
|
rfc3986 = "^A-Za-z0-9%-._~!$&'()*+,;=:@/",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,8 +159,8 @@ void conceal_check_cursor_line(void)
|
|||||||
/// There may be some time between setting Rows and Columns and (re)allocating
|
/// There may be some time between setting Rows and Columns and (re)allocating
|
||||||
/// default_grid arrays. This happens when starting up and when
|
/// default_grid arrays. This happens when starting up and when
|
||||||
/// (manually) changing the screen size. Always use default_grid.rows and
|
/// (manually) changing the screen size. Always use default_grid.rows and
|
||||||
/// default_grid.Columns to access items in default_grid.chars[]. Use Rows
|
/// default_grid.cols to access items in default_grid.chars[]. Use Rows and
|
||||||
/// and Columns for positioning text etc. where the final size of the screen is
|
/// Columns for positioning text etc. where the final size of the screen is
|
||||||
/// needed.
|
/// needed.
|
||||||
///
|
///
|
||||||
/// @return whether resizing has been done
|
/// @return whether resizing has been done
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
/// @param[in] str Prompt: question to ask user. Is always followed by
|
/// @param[in] str Prompt: question to ask user. Is always followed by
|
||||||
/// " (y/n)?".
|
/// " (y/n)?".
|
||||||
/// @param[in] direct Determines what function to use to get user input. If
|
/// @param[in] direct Determines what function to use to get user input. If
|
||||||
/// true then ui_inchar() will be used, otherwise vgetc().
|
/// true then os_inchar() will be used, otherwise vgetc().
|
||||||
/// I.e. when direct is true then characters are obtained
|
/// I.e. when direct is true then characters are obtained
|
||||||
/// directly from the user without buffers involved.
|
/// directly from the user without buffers involved.
|
||||||
///
|
///
|
||||||
|
@ -534,7 +534,7 @@ int utf_ptr2cells(const char *p)
|
|||||||
/// @param[in] p String to convert.
|
/// @param[in] p String to convert.
|
||||||
/// @param[in] len Length of the character in bytes, 0 or 1 if illegal.
|
/// @param[in] len Length of the character in bytes, 0 or 1 if illegal.
|
||||||
///
|
///
|
||||||
/// @return Unicode codepoint. A negative value When the sequence is illegal.
|
/// @return Unicode codepoint. A negative value when the sequence is illegal.
|
||||||
int32_t utf_ptr2CharInfo_impl(uint8_t const *p, uintptr_t const len)
|
int32_t utf_ptr2CharInfo_impl(uint8_t const *p, uintptr_t const len)
|
||||||
FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_PURE FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ static inline CharInfo utf_ptr2CharInfo(char const *p_in)
|
|||||||
/// @param[in] p_in String to convert.
|
/// @param[in] p_in String to convert.
|
||||||
///
|
///
|
||||||
/// @return information abouth the character. When the sequence is illegal,
|
/// @return information abouth the character. When the sequence is illegal,
|
||||||
/// 'value' is negative, 'len' is 1.
|
/// "value" is negative, "len" is 1.
|
||||||
static inline CharInfo utf_ptr2CharInfo(char const *const p_in)
|
static inline CharInfo utf_ptr2CharInfo(char const *const p_in)
|
||||||
{
|
{
|
||||||
uint8_t const *const p = (uint8_t const *)p_in;
|
uint8_t const *const p = (uint8_t const *)p_in;
|
||||||
@ -82,11 +82,9 @@ static inline StrCharInfo utfc_next(StrCharInfo cur)
|
|||||||
REAL_FATTR_NONNULL_ALL REAL_FATTR_ALWAYS_INLINE REAL_FATTR_PURE;
|
REAL_FATTR_NONNULL_ALL REAL_FATTR_ALWAYS_INLINE REAL_FATTR_PURE;
|
||||||
|
|
||||||
/// Return information about the next character.
|
/// Return information about the next character.
|
||||||
/// Composing and combining characters are
|
/// Composing and combining characters are considered a part of the current character.
|
||||||
/// considered a part of the current character.
|
|
||||||
///
|
///
|
||||||
/// @param[in] cur Pointer to the current character. Must not point to NUL
|
/// @param[in] cur Information about the current character in the string.
|
||||||
/// @param[in] cur_char Decoded charater at 'cur'.
|
|
||||||
static inline StrCharInfo utfc_next(StrCharInfo cur)
|
static inline StrCharInfo utfc_next(StrCharInfo cur)
|
||||||
{
|
{
|
||||||
int32_t prev_code = cur.chr.value;
|
int32_t prev_code = cur.chr.value;
|
||||||
|
@ -58,11 +58,11 @@ typedef struct {
|
|||||||
} vimconv_T;
|
} vimconv_T;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t value; ///< code point
|
int32_t value; ///< Code point.
|
||||||
int len; ///< length in bytes
|
int len; ///< Length in bytes.
|
||||||
} CharInfo;
|
} CharInfo;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *ptr; ///< pointer to the first byte of the character
|
char *ptr; ///< Pointer to the first byte of the character.
|
||||||
CharInfo chr; ///< the character
|
CharInfo chr; ///< Information about the character.
|
||||||
} StrCharInfo;
|
} StrCharInfo;
|
||||||
|
@ -129,7 +129,7 @@ bool keep_msg_more = false; // keep_msg was set by msgmore()
|
|||||||
// Set: When the ruler or typeahead display is overwritten,
|
// Set: When the ruler or typeahead display is overwritten,
|
||||||
// scrolling the screen for some message.
|
// scrolling the screen for some message.
|
||||||
// keep_msg Message to be displayed after redrawing the screen, in
|
// keep_msg Message to be displayed after redrawing the screen, in
|
||||||
// main_loop().
|
// Normal mode main loop.
|
||||||
// This is an allocated string or NULL when not used.
|
// This is an allocated string or NULL when not used.
|
||||||
|
|
||||||
// Extended msg state, currently used for external UIs with ext_messages
|
// Extended msg state, currently used for external UIs with ext_messages
|
||||||
|
@ -95,7 +95,7 @@ static void cursorhold_event(void **argv)
|
|||||||
static void create_cursorhold_event(bool events_enabled)
|
static void create_cursorhold_event(bool events_enabled)
|
||||||
{
|
{
|
||||||
// If events are enabled and the queue has any items, this function should not
|
// If events are enabled and the queue has any items, this function should not
|
||||||
// have been called(inbuf_poll would return kInputAvail)
|
// have been called (inbuf_poll would return kInputAvail).
|
||||||
// TODO(tarruda): Cursorhold should be implemented as a timer set during the
|
// TODO(tarruda): Cursorhold should be implemented as a timer set during the
|
||||||
// `state_check` callback for the states where it can be triggered.
|
// `state_check` callback for the states where it can be triggered.
|
||||||
assert(!events_enabled || multiqueue_empty(main_loop.events));
|
assert(!events_enabled || multiqueue_empty(main_loop.events));
|
||||||
@ -110,7 +110,7 @@ static void restart_cursorhold_wait(int tb_change_cnt)
|
|||||||
|
|
||||||
/// Low level input function
|
/// Low level input function
|
||||||
///
|
///
|
||||||
/// wait until either the input buffer is non-empty or, if `events` is not NULL
|
/// Wait until either the input buffer is non-empty or, if `events` is not NULL
|
||||||
/// until `events` is non-empty.
|
/// until `events` is non-empty.
|
||||||
int os_inchar(uint8_t *buf, int maxlen, int ms, int tb_change_cnt, MultiQueue *events)
|
int os_inchar(uint8_t *buf, int maxlen, int ms, int tb_change_cnt, MultiQueue *events)
|
||||||
{
|
{
|
||||||
@ -543,7 +543,7 @@ bool os_input_ready(MultiQueue *events)
|
|||||||
{
|
{
|
||||||
return (typebuf_was_filled // API call filled typeahead
|
return (typebuf_was_filled // API call filled typeahead
|
||||||
|| rbuffer_size(input_buffer) // Input buffer filled
|
|| rbuffer_size(input_buffer) // Input buffer filled
|
||||||
|| pending_events(events)); // Events must be processed
|
|| pending_events(events)); // Events must be processed
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit because of an input read error.
|
// Exit because of an input read error.
|
||||||
|
@ -18,23 +18,23 @@ enum {
|
|||||||
/// Argument for char size functions.
|
/// Argument for char size functions.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
win_T *win;
|
win_T *win;
|
||||||
char *line; ///< start of the line
|
char *line; ///< Start of the line.
|
||||||
|
|
||||||
bool use_tabstop; ///< use tabstop for tab insted of counting it as ^I
|
bool use_tabstop; ///< Use 'tabstop' instead of char2cells() for a TAB.
|
||||||
int indent_width; ///< width of showbreak and breakindent on wrapped lines
|
int indent_width; ///< Width of 'showbreak' and 'breakindent' on wrapped
|
||||||
/// INT_MIN if not yet calculated
|
///< parts of lines, INT_MIN if not yet calculated.
|
||||||
|
|
||||||
int virt_row; ///< line number, -1 if no virtual text
|
int virt_row; ///< Row for virtual text, -1 if no virtual text.
|
||||||
int cur_text_width_left; ///< width of virtual text left of cursor
|
int cur_text_width_left; ///< Width of virtual text left of cursor.
|
||||||
int cur_text_width_right; ///< width of virtual text right of cursor
|
int cur_text_width_right; ///< Width of virtual text right of cursor.
|
||||||
|
|
||||||
int max_head_vcol; ///< see charsize_regular()
|
int max_head_vcol; ///< See charsize_regular().
|
||||||
MarkTreeIter iter[1];
|
MarkTreeIter iter[1];
|
||||||
} CharsizeArg;
|
} CharsizeArg;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int width;
|
int width;
|
||||||
int head; // size of breakindent etc. before the character (included in width)
|
int head; ///< Size of 'breakindent' etc. before the character (included in width).
|
||||||
} CharSize;
|
} CharSize;
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
|
@ -31,7 +31,7 @@ describe('highlight: `:syntax manual`', function()
|
|||||||
clear()
|
clear()
|
||||||
screen = Screen.new(20, 5)
|
screen = Screen.new(20, 5)
|
||||||
screen:attach()
|
screen:attach()
|
||||||
--syntax highlight for vimcscripts "echo"
|
-- syntax highlight for vimscript's "echo"
|
||||||
screen:set_default_attr_ids({
|
screen:set_default_attr_ids({
|
||||||
[0] = { bold = true, foreground = Screen.colors.Blue },
|
[0] = { bold = true, foreground = Screen.colors.Blue },
|
||||||
[1] = { bold = true, foreground = Screen.colors.Brown },
|
[1] = { bold = true, foreground = Screen.colors.Brown },
|
||||||
|
Loading…
Reference in New Issue
Block a user