aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* | | docs(dev-style): remove rules covered by uncrustify #18767dundargoc2022-05-30
|/ / | | | | | | Uncrustify is the source of truth where possible. See also https://github.com/neovim/neovim/pull/18563
* | docs: clarify that nvim_strwidth counts control characters as one cell (#18802)zeertzjq2022-05-31
| |
* | 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.
* Merge pull request #18792 from famiu/feat/nvim_create_user_command/smodsbfredl2022-05-29
|\ | | | | feat(api): pass structured modifiers to commands
| * feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | | | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* | fix(treesitter): offset directive associates range with capture (#18276)Lewis Russell2022-05-28
|/ | | | | | | | | Previously the `offset!` directive populated the metadata in such a way that the new range could be attributed to a specific capture. #14046 made it so the directive simply stored just the new range in the metadata and information about what capture the range is based from is lost. This change reverts that whilst also correcting the docs.
* docs(options): move all removed options to vim_diff.txt (#18770)dundargoc2022-05-28
| | | | It's more consistent to gather all removed options in one spot rather than spreading it out.
* fix(ui): require window-local value to show winbar on floating windows (#18773)Famiu Haque2022-05-28
| | | | | | | Previously, there was a bug where setting the local value of 'winbar' to itself would cause winbar to appear on a floating window, which is undesirable. This fix makes it so that it's explicitly required for the window-local value of 'winbar' for a floating window to be set in order for winbar to be shown on that window.
* Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
|\ | | | | feat(lua): allow some viml functions to run in fast
| * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
* | feat(lsp): turn rename filter into a predicate (#18745)Mathias Fußenegger2022-05-26
| | | | | | Same as https://github.com/neovim/neovim/pull/18458 but for rename
* | Merge pull request #18738 from zeertzjq/vim-8.2.5010zeertzjq2022-05-26
|\ \ | | | | | | vim-patch:8.2.5010: the terminal debugger uses various global variables
| * | vim-patch:8.2.5010: the terminal debugger uses various global variableszeertzjq2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The terminal debugger uses various global variables. Solution: Add a dictionary to hold the terminal debugger preferences. https://github.com/vim/vim/commit/c9a431c7638ecebb6f2cb3eabd0e1b2b5e269c1e Omit popup menu.
| * | docs: add missing termdebug docs from Vim runtime updateszeertzjq2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/vim/vim/commit/388a5d4f20b4b64341d1604aa238cab85827b892 https://github.com/vim/vim/commit/4466ad6baa22485abb1147aca3340cced4778a66 https://github.com/vim/vim/commit/6aa57295cfbe8f21c15f0671e45fd53cf990d404 Rename terminal.txt to nvim_terminal_emulator.txt in vim-patch.sh.
* | | vim-patch:8.2.5015: Hoon and Moonscript files are not recognized (#18747)dundargoc2022-05-25
|/ / | | | | | | | | Problem: Hoon and Moonscript files are not recognized. Solution: Add filetype patterns. (Goc Dundar, closes vim/vim#10478) https://github.com/vim/vim/commit/bf82df0dd48a26404b92a596498b6892c9572c53
* | refactor(lsp): remove redundant client cleanup (#18744)Gregory Anders2022-05-25
| | | | | | | | | | | | The client state is cleaned up both in client.stop() as well as in the client.on_exit() handler. Technically, the client has not actually stopped until the on_exit handler is called, so we should just do this cleanup there and remove it from client.stop().
* | feat(lsp)!: turn format filter into predicate (#18458)Mathias Fußenegger2022-05-25
| | | | | | | | | | This makes the common use case easier. If one really needs access to all clients, they can create a filter function which manually calls `get_active_clients`.
* | fix(lsp): respect global syntax setting in open float preview (#15225)Elton Leander Pinto2022-05-25
| |
* | Merge pull request #18528 from lewis6991/setwinoptbfredl2022-05-25
|\ \ | | | | | | feat(api): add `win` and `buf` to `nvim_set_option_value`
| * | feat(api): add win and buf to nvim_set_option_valueLewis Russell2022-05-17
| |/ | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | docs(api): floating wins omitted under :mksession (#18721)Daniel Steinberg2022-05-24
| |
* | fix(filetype): correct vim.fn.did_filetype() handling (#18725)notomo2022-05-23
| |
* | vim-patch:partial 2d8ed0203aed (#18675)dundargoc2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:partial 2d8ed0203aed Update runtime files. https://github.com/vim/vim/commit/2d8ed0203aedd5f6c22efa99394a3677c17c7a7a Skip: runtime/doc/map.txt runtime/doc/syntax.txt runtime/doc/usr_51.txt runtime/doc/usr_52.txt runtime/syntax/help.vim runtime/syntax/vim.vim Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* | feat: click support for 'statusline', 'winbar' #18650Famiu Haque2022-05-23
| | | | | | | | The mouseclick item "%@" is now supported by 'statusline' and 'winbar'. Previously it was only supported by 'tabline'.
* | 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'
* | fix(lsp): do not detach LSP servers on Windows #18703Gregory Anders2022-05-22
| | | | | | | | | | | | | | Detaching the process seems to have unintended side effects on Windows, so only do it by default on non-Windows platforms. Ref: https://github.com/neovim/nvim-lspconfig/issues/1907 Closes https://github.com/neovim/nvim-lspconfig/pull/1913
* | refactor(runtime): convert the remaining dist#ft functions to lua (#18623)Jonas Strittmatter2022-05-22
| |
* | build(clint): remove redundant checks #18698dundargoc2022-05-22
| | | | | | | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. See also https://github.com/neovim/neovim/pull/18563
* | Merge pull request #18608 from ckipp01/extmarkDocsbfredl2022-05-22
|\ \ | | | | | | docs(extmark): remove message about passing in id=0
| * | docs(extmark): remove message about passing in id=0ckipp012022-05-18
| |/ | | | | | | | | | | | | | | | | | | | | | | The docs for `nvim_buf_set_extmark` mention that you can create a new extmark when passing in `id=0`, however if you do this you'll get an error since the code checks that id is positive. ``` id is not a positive integer ``` This change re-words the sentence to make it clearer.
* | docs: remove "Vi default" #18672dundargoc2022-05-22
| | | | | | It's not relevant and clutters the documentation.
* | vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)zeertzjq2022-05-22
| | | | | | | | | | | | Problem: smart/C/lisp indenting is optional, which makes the code more complex, while it only reduces the executable size a bit. Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP. https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
* | refactor: add warnings for deprecated functions (#18662)dundargoc2022-05-21
| |
* | fix(lsp): only send diagnostics from current buffer in code_action() (#18639)Fredrik Ekre2022-05-20
| | | | | | | | Fix vim.lsp.buf.(range_)code_action() to only send diagnostics belonging to the current buffer and not to other files in the workspace.
* | Merge pull request #18502 from drybalka/fix-languagetree-contains-descriptionChristian Clason2022-05-19
|\ \ | | | | | | treesitter: small improvements of languagetree.lua
| * | refactor: simple logic in tree_contains()Denys2022-05-18
| | |
| * | docs: correct description of LanguageTree:contains()Denys2022-05-18
| | |
* | | Merge pull request #18630 from dundargoc/refactor/remove-remapGregory Anders2022-05-18
|\ \ \
| * | | refactor!: remove 'terse' optionDundar Goc2022-05-19
| | | | | | | | | | | | | | | | | | | | Having two methods of setting the same option is redundant and can be potentially confusing. Recommend adding 's' to 'shortmess' instead.
| * | | refactor!: remove 'remap' optionDundar Goc2022-05-19
| | | | | | | | | | | | | | | | | | | | An option that should always be kept on except for when working with old Vi scripts is of little use to us.
* | | | feat(lsp): option to reuse_win for jump actions (#18577)Lewis Russell2022-05-18
|/ / /
* | | feat(lsp): add filter to vim.lsp.get_active_clients()Gregory Anders2022-05-18
| | | | | | | | | | | | | | | Allow get_active_clients() to filter on client name, id, or buffer. This (soft) deprecates lsp.buf_get_clients().
* | | feat(lsp): add LspAttach and LspDetach autocommandsGregory Anders2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach of using `on_attach` callbacks for configuring buffers for LSP is suboptimal: 1. It does not use the standard Nvim interface for driving and hooking into events (i.e. autocommands) 2. There is no way for "third parties" (e.g. plugins) to hook into the event. This means that *all* buffer configuration must go into the user-supplied on_attach callback. This also makes it impossible for these configurations to be modular, since it all must happen in the same place. 3. There is currently no way to do something when a client detaches from a buffer (there is no `on_detach` callback). The solution is to use the traditional method of event handling in Nvim: autocommands. When a LSP client is attached to a buffer, fire a `LspAttach`. Likewise, when a client detaches from a buffer fire a `LspDetach` event. This enables plugins to easily add LSP-specific configuration to buffers as well as enabling users to make their own configurations more modular (e.g. by creating multiple LspAttach autocommands that each do something unique).
* | | feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)Gregory Anders2022-05-18
| | | | | | | | | | | | Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API objects) to autocommand callbacks.
* | | Merge pull request #18562 from famiu/feat/ui/winbarbfredl2022-05-18
|\ \ \ | | | | | | | | feat(ui): add `'winbar'`
| * | | feat(ui): add `'winbar'`Famiu Haque2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* | | | fix(health): handle non-existent log file #18610Noval Maulana2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim.lsp: require("vim.lsp.health").check() ======================================================================== - ERROR: Failed to run healthcheck for "vim.lsp" plugin. Exception: function health#check, line 20 Vim(eval):E5108: Error executing lua ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: attempt to index a nil value stack traceback: ...m/HEAD-6613f58/share/nvim/runtime/lua/vim/lsp/health.lua:20: in function 'check' [string "luaeval()"]:1: in main chunk Solution: Check for nil. fix #18602
* | | | refactor(runtime): convert more dist#ft functions to lua (#18430)Jonas Strittmatter2022-05-17
| | | |
* | | | Merge pull request #18554 from kevinhwang91/perf-timerstartbfredl2022-05-17
|\ \ \ \ | | | | | | | | | | perf(_editor): no need to stop inside vim.defer_fn
| * | | | perf(_editor): no need to stop inside vim.defer_fnkevinhwang912022-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uv_run: 1. remove timer handle from heap 2. will start again if repeat is not 0