aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/starting.txt
Commit message (Collapse)AuthorAge
* docs: miscdundargoc2025-01-30
| | | | | | | | | Co-authored-by: Dustin S. <dstackmasta27@gmail.com> Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* docs: misc #31867Justin M. Keyes2025-01-09
|
* "nvim -es": disable shada #21723Justin M. Keyes2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim -es` (and `nvim -Es`) is the recommended way to non-interactively run commands/vimscript. But it enables shada by default, which is usually not wanted. Solution: - Disable shada by default for `nvim -es/-Es`. This can be overridden by `-i foo` if needed. - Do NOT change the 'loadplugins' default. - User config + packages _should_ be enabled by default, for both `nvim -es` and `nvim -l`. Else any Lua packages you have can't be accessed without `-u path/to/config`, which is clumsy. - Use-cases: ``` nvim --headless "+Lazy! sync" +qa would become: nvim -es "+Lazy! sync" nvim --headless +PlugInstall +qall would become: nvim -es +PlugInstall ``` - Opt-out (`--clean` or `-u NONE`) is much easier than opt-in (`-u path/to/config`). - User config/packages are analogous to pip packages, which are expected when doing `python -c ...`. related: 7c94bcd2d77e2e54b8836ab8325460a367b79eae related: ddd0eb6f5120a09b97867d2561ea61309038ccd2
* docs: lua error patterns #30240Justin M. Keyes2024-09-24
| | | | Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net> Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
* docs: remove remaining mentions of hkmap (#28038)zeertzjq2024-03-26
|
* vim-patch:78c189837ae6 (#27920)zeertzjq2024-03-19
| | | | | | | | | | | | | | | | | | | runtime(doc): Recover some missed commas and periods in starting.txt Also: - Insert some missing words; - Strive for consistency with capitalisation of words; - Improve shell alias examples. The gvim words were left alone for now, but they deserve to be treated like proper names, GVim or GUI Vim, unless these refer to executable filenames (on *nix systems). closes: vim/vim#14194 https://github.com/vim/vim/commit/78c189837ae6a03fa5fbb62eabde66e3da9253a3 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* docs(starting.txt): correct step number (#26185)zeertzjq2023-11-24
|
* feat(server): allow embed with listen (#25709)George Harker2023-11-01
| | | | | | connection from any channel or stdio will unblock remote_ui_wait_for_attach. Wait on stdio only if only —embed specified, if both —embed and —listen then wait on any channel.
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* docs: clarify about error in shada (#25594)sisrfeng2023-10-11
|
* feat: NVIM_APPNAME supports relative paths #25233Rory Nesbitt2023-09-27
| | | | | | | | | | | | | | Problem: NVIM_APPNAME does not allow path separators in the name, so relative paths can't be used: NVIM_APPNAME="neovim-configs/first-config" nvim NVIM_APPNAME="neovim-configs/second-config" nvim Solution: Let NVIM_APPNAME be a relative path. Absolute paths are not supported. fix #23056 fix #24966
* docs: document $XDG environment variables #25227Eduardo Rittner Coelho2023-09-20
|
* docs: remove trailing spaces #24455ii142023-07-25
|
* perf(rtp): reduce rtp scans (#24191)Lewis Russell2023-07-13
| | | | | | | | | | | * perf(rtp): reduce rtp scans Problem: Scanning the filesystem is expensive and particularly affects startuptime. Solution: Reduce the amount of redundant directory scans by relying less on glob patterns and handle vim and lua sourcing lower down.
* fix(startup)!: "nvim -l" message does not end with newline #24215zeertzjq2023-07-01
| | | Close #24180
* fix(docs): vimdoc syntax errorsJustin M. Keyes2023-06-25
| | | | gen_help_html: truncate parse-error sample text
* test: spellcheck :help (vimdoc) files #24109Justin M. Keyes2023-06-22
| | | | | | | Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy).
* docs #24061Justin M. Keyes2023-06-19
| | | | | | | | | | | | | | - nvim requires rpc responses in reverse order. https://github.com/neovim/neovim/issues/19932 - NVIM_APPNAME: UIs normally should NOT set this. ref #23520 fix #24050 fix #23660 fix #23353 fix #23337 fix #22213 fix #19161 fix #18088 fix #20693
* vim-patch:10e8ff9b2607 (#23977)Sean Dewar2023-06-11
| | | | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/10e8ff9b26078994cae57c2422b145d37aaf714e Also: - fix a missing `<` in builtin.txt. - edit `:function` `{name}` wording to match the change made for the docs above by Justin in #10619. - link to `*vimrc*` rather than `*init.vim*` in repeat.txt change (as `init.lua` may also be used). Co-authored-by: Bram Moolenaar <Bram@vim.org>
* 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>
* feat: try to recover from missing tempdir #22573Justin M. Keyes2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If vim_tempdir mysteriously goes missing (typically by "antivirus" on Windows), any plugins using tempname() will be broken for the rest of the session. #1432 #9833 https://groups.google.com/g/vim_use/c/ef55jNm5czI Steps: mkdir foo TMPDIR=./foo nvim :echo tempname() !rm -r foo :echo tempname() tempname() still uses the foo path even though it was deleted. Solution: - Don't assume that vim_tempdir exists. - If it goes missing once, retry vim_mktempdir and log (silently) an error. - If it goes missing again, retry vim_mktempdir and show an error. Rejected in Vim for performance reasons: https://groups.google.com/g/vim_use/c/qgRob9SWDv8/m/FAOFVVcDTv0J https://groups.google.com/g/vim_dev/c/cogp-Vye4oo/m/d_SVFXBbnnoJ But, logging shows that `vim_gettempdir` is not called frequently. Fixes #1432 Fixes #9833 Fixes #11250 Related: stdpath("run") f50135a32e11c535e1dc3a8e9460c5b4e640ee86
* feat(edit)!: remove old c implementation of hebrew keymapbfredl2023-02-28
| | | | | | | This feature has long been obsolete. The 'keymap' option can be used to support language keymaps, including hebrew and hebrewp (phonetic mapping). There is no need to keep the old c code with hardcoded keymaps for some languages.
* docs: fix typos (#22353)zeertzjq2023-02-22
|
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | This commit implements the ability to control all of the XDG paths Neovim should use. This is done by setting an environment variable named NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of $XDG_CONFIG_HOME/nvim. If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as default. The usecase for this feature is to enable an easy way to switch from configuration to configuration. One might argue that the various $XDG environment variables can already be used for this usecase. However, setting $XDG environment variables also affects tools spawned by Neovim. For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a different configuration directory, it will also prevent Git from finding its "default" configuration. Closes https://github.com/neovim/neovim/issues/21691
* feat(lua): low-level interpreter mode (nvim -ll)bfredl2023-01-31
|
* feat(lua): store "nvim -l" scriptname in _G.arg[0]Justin M. Keyes2023-01-07
|
* feat(lua): execute stdin ("-") as LuaJustin M. Keyes2023-01-05
|
* feat(lua): send "--" literally to Lua "-l" scriptJustin M. Keyes2023-01-05
| | | | | | | | | | | | Problem: When "-l" is followed by "--", we stop sending args to the Lua script and treat "--" in the usual way. This was for flexibility but didn't have a strong use-case, and has these problems: - prevents Lua "-l" scripts from handling "--" in their own way. - complicates the startup logic (must call nlua_init before command_line_scan) Solution: Don't treat "--" specially if it follows "-l".
* feat(lua)!: execute Lua with "nvim -l"Justin M. Keyes2023-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim has Lua but the "nvim" CLI can't easily be used to execute Lua scripts, especially scripts that take arguments or produce output. Solution: - support "nvim -l [args...]" for running scripts. closes #15749 - exit without +q - remove lua2dox_filter - remove Doxyfile. This wasn't used anyway, because the doxygen config is inlined in gen_vimdoc.py (`Doxyfile` variable). - use "nvim -l" in docs-gen CI job Examples: $ nvim -l scripts/lua2dox.lua --help Lua2DoX (0.2 20130128) ... $ echo "print(vim.inspect(_G.arg))" | nvim -l - --arg1 --arg2 $ echo 'print(vim.inspect(vim.api.nvim_buf_get_text(1,0,0,-1,-1,{})))' | nvim +"put ='text'" -l - TODO? -e executes Lua code -l loads a module -i enters REPL _after running the other arguments_.
* docs: fix treesitter parsing errorsChristian Clason2023-01-01
|
* feat(exrc): support .nvim.lua (#21436)Munif Tanjim2022-12-19
|
* feat(docs): update parser, HTML gen #20720Justin M. Keyes2022-10-18
| | | | | | | | | | Note: although the tolerance in help_spec.lua increased, the actual error count with the new parser decreased by about 20%. The difference is that the old ignore_parse_error() ignored many more errors with the old parser. fix https://github.com/neovim/tree-sitter-vimdoc/issues/37 fix https://github.com/neovim/tree-sitter-vimdoc/issues/44 fix https://github.com/neovim/tree-sitter-vimdoc/issues/47
* feat(runtime)!: remove filetype.vim (#20428)Christian Clason2022-10-17
| | | | | | Made obsolete by now graduated `filetype.lua` (enabled by default). Note that changes or additions to the filetype detection still need to be made through a PR to vim/vim as we port the _logic_ as well as tests.
* docs: various #12823Justin M. Keyes2022-10-09
| | | | | | | | | | | | - 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>
* fix(docs-html): keycodes, taglinks, column_heading #20498Justin M. Keyes2022-10-06
| | | | | | | | | | | | | | | | | | Problem: - Docs HTML: "foo ~" headings (column_heading) are not aligned with their table columns/contents because the leading whitespace is not emitted. - taglinks starting with hyphen like |-x| were not recognized. - keycodes like `<foo>` and `CTRL-x` were not recognized. - ToC is not scrollable. Solution: - Add ws() to the column_heading case. - Update help parser to latest version - supports `keycode` - fixes for taglink, argument - Update .toc CSS. https://github.com/neovim/neovim.github.io/issues/297 fix https://github.com/neovim/neovim.github.io/issues/297
* feat(docs): nested lists in HTML, update :help parserJustin M. Keyes2022-10-04
| | | | | | | | | | | | - Docs HTML: improvements in https://github.com/neovim/tree-sitter-vimdoc allow us to many hacks in `gen_help_html.lua`. - Docs HTML: support nested lists. - Docs HTML: avoid extra newlines (too much whitespace) in old (preformatted) layout. - Docs HTML: disable golden-grid for narrow viewport. - Workaround for https://github.com/neovim/neovim/issues/20404 closes https://github.com/neovim/neovim/issues/20404
* fix(docs): invalid :help links #20345Justin M. Keyes2022-09-25
| | | | | Fix those naughty single quotes. closes #20159
* feat(defaults): mouse=nvi #19290matveyt2022-07-17
| | | | | | | | | | Problem: Since right-click can now show a popup menu, we can provide messaging to guide users who expect 'mouse' to be disabled by default. So 'mouse' can now be enabled by default. Solution: Do it. Closes #15521
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* fix(logging): skip recursion, fix crash #18764Justin M. Keyes2022-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. The main log routine does not protect itself against recursion. log_lock() doesn't guard against recursion, it would deadlock... 2. 22b52dd462e5 (#11501) regressed 6f27f5ef91b3 (#10172), because set_init_1..process_spawn tries to log (see backtrace below), but the mutex isn't initialized yet. Even if the mutex were valid, we don't want early logging to fallback to stderr because that can break embedders when stdio is used for RPC. frame 1: 0x00000001001d54f4 nvim`open_log_file at log.c:205:7 frame 2: 0x00000001001d5390 nvim`logmsg(log_level=1, context="UI: ", func_name=0x0000000000000000, line_num=-1, eol=true, fmt="win_viewport") at log.c:150:20 frame : 0x000000010039aea2 nvim`ui_call_win_viewport(grid=2, win=1000, topline=0, botline=1, curline=0, curcol=0, line_count=1) at ui_events_call.generated.h:321:3 frame 4: 0x00000001003dfefc nvim`ui_ext_win_viewport(wp=0x0000000101816400) at window.c:939:5 frame 5: 0x00000001003ec5b4 nvim`win_ui_flush at window.c:7303:7 frame 6: 0x00000001003a04c0 nvim`ui_flush at ui.c:508:3 frame 7: 0x00000001002966ba nvim`do_os_system(argv=0x0000600000c0c000, input=0x0000000000000000, len=0, output=0x0000000000000000, nread=0x00007ff7bfefe830, silent=false, forward_output=false) at shell.c:894:3 frame 8: 0x0000000100295f68 nvim`os_call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_args=0x0000000000000000) at shell.c:663:18 frame 9: 0x0000000100295845 nvim`call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_shell_arg=0x0000000000000000) at shell.c:712:14 frame 10: 0x0000000100294c6f nvim`os_expand_wildcards(num_pat=1, pat=0x00007ff7bfefeb20, num_file=0x00007ff7bfefee58, file=0x00007ff7bfefee60, flags=43) at shell.c:328:7 ... frame 23: 0x000000010028ccef nvim`expand_env_esc(srcp=",~foo", dst="~foo", dstlen=4094, esc=false, one=false, prefix=0x0000000000000000) at env.c:673:17 frame 24: 0x000000010026fdd5 nvim`option_expand(opt_idx=29, val=",~foo") at option.c:1950:3 frame 25: 0x000000010026f129 nvim`set_init_1(clean_arg=false) at option.c:558:19 frame 26: 0x00000001001ea25e nvim`early_init(paramp=0x00007ff7bfeff5f0) at main.c:198:3 frame 27: 0x00000001001ea6bf nvim`main(argc=1, argv=0x00007ff7bfeff848) at main.c:255:3 Solution: 1. Check for recursion, show "internal error" message. - FUTURE: when "remote TUI" is merged, can we remove log_lock()? 2. Skip logging if log_init wasn't called yet.
* refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* feat(defaults): session data in $XDG_STATE_HOME #15583Ivan2022-05-12
| | | | | | | | | | | | See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
* vim-patch:c51cf0329809 (#17530)Christian Clason2022-02-27
| | | | Update runtime files. https://github.com/vim/vim/commit/c51cf0329809c7ae946c59d6f56699227efc9d1b
* vim-patch:6f4754b9f725 (#17179)Christian Clason2022-01-23
| | | | Update runtime files https://github.com/vim/vim/commit/6f4754b9f7253d7e4ba527064a24aff1acdb1e8f
* refactor: source ftplugin.vim separately from filetype.vim (#17129)Gregory Anders2022-01-18
| | | | | | | | | | | | | | This is a follow-on to #17040. The real benefit of #17040 was ensuring that the ftplugin FileType autocommand was defined first and thus always fired first. A side effect of the implementation in #17040 was that setting variables that modified the state of filetype detection (such as g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the user's init file. Filetype detection can also no longer be prevented from loading by using `:filetype off`. This PR addresses both of those side effects by unconditionally sourcing ftplugin.vim and indent.vim before the user's init file (which ensures that these autocommands run first) and sourcing filetype.vim *after* the user's init file (thus allowing it to be blocked or modified).
* refactor: enable filetype detection before user startup scripts (#17040)Gregory Anders2022-01-17
|
* feat(startup): load builtin plugins with --clean #15893Gregory Anders2021-10-04
| | | Closes #15605
* feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-09
| | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* fix(defaults): "syntax sync maxlines=1" on CmdwinEnter #15552Justin M. Keyes2021-09-02
| | | | | | | I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is calculated from topline, not cursor. maxlines=1 makes the most sense in cmdwin. ref #15401 622a36b1f1c652a8de433028bc4a03a1216db23f
* feat(defaults): limit syntax cost on CmdwinEnter #15401Gregory Anders2021-09-02
| | | | | | | | | Add a new default autocommand to limit syntax highlighting synchronization in the command window. This refactors the nvim_terminal autocommand out of main() and into a new init_default_autocmds() function, which is now part of the startup process and can be further extended with more default autocommands down the road. ref #6289 #6399