aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua-guide.txt
Commit message (Collapse)AuthorAge
* docs: miscdundargoc2025-01-11
| | | | | | | | | | | | | | | Co-authored-by: Axel <axelhjq@gmail.com> Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com> Co-authored-by: Juan Giordana <juangiordana@gmail.com> Co-authored-by: Lincoln Wallace <locnnil0@gmail.com> Co-authored-by: Matti Hellström <hellstrom@scm.com> Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: ifish <fishioon@live.com>
* refactor: rename vim.highlight => vim.hlJustin M. Keyes2024-10-21
| | | | | | | | | | | | Problem: - `vim.highlight` module does not follow `:help dev-name-common`, which documents the name for "highlight" as "hl". - Shorter names are usually preferred. Solution: Rename `vim.highlight` to `vim.hl`. This is not a breaking change until 2.0 (or maybe never).
* docs: misc (#28837)dundargoc2024-06-07
| | | | | | | | | | | | | | | Co-authored-by: Danymat <d.danymat@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Jakub Okoński <jakub@okonski.org> Co-authored-by: John L. Villalovos <john@sodarock.com> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Michaili K <git@michaili.dev> Co-authored-by: TheLeoP <eugenio2305@hotmail.com> Co-authored-by: Tobias Schmitz <tobiasschmitz2001@gmail.com> Co-authored-by: W20MC <157727813+W20MC@users.noreply.github.com> Co-authored-by: Will Hopkins <willothyh@gmail.com> Co-authored-by: Yifan Hu <141280278+b0ae989c@users.noreply.github.com> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: prljav <74116121+prljav@users.noreply.github.com>
* docs: small fixes (#26243)dundargoc2023-12-06
| | | | | Co-authored-by: umlx5h <umlx5h21@protonmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Evan Farrar <evan@evanfarrar.com>
* docs: small fixesdundargoc2023-10-10
| | | | | | Co-authored-by: Wansmer <wansmer@gmail.com> Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com> Co-authored-by: David Moberg <david.moberg@mediatek.com>
* docs: luaref cleanup #24541Justin M. Keyes2023-08-03
| | | | - drop "luaref-" prefix in favor of "lua-" or nothing, where possible. - remove redundant "luaref--lang…" and "luaref-api…" tags.
* docs: remove trailing spaces #24455ii142023-07-25
|
* feat(lua): allow vim.wo to be double indexed (#20288)Lewis Russell2023-07-07
| | | | | | | | * feat(lua): allow vim.wo to be double indexed Problem: `vim.wo` does not implement `setlocal` Solution: Allow `vim.wo` to be double indexed Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* fix(docs): ignore_invalid #24174Justin M. Keyes2023-06-27
| | | Regex bug in scripts/gen_help_html.lua:ignore_invalid()
* docs: autocmds, miscJustin M. Keyes2023-06-25
|
* docs: small fixes (#23619)dundargoc2023-06-02
| | | | | | Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Gustavo Ferreira <gustavo.ferreira@imaginecurve.com> Co-authored-by: Kai Moschcau <mail@kmoschcau.de> Co-authored-by: Lampros <hauahx@gmail.com>
* docs: small fixesdundargoc2023-05-13
| | | | | | | | | 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>
* docs: fix typosdundargoc2023-04-04
| | | | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: himanoa <matsunoappy@gmail.com>
* refactor!: rename vim.pretty_print => vim.printJustin M. Keyes2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The function name `vim.pretty_print`: 1. is verbose, which partially defeats its purpose as sugar 2. does not draw from existing precedent or any sort of convention (except external projects like penlight or python?), which reduces discoverability, and degrades signaling about best practices. Solution: - Rename to `vim.print`. - Change the behavior so that 1. strings are printed without quotes 2. each arg is printed on its own line 3. tables are indented with 2 instead of 4 spaces - Example: :lua ='a', 'b', 42, {a=3} a b 42 { a = 3 } Comparison of alternatives: - `vim.print`: - pro: consistent with Lua's `print()` - pro: aligns with potential `nvim_print` API function which will replace nvim_echo, nvim_notify, etc. - con: behaves differently than Lua's `print()`, slightly misleading? - `vim.echo`: - pro: `:echo` has similar "pretty print" behavior. - con: inconsistent with Lua idioms. - `vim.p`: - pro: very short, fits with `vim.o`, etc. - con: not as discoverable as "echo" - con: less opportunity for `local p = vim.p` because of potential shadowing.
* docs: fix more treesitter parsing errorsChristian Clason2023-02-23
|
* docs: naming conventions, guidelinesJustin M. Keyes2023-02-22
| | | | close #21063
* docs(lua): lua-guide: <Nop> is for rhs of vim.keymap.set(), not lhs (#21814)Naru2023-01-15
|
* docs: fix typos (#21427)dundargoc2023-01-04
| | | | | | Co-authored-by: Gustavo Sampaio <gbritosampaio@gmail.com> Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com> Co-authored-by: Tomas Nemec <nemi@skaut.cz>
* docs: clarify line about converse of lua-heredoc (#21592)Sean2022-12-30
| | | Co-authored-by: sean.twie03 <nothankyou@gmail.com>
* docs(lua): add guide to using Lua in Neovim (#21137)dundargoc2022-12-08
Add introductory guide explaining how to use Lua in Neovim: where to put Lua files, how to set variables and options, how to create mappings, autocommands, and user commands. Adapted with kind permission from https://github.com/nanotee/nvim-lua-guide