mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	feat(lsp.util): deprecate vim.lsp.util.stylize_markdown
It's not used anywhere.
This commit is contained in:
		
				
					committed by
					
						
						Lewis Russell
					
				
			
			
				
	
			
			
			
						parent
						
							379c37fa0b
						
					
				
				
					commit
					a8edf6e445
				
			@@ -29,7 +29,8 @@ HIGHLIGHTS
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
LSP
 | 
					LSP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
• todo
 | 
					• *vim.lsp.util.stylize_markdown()"	Use |vim.treesitter.start()| with
 | 
				
			||||||
 | 
										`vim.wo.conceallevel = 2`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LUA
 | 
					LUA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2495,32 +2495,6 @@ show_document({location}, {position_encoding}, {opts})
 | 
				
			|||||||
    Return: ~
 | 
					    Return: ~
 | 
				
			||||||
        (`boolean`) `true` if succeeded
 | 
					        (`boolean`) `true` if succeeded
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                             *vim.lsp.util.stylize_markdown()*
 | 
					 | 
				
			||||||
stylize_markdown({bufnr}, {contents}, {opts})
 | 
					 | 
				
			||||||
    Converts markdown into syntax highlighted regions by stripping the code
 | 
					 | 
				
			||||||
    blocks and converting them into highlighted code. This will by default
 | 
					 | 
				
			||||||
    insert a blank line separator after those code block regions to improve
 | 
					 | 
				
			||||||
    readability.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    This method configures the given buffer and returns the lines to set.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    If you want to open a popup with fancy markdown, use
 | 
					 | 
				
			||||||
    `open_floating_preview` instead
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Parameters: ~
 | 
					 | 
				
			||||||
      • {bufnr}     (`integer`)
 | 
					 | 
				
			||||||
      • {contents}  (`string[]`) of lines to show in window
 | 
					 | 
				
			||||||
      • {opts}      (`table?`) with optional fields
 | 
					 | 
				
			||||||
                    • height of floating window
 | 
					 | 
				
			||||||
                    • width of floating window
 | 
					 | 
				
			||||||
                    • wrap_at character to wrap at for computing height
 | 
					 | 
				
			||||||
                    • max_width maximal width of floating window
 | 
					 | 
				
			||||||
                    • max_height maximal height of floating window
 | 
					 | 
				
			||||||
                    • separator insert separator after code block
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Return: ~
 | 
					 | 
				
			||||||
        (`table`) stripped content
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                                             *vim.lsp.util.symbols_to_items()*
 | 
					                                             *vim.lsp.util.symbols_to_items()*
 | 
				
			||||||
symbols_to_items({symbols}, {bufnr}, {position_encoding})
 | 
					symbols_to_items({symbols}, {bufnr}, {position_encoding})
 | 
				
			||||||
    Converts symbols to quickfix list items.
 | 
					    Converts symbols to quickfix list items.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -190,6 +190,6 @@ These deprecated features were removed.
 | 
				
			|||||||
==============================================================================
 | 
					==============================================================================
 | 
				
			||||||
DEPRECATIONS                                                *news-deprecations*
 | 
					DEPRECATIONS                                                *news-deprecations*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
See |deprecated-0.11|.
 | 
					See |deprecated-0.12|.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 vim:tw=78:ts=8:sw=2:et:ft=help:norl:
 | 
					 vim:tw=78:ts=8:sw=2:et:ft=help:norl:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1079,6 +1079,7 @@ local function get_markdown_fences()
 | 
				
			|||||||
  return fences
 | 
					  return fences
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- @deprecated
 | 
				
			||||||
--- Converts markdown into syntax highlighted regions by stripping the code
 | 
					--- Converts markdown into syntax highlighted regions by stripping the code
 | 
				
			||||||
--- blocks and converting them into highlighted code.
 | 
					--- blocks and converting them into highlighted code.
 | 
				
			||||||
--- This will by default insert a blank line separator after those code block
 | 
					--- This will by default insert a blank line separator after those code block
 | 
				
			||||||
@@ -1099,6 +1100,7 @@ end
 | 
				
			|||||||
---  - separator insert separator after code block
 | 
					---  - separator insert separator after code block
 | 
				
			||||||
---@return table stripped content
 | 
					---@return table stripped content
 | 
				
			||||||
function M.stylize_markdown(bufnr, contents, opts)
 | 
					function M.stylize_markdown(bufnr, contents, opts)
 | 
				
			||||||
 | 
					  vim.deprecate('vim.lsp.util.stylize_markdown', nil, '0.14')
 | 
				
			||||||
  validate('contents', contents, 'table')
 | 
					  validate('contents', contents, 'table')
 | 
				
			||||||
  validate('opts', opts, 'table', true)
 | 
					  validate('opts', opts, 'table', true)
 | 
				
			||||||
  opts = opts or {}
 | 
					  opts = opts or {}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user