aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
Commit message (Collapse)AuthorAge
...
* | feat(api): add lua C bindings for xdiff (#14536)Lewis Russell2021-08-22
|/ | | | | | | | | | | | | | | | * feat(api): add lua C bindings for xdiff * chore: opt.hunk_lines -> opt.result_type opt.on_hunk now takes precedence over opt.result_type * chore: fix indents Fix indents * chore: change how priv is managed Assign priv NULL and unconditionally apply XFREE_CLEAR to it when finished.
* refactor(lua): initialize lua state at startup instead of dynamicallyBjörn Linse2021-07-19
| | | | | | | | | | lua is used as part of implementation for more core features. As an example, every user keypress will invoke a lua function to check for keypress handlers (regardless if they are registered or not). Thus not starting lua until it is first used doesn't make much sense anymore. nlua_enter was also needed due to the earlier stateful &rtp translation, which by now have been made stateless.
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* fixup(ts): put ts_query_cursor_set_match_limit behind feature guardChristian Clason2021-06-29
| | | | | | | | | | | | | | This is a fixup for #14915, which used the above-mentioned call to restore the behavior of the pre-release version of tree-sitter to that of 0.19.5. However, this function was introduced after 0.19.5, breaking distro builds that link against 0.19.5 instead of the tag specified in neovim's build script. Now the function should only be called when it is available _and_ needed. Once tree-sitter is bumped to 0.19.6 (when this is released), this guard can be removed again. Fixes #14923 (among others)
* fix(treesitter): set match limit for query cursorsChristian Clason2021-06-26
| | | | | | | | | | | | Upstream tree-sitter raised the number of pending matches for a query cursor from 32 to 64k in <https://github.com/tree-sitter/tree-sitter/commit/ 78010722a49ed6224c773c22b0d25a8c9fbde584>, which severely impacted performance for some highlighting queries. This uses the `ts_query_cursor_set_match_limit` function introduced in <https://github.com/tree-sitter/tree-sitter/commit/ cd96552448a6e0d4eb27fc54b27cb5130c4b6f76> to manually set this back to the old default of 32. Fixes #14897
* BugFix: Fix inconsistent verbose messageshadmansaleh2021-06-21
| | | | | | | When a keymap is set from lua currently verbose message says it's set from line 1. That's incorrect because we don't really know when it was set. So until proper :verbose support isn't added for sourceing lua it shouldn't say where it was set at.
* Merge pull request #14773 from mjlbach/fix/vim-region-boundsMichael Lingelbach2021-06-11
|\ | | | | fix(lua): ensure vim.region truncates to buf range
| * fix(lua): ensure vim.region truncates to buf rangeMichael Lingelbach2021-06-11
| | | | | | | | | | | | | | | | If vim.region receives a large range outside of the current buffer bounds, it will not check the range ahead of time and loop until neovim exhausts the system memory. Fixes #14743
* | refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
|/ | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
* lua: Add vim.opt and fix scopes of vim.o (#13479)TJ DeVries2021-05-28
| | | | | | | | | | | | | * lua: Add vim.opt * fixup: cleaning * fixup: comments * ty clason * fixup: comments * this is the last commit. period.
* lua: use proper conversion of vim.g valuesBjörn Linse2021-05-19
|
* lua: use WarningMsg for vim.notify() warnings (#14508)Shadman2021-05-10
|
* docs: Treesitter (#13260)TJ DeVries2021-05-01
| | | | | | | | | * doc & fixes: Generate treesitter docs * fixup to treesitter-core * docs(treesitter): fix docs for most functions Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* lua: make vim.cmd an alias of vim.api.nvim_exec() (#14401)Shadman2021-04-22
| | | | | Previously vim.cmd was an alias of nvim_command(). From now on it is an alias of nvim_exec().
* Merge pull request #14318 from chentau/extmark_luadoBjörn Linse2021-04-13
|\ | | | | extmark: splice extmarks on :luado
| * extmark: splice extmarks on :luadochentau2021-04-12
| |
* | Merge pull request #14200 from teto/treesitter-checkhealthMarco Hinz2021-04-07
|\ \ | | | | | | feat: treesitter checkhealth
| * | feat(ts): include parser ABI version in checkhealthThomas Vigouroux2021-04-06
| | |
* | | test/lsp: disable tracking in LSP tests (here be dragons)Björn Linse2021-04-03
| | |
* | | luaref: simplify handling of table callables and fix leak in vim.fn.call(table)Björn Linse2021-04-03
| | | | | | | | | | | | I AM THE TABLE
* | | luaref: fix leaks for global luarefsBjörn Linse2021-04-03
| | |
* | | lua: track reference ownership with ASAN when presentBjörn Linse2021-04-03
| |/ |/|
* | Merge pull request #14039 from theHamsta/fix-field-introspectionThomas Vigouroux2021-04-02
|\ \ | |/ |/| Fix(treesitter): Make treesitter.inspect_lang include last field name
| * Fix(treesitter): Make treesitter.inspect_lang include last field nameStephan Seitz2021-03-23
| |
* | ts: Add language version to vim.treesitter (#14255)TJ DeVries2021-03-30
|/
* chore(ts): show grammar that triggers the errorMatthieu Coudron2021-03-16
| | | | to help debugging
* Merge pull request #13875 from smolck/vim_fn_error_on_apiBjörn Linse2021-03-09
|\ | | | | vim.fn: throw error when trying to use API function
| * Fix unused varargsmolck2021-02-06
| |
| * remove extra line, remove () in errorsmolck2021-02-04
| |
| * vim.fn: throw error when trying to use API functionsmolck2021-02-03
| |
* | fix(notify): Expected 3 arguments error (#13905)notomo2021-02-09
| |
* | Merge pull request #13843 from teto/notif_providerMatthieu Coudron2021-02-08
|\ \ | |/ |/| [RDY] Notification provider
| * feat: adds vim.notifyMatthieu Coudron2021-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds function to notify the user like this: `:lua vim.notify("hello user")` embeds log levels vim.log.levels. you can then reassign vim.notify to for instance ``` function notify_external(msg, log_level, opts) vim.fn.jobstart({"notify-send", msg }) end ```
* | Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
|/ | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* lintchentau2021-01-26
|
* lua: complete methods in metatablesBjörn Linse2021-01-26
|
* Don't show entire context when completingTony Chen2021-01-26
|
* feat: add completion to ':lua'TJ DeVries2021-01-26
|
* Missing argument for package.loadlib()matveyt2021-01-22
| | | | | | Allow for foo.bar.baz module name Make luaopen_module() name compatible with Lua 5.1
* api: add vim.version (#13762)Michael Lingelbach2021-01-18
| | | | | | | | | | | | | retrun a structured version dict :lua print(vim.inspect(vim.version())) { api_compatible = 0, api_level = 7, api_prerelease = true, major = 0, minor = 5, patch = 0 }
* runtime: propagate lua parsing errors while using "require"dm1try2020-12-10
|
* executor: use new nlua_ name patternBjörn Linse2020-12-01
|
* startup: add init.lua as an alternative user config, fixes #7895dm1try2020-12-01
|
* fix(treesitter): allow ranges in set_included_rangesThomas Vigouroux2020-11-23
|
* treesitter: refactor some thingsThomas Vigouroux2020-11-23
|
* fix: NULL segfaults brought to you by @vigouxTJ DeVries2020-11-18
|
* lsp: vim.lsp.diagnostic (#12655)TJ DeVries2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking Changes: - Deprecated all `vim.lsp.util.{*diagnostics*}()` functions. - Instead, all functions must be found in vim.lsp.diagnostic - For now, they issue a warning ONCE per neovim session. In a "little while" we will remove them completely. - `vim.lsp.callbacks` has moved to `vim.lsp.handlers`. - For a "little while" we will just redirect `vim.lsp.callbacks` to `vim.lsp.handlers`. However, we will remove this at some point, so it is recommended that you change all of your references to `callbacks` into `handlers`. - This also means that for functions like |vim.lsp.start_client()| and similar, keyword style arguments have moved from "callbacks" to "handlers". Once again, these are currently being forward, but will cease to be forwarded in a "little while". - Changed the highlight groups for LspDiagnostic highlight as they were inconsistently named. - For more information, see |lsp-highlight-diagnostics| - Changed the sign group names as well, to be consistent with |lsp-highlight-diagnostics| General Enhancements: - Rewrote much of the getting started help document for lsp. It also provides a much nicer configuration strategy, so as to not recommend globally overwriting builtin neovim mappings. LSP Enhancements: - Introduced the concept of |lsp-handlers| which will allow much better customization for users without having to copy & paste entire files / functions / etc. Diagnostic Enhancements: - "goto next diagnostic" |vim.lsp.diagnostic.goto_next()| - "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()| - For each of the gotos, auto open diagnostics is available as a configuration option - Configurable diagnostic handling: - See |vim.lsp.diagnostic.on_publish_diagnostics()| - Delay display until after insert mode - Configure signs - Configure virtual text - Configure underline - Set the location list with the buffers diagnostics. - See |vim.lsp.diagnostic.set_loclist()| - Better performance for getting counts and line diagnostics - They are now cached on save, to enhance lookups. - Particularly useful for checking in statusline, etc. - Actual testing :) - See ./test/functional/plugin/lsp/diagnostic_spec.lua - Added `guisp` for underline highlighting NOTE: "a little while" means enough time to feel like most plugins and plugin authors have had a chance to refactor their code to use the updated calls. Then we will remove them completely. There is no need to keep them, because we don't have any released version of neovim that exposes these APIs. I'm trying to be nice to people following HEAD :) Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
* Removed restricted mode - Fix #11972georg3tom2020-11-11
|
* Merge pull request #13227 from bfredl/earlyinspectBjörn Linse2020-11-05
|\ | | | | lua: make vim.inspect available early so it can be used for path debugging
| * lua: make vim.inspect available early so it can be used for path debuggingBjörn Linse2020-11-05
| |