mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	docs: various #12823
- increase python line-length limit from 88 => 100. - gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains) ref #15632 fix #18215 fix #18479 fix #20527 fix #20532 Co-authored-by: Ben Weedon <ben@weedon.email>
This commit is contained in:
		@@ -17,9 +17,13 @@ BASENAME="$(basename "${0}")"
 | 
			
		||||
readonly BASENAME
 | 
			
		||||
 | 
			
		||||
usage() {
 | 
			
		||||
  echo "Bump Neovim dependencies"
 | 
			
		||||
  echo "Bump Nvim dependencies"
 | 
			
		||||
  echo
 | 
			
		||||
  echo "Usage:  ${BASENAME} [ -h | --pr | --branch=<dep> | --dep=<dependency> ]"
 | 
			
		||||
  echo "    Update a dependency:"
 | 
			
		||||
  echo "        ./scripts/bump-deps.sh --dep Luv --version 1.43.0-0"
 | 
			
		||||
  echo "    Create a PR:"
 | 
			
		||||
  echo "        ./scripts/bump-deps.sh --pr"
 | 
			
		||||
  echo
 | 
			
		||||
  echo "Options:"
 | 
			
		||||
  echo "    -h                    show this message and exit."
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ local spell_dict = {
 | 
			
		||||
  NeoVim = 'Nvim',
 | 
			
		||||
  neovim = 'Nvim',
 | 
			
		||||
  lua = 'Lua',
 | 
			
		||||
  VimL = 'Vimscript',
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local M = {}
 | 
			
		||||
@@ -42,7 +43,9 @@ local M = {}
 | 
			
		||||
local new_layout = {
 | 
			
		||||
  ['api.txt'] = true,
 | 
			
		||||
  ['channel.txt'] = true,
 | 
			
		||||
  ['deprecated.txt'] = true,
 | 
			
		||||
  ['develop.txt'] = true,
 | 
			
		||||
  ['lua.txt'] = true,
 | 
			
		||||
  ['luaref.txt'] = true,
 | 
			
		||||
  ['news.txt'] = true,
 | 
			
		||||
  ['nvim.txt'] = true,
 | 
			
		||||
@@ -158,8 +161,8 @@ local function is_noise(line, noise_lines)
 | 
			
		||||
    or line:find('%s*%*?[a-zA-Z]+%.txt%*?%s+N?[vV]im%s*$')
 | 
			
		||||
    -- modeline
 | 
			
		||||
    -- Example: "vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl:"
 | 
			
		||||
    or line:find('^%s*vi[m]%:.*ft=help')
 | 
			
		||||
    or line:find('^%s*vi[m]%:.*filetype=help')
 | 
			
		||||
    or line:find('^%s*vim?%:.*ft=help')
 | 
			
		||||
    or line:find('^%s*vim?%:.*filetype=help')
 | 
			
		||||
    or line:find('[*>]local%-additions[*<]')
 | 
			
		||||
  ) then
 | 
			
		||||
    -- table.insert(stats.noise_lines, getbuflinestr(root, opt.buf, 0))
 | 
			
		||||
@@ -457,7 +460,7 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
 | 
			
		||||
    if root:has_error() then
 | 
			
		||||
      return text
 | 
			
		||||
    end
 | 
			
		||||
    local in_heading = vim.tbl_count({'h1', 'h2', 'h3'}, parent)
 | 
			
		||||
    local in_heading = vim.tbl_contains({'h1', 'h2', 'h3'}, parent)
 | 
			
		||||
    local cssclass = (not in_heading and get_indent(node_text()) > 8) and 'help-tag-right' or 'help-tag'
 | 
			
		||||
    local tagname = node_text(root:child(1))
 | 
			
		||||
    if vim.tbl_count(stats.first_tags) < 2 then
 | 
			
		||||
@@ -465,7 +468,8 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
 | 
			
		||||
      table.insert(stats.first_tags, tagname)
 | 
			
		||||
      return ''
 | 
			
		||||
    end
 | 
			
		||||
    local s = ('%s<a name="%s"></a><span class="%s">%s</span>'):format(ws(), url_encode(tagname), cssclass, trimmed)
 | 
			
		||||
    local el = in_heading and 'span' or 'code'
 | 
			
		||||
    local s = ('%s<a name="%s"></a><%s class="%s">%s</%s>'):format(ws(), url_encode(tagname), el, cssclass, trimmed, el)
 | 
			
		||||
    if in_heading and prev ~= 'tag' then
 | 
			
		||||
      -- Start the <span> container for tags in a heading.
 | 
			
		||||
      -- This makes "justify-content:space-between" right-align the tags.
 | 
			
		||||
@@ -762,7 +766,7 @@ local function gen_css(fname)
 | 
			
		||||
    }
 | 
			
		||||
    .toc {
 | 
			
		||||
      /* max-width: 12rem; */
 | 
			
		||||
      height: 95%;  /* Scroll if there are too many items. https://github.com/neovim/neovim.github.io/issues/297 */
 | 
			
		||||
      height: 85%;  /* Scroll if there are too many items. https://github.com/neovim/neovim.github.io/issues/297 */
 | 
			
		||||
      overflow: auto;  /* Scroll if there are too many items. https://github.com/neovim/neovim.github.io/issues/297 */
 | 
			
		||||
    }
 | 
			
		||||
    .toc > div {
 | 
			
		||||
 
 | 
			
		||||
@@ -2,9 +2,7 @@
 | 
			
		||||
"""Generates Nvim :help docs from C/Lua docstrings, using Doxygen.
 | 
			
		||||
 | 
			
		||||
Also generates *.mpack files. To inspect the *.mpack structure:
 | 
			
		||||
 | 
			
		||||
    :new | put=v:lua.vim.inspect(msgpackparse(readfile('runtime/doc/api.mpack')))
 | 
			
		||||
 | 
			
		||||
    :new | put=v:lua.vim.inspect(v:lua.vim.mpack.unpack(readfile('runtime/doc/api.mpack','B')))
 | 
			
		||||
 | 
			
		||||
Flow:
 | 
			
		||||
    main
 | 
			
		||||
@@ -287,7 +285,7 @@ annotation_map = {
 | 
			
		||||
    'FUNC_API_FAST': '|api-fast|',
 | 
			
		||||
    'FUNC_API_CHECK_TEXTLOCK': 'not allowed when |textlock| is active',
 | 
			
		||||
    'FUNC_API_REMOTE_ONLY': '|RPC| only',
 | 
			
		||||
    'FUNC_API_LUA_ONLY': '|vim.api| only',
 | 
			
		||||
    'FUNC_API_LUA_ONLY': 'Lua |vim.api| only',
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user