aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
Commit message (Collapse)AuthorAge
* 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
| |
* | treesitter: separate tree and parserThomas Vigouroux2020-11-04
|/ | | | While this might sound silly, it is needed for further improvements.
* startup: handle autoload and lua packages during startupBjörn Linse2020-11-02
| | | | ¡NO HAY BANDA!
* Merge pull request #12870 from bfredl/themeparkBjörn Linse2020-11-01
|\ | | | | Color themes (per window/line) and lua theme providers
| * api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | | | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* | Merge pull request #13192 from bfredl/nodeidBjörn Linse2020-11-01
|\ \ | | | | | | ] treesitter: add node:id()
| * | treesitter: add node:id()Björn Linse2020-11-01
| |/
* | treesitter: fix wrong string formattingThomas Vigouroux2020-11-01
| |
* | tree-sitter: error out when parsing failsThomas Vigouroux2020-11-01
|/ | | | | This can happen when there is ABI mismatches, and removes the assumption parsing alwasy succeeds (which is wrong).
* treesitter: allow custom parser for highlighterThomas Vigouroux2020-10-12
| | | | | | | | | | | Also allow to get parser ranges. This will be useful for language injection, allowing us to tweak the parser's ranges on the fly. Update runtime/lua/vim/treesitter.lua Co-authored-by: Paul Burlumi <paul@burlumi.com>
* api: multiple decoration providers at onceBjörn Linse2020-10-10
|
* treesitter: check language ABI version on loadThomas Vigouroux2020-10-08
| | | | This is will avoid some issues at runtime.
* lua: vim.wait allows control of fast events (#13053)TJ DeVries2020-10-06
| | | | | | | | | * lua: vim.wait allows control of fast events * fixup: remove requirement of function for easier waiting * fixup: lint * fixup: bfredl comments
* treesitter: add string parser (#13008)Thomas Vigouroux2020-09-30
|
* lua: cleanup naming conventions of executor functionsBjörn Linse2020-09-10
|
* treesitter: use new on_bytes interfaceBjörn Linse2020-09-09
| | | | | | | | | | This will significantly reduce the parsing work needed e.g. when rehighlighting after every keypress in insert mode. Also add safety check for tree-sitter trying to read past the end of a line. This can happen after we sent an incorrect buffer update.
* treesitter: add node:field() to get field childrenThomas Vigouroux2020-09-01
|
* treesitter: allow to iterate over node childrenThomas Vigouroux2020-08-31
|
* lua: add vim.register_keystroke_callback (#12536)TJ DeVries2020-08-14
| | | | | | | | | | | | | | | * feat: Add vim.register_keystroke_callback * fixup: Forgot to remove mention of old option * fixup: Answer jamessan comments * fixup: Answer norcalli comments * fixup: portability * Update runtime/doc/lua.txt Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
* fix: runtimepath always updates lua package.pathTJ DeVries2020-08-10
|
* Merge pull request #12653 from erw7/fix-build-freebsd-ciJames McCoy2020-07-20
|\ | | | | build: Fix build failure with CI in FreeBSD
| * build: Fix build failure with CI in FreeBSDerw72020-07-20
| | | | | | | | Co-authored-by: James McCoy <jamessan@jamessan.com>
* | lua: Fix crash on unprotected lua errors (#12658)TJ DeVries2020-07-19
|/ | | | | | | | | | | | | | | | | | Can be reproduced with a script like this: -- in some lua file vim.fn.timer_start(10, function() error("uh....") end) -- will cause neovim to crash with the following error. PANIC: unprotected error in call to Lua API (nlua_CFunction_func_call failed.) After this, it will instead print the error message from the top of the stack, like so. tmp/error_nvim.lua:10: uh... Also added an example test. Previously this test caused the embedded nvim to panic.
* lua: Add ability to pass tables with __callTJ DeVries2020-07-10
| | | | | | | | | | | | vim-patch:8.2.1054: not so easy to pass a lua function to Vim vim-patch:8.2.1084: Lua: registering function has useless code I think I have also opened up the possibility for people to use these callbacks elsewhere, since I've added a new struct that we should be able to use. Also, this should allow us to determine what the state of a list is in Lua or a dictionary in Lua, since we now can track the luaref as we go.
* lua: Add ability to pass lua functions directly to vimLTJ DeVries2020-07-10
|
* treesitter: call bufload before parsing (#12603)Thomas Vigouroux2020-07-10
|
* doc: mention that defer_fn applies schedule_wrap (#12601)Christian Clason2020-07-07
|
* lua: add options to highlight.on_yank (#12549)Christian Clason2020-07-05
| | | | | NOTE: Configuration options have changed for highlight.on_yank. Check help for |:help highlight.on_yank()|
* doc: fix scripts and regenerate (#12506)TJ DeVries2020-07-02
| | | | | | | | | | | | | | | | | * Fix some small doc issues * doc: fixup * doc: fixup * Fix lint and rebase * Remove bad advice * Ugh, stupid mpack files... * Don't let people include these for now until they specifically want to * Prevent duplicate tag
* treesitter: use single nodes in set_rangesThomas Vigouroux2020-06-29
| | | | fixup! treesitter: fix lint
* treesitter: fix lintThomas Vigouroux2020-06-29
|
* treesitter: use nodes to mark rangesThomas Vigouroux2020-06-29
|
* treesitter: fix some clint errorsThomas Vigouroux2020-06-29
| | | | Also fixes some mismatches on the name of the function
* treesitter: test newly added set_included_rangesThomas Vigouroux2020-06-29
|
* treesitter: add set_included_ranges to the parserThomas Vigouroux2020-06-29
| | | | This is the first step towards language injection using treesitter.
* treesitter: simplify puhstree call processThomas Vigouroux2020-06-23
|
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* lua: vim.wait implementationTJ DeVries2020-05-30
|
* lua: vim.wait initial outlineBjörn Linse2020-05-30
|
* lua: Add highlight.on_yank (#12279)Christian Clason2020-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add lua function to highlight yanked region * extract namespace, better naming, default values * add default for event argument * free timer * factor out mark to position calculation * d'oh * make sure timer stops before callback (cf. luv example) * factor out timer, more documentation * fixup * validate function argument for schedule * fix block selection past eol * correct handling of multibyte characters * move arguments around, some cleanup * move utility functions to vim.lua * use anonymous namespaces, avoid local api * rename function * add test for schedule_fn * fix indent * turn hl-yank into proper (hightlight) module * factor out position-to-region function mark extraction now part of highlight.on_yank * rename schedule_fn to defer_fn * add test for vim.region * todo: handle double-width characters * remove debug printout * do not shadow arguments * defer also callable table * whitespace change * move highlight to vim/highlight.lua * add documentation * add @return documentation * test: add check before vim.defer fires * doc: fixup
* lua: Add buffer, window and tab accessors (#12268)TJ DeVries2020-05-07
| | | | | * Add buffer, window and tab accessors * Fix deletion and add tests