summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_inspector.lua
AgeCommit message (Collapse)AuthorFiles
2025-08-23fix(treesitter): show capture-level priorities in :Inspect #35443Riley Bruins1
2025-05-27feat(api): set nvim_echo() kind for ext_messages (#33998)luukvbaal1
Problem: Unable to emit a message with arbitrary kind. Solution: Add a "kind" opts field to nvim_echo(). Use it to set the "list_cmd" kind for vim.show_pos().
2025-03-18fix(lua): ensure inspect_pos() only shows visible highlight extmarksLuuk van Baal1
Problem: Unpaired marks are shown with `filter.extmarks == true`, which should only return visible highlights. Misleading `end_col` included in `inspect_pos()` for unpaired mark; it is set to `start_col + 1` which would be a visible highlight, which it is not. Custom "is_here" filter used to get extmarks overlapping a position. Solution: Exclude unpaired highlight extmarks with `filter.extmarks == true`. Set `end_col` to `start_col` for an unpaired mark. Supply appropriate arguments to nvim_buf_get_extmarks() to return overlapping extmarks; exclude marks whose end is at `{row, col}` with `filter.extmarks == true`.
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2025-01-22fix(inspector): update semantic token namespace (#32157)jdrouhard1
This updates the extmark namespace to search for when filtering out semantic tokens to match the new namespace style recently introduced.
2024-12-07refactor: add vim._resolve_bufnrLewis Russell1
2024-12-07fix(inspect): always show priorityChristian Clason1
Problem: It is not obvious if a treesitter highlight priority shown in `:Inspect` is higher or lower than the default. Solution: Also print default priority (`vim.hl.priorities.treesitter`). Add padding for better readability.
2024-12-07fix(inspect): show priority for treesitter highlightsChristian Clason1
Problem: `:Inspect` does not show priority for treesitter highlights, leading to confusion why sometimes earlier highlights override later highlights. Solution: Also print priority metadata if set.
2024-12-01docs: example keybind for :Inspect #31391C.D. MacEachern1
2024-10-04docs: render `@since` versions, 0 means experimental #30649Justin M. Keyes1
An implication of this current approach is that `NVIM_API_LEVEL` should be bumped when a new Lua function is added. TODO(future): add a lint check which requires `@since` on all new functions. ref #25416
2024-06-28refactor: use `vim._with` where possibledundargoc1
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`.
2024-04-26fix: lua annotationsLewis Russell1
2024-03-09docs: support inline markdownLewis Russell1
- Tags are now created with `[tag]()` - References are now created with `[tag]` - Code spans are no longer wrapped
2024-03-05docs(lua): improvements for LSP and DiagnosticLewis Russell1
2024-03-01docs: improve/add documentation of Lua typesLewis Russell1
- Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
2024-02-27feat(docs): replace lua2dox.luaLewis Russell1
Problem: The documentation flow (`gen_vimdoc.py`) has several issues: - it's not very versatile - depends on doxygen - doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C. - The intermediate XML files and filters makes it too much like a rube goldberg machine. Solution: Re-implement the flow using Lua, LPEG and treesitter. - `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic. - `lua2dox.lua` is gone! - No more XML files. - Doxygen is now longer used and instead we now use: - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`). - LPEG for C parsing (see `scripts/cdoc_parser.lua`) - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`). - Treesitter for Markdown parsing (see `scripts/text_utils.lua`). - The generated `runtime/doc/*.mpack` files have been removed. - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly. - Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
2023-07-18docs(lua): more improvements (#24387)Lewis Russell1
* docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-05-13docs: small fixesdundargoc1
Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: HiPhish <hiphish@posteo.de> Co-authored-by: Julio B <julio.bacel@gmail.com> Co-authored-by: T727 <74924917+T-727@users.noreply.github.com> Co-authored-by: camoz <camoz@users.noreply.github.com> Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-04-16fix(lua): inspect_pos respect bufnr when get syntax info (#23098)Raphael1
2023-04-02refactor(lua): get all marks instead of iterating over namespacesLuuk van Baal1
Inspector now also includes highlights set in anonymous namespaces. Close #22732
2023-03-06feat(lsp)!: add rule-based sem token highlighting (#22022)swarn1
feat(lsp)!: change semantic token highlighting Change the default highlights used, and add more highlights per token. Add an LspTokenUpdate event and a highlight_token function. :Inspect now shows any highlights applied by token highlighting rules, default or user-defined. BREAKING CHANGE: change the default highlight groups used by semantic token highlighting.
2023-03-04docs(inspect): number → integer (#22511)Jaehwang Jung1
2023-02-28fix(inspect): alwasy resolve full treesitter lang hl groupsFolke Lemaitre1
2022-12-17feat: `vim.inspect_pos`, `vim.show_pos`, `:Inspect`Folke Lemaitre1