aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
* refactor(man): add type annotationsLewis Russell2023-02-21
|
* fix(lsp): wrong format of bufnr and client order in error message (#22336)Jason Hansen2023-02-21
|
* vim-patch:9.0.1319: PRQL files are not recognized (#22319)Christian Clason2023-02-19
| | | | | | | | | Problem: PRQL files are not recognized. Solution: Add a filetype pattern for PRQL files. (Matthias Queitsch, closes vim/vim#12018) https://github.com/vim/vim/commit/9de960ace0f017fcfeaf64a2f6492f0f88b11fdb Co-authored-by: Matthias Queitsch <matthias.queitsch@mailbox.org>
* fix(lsp): check if the buffer is a directory before w! it (#22289)Eduard Baturin2023-02-18
|
* fix(treesitter): make params optionalLewis Russell2023-02-15
|
* Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\
| * refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
* | feat(filetype): fall back to file extension when matching from hashbang (#22140)Jonas Strittmatter2023-02-13
| | | | | | | | | | | | If nothing matched in match_from_hashbang, also check the file extension table. For a hashbang like '#!/bin/env foo', this will set the filetype to 'fooscript' assuming the filetype for the 'foo' extension is 'fooscript' in the extension table.
* | Merge pull request #22191 from lewis6991/feat/playground_impLewis Russell2023-02-13
|\ \ | | | | | | feat(treesitter): playground improvements
| * | fix(treesitter): don't trample parsers when filetype!=langLewis Russell2023-02-10
| | | | | | | | | | | | | | | This allows vim.treesitter.show_tree() to work on buffers where the filetype does not match the parser language name e.g, bash/sh.
| * | feat(treesitter): playground improvementsLewis Russell2023-02-10
| |/ | | | | | | | | | | - Render node ranges as virtual text - Set filettype=query. The virtual text is to avoid parsing errors. - Make sure highlights text is always in view.
* / fix(filetype): make vim.filetype.match() work with contents only (#22181)Jonas Strittmatter2023-02-11
|/ | | Co-authored-by: Gregory Anders <greg@gpanders.com>
* vim-patch:9.0.1291: Move language files are not recognized (#22162)Christian Clason2023-02-08
| | | | | | | | Problem: Move language files are not recognized. Solution: Recognize Move language files. (Amaan Qureshi, closes vim/vim#11947) https://github.com/vim/vim/commit/6642982beaf4f1f5164f0315a1b3e3c275156089 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* vim-patch:9.0.1288: FunC files are not recognized (#22153)Christian Clason2023-02-07
| | | | | | | | Problem: FunC files are not recognized. Solution: Recognize FunC files. (Amaan Qureshi, closes vim/vim#11949) https://github.com/vim/vim/commit/91deac45392fe93094b9c31403b1ae771dc71938 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* vim-patch:9.0.1282: Ron files are not recognized (#22132)Amaan Qureshi2023-02-06
| | | | | | Problem: Ron files are not recognized. Solution: Recognize Ron files. (Amaan Qureshi, closes vim/vim#11948) https://github.com/vim/vim/commit/c8ef30bc2eaec956549510cd4b2efc96b7aee563
* fix(health): iterate using ipairs correctly (#22119)Mateusz Majewski2023-02-06
| | | | | | In a few places ipairs was used to iterate over elements of the array. However, the first return value of ipairs was erronously used, which is not the value, but rather the index. This would result in errors, for instance when trying to retrieve a field from the value.
* Merge pull request #21548 from figsoda/transform-captureLewis Russell2023-02-05
|\ | | | | feat(treesitter): allow capture text to be transformed
| * feat(treesitter): respect metadata[id].range for offset!figsoda2023-02-04
| |
| * feat(treesitter): add metadata option for get_node_textfigsoda2023-02-04
| |
| * feat(treesitter): allow capture text to be transformedfigsoda2023-02-04
| | | | | | | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* | vim-patch:9.0.1281: Cadence files are not recognized (#22130)Christian Clason2023-02-05
|/ | | | | | | | Problem: Cadence files are not recognized. Solution: Recognize Cadence files. (Janez Podhostnik, closes vim/vim#11951) https://github.com/vim/vim/commit/cb626a4692df7154be02b47d6089ec679e95cb44 Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
* vim-patch:9.0.1278: go.work.sum files are not recognized (#22121)Christian Clason2023-02-04
| | | | | | | | | Problem: go.work.sum files are not recognized. Solution: Recognize go.work.sum files as the gosum filetype. (Amaan Qureshi, closes vim/vim#11940) https://github.com/vim/vim/commit/4ad8ae8465e30df38dba31910f130891b16d38a0 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* fix(treesitter): fix most diagnosticsLewis Russell2023-02-04
|
* vim-patch:9.0.1274: FIRRTL files are not recognized (#22102)Christian Clason2023-02-02
| | | | | | | | Problem: FIRRTL files are not recognized. Solution: Add a pattern for FIRRTL files. (Amaan Qureshi, closes vim/vim#11931) https://github.com/vim/vim/commit/685bf83b73d0fe6fd36bb2949bebd6aae66a139e Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* fix(man): use italics for `<bs>_` (#22086)Lewis Russell2023-02-01
| | | | | | | | | | | | fix(man): use italics for <bs>_ Even though underline is strictly what this should be. <bs>_ was used by nroff to indicate italics which wasn't possible on old typewriters so underline was used. Modern terminals now support italics so lets use that now. See: - https://unix.stackexchange.com/questions/274658/purpose-of-ascii-text-with-overstriking-file-format/274795#274795 - https://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm
* vim-patch:9.0.1268: .clangd and .stylelintrc files don't get a filetype (#22079)Christian Clason2023-02-01
| | | | | | | | | Problem: .clangd and .stylelintrc files don't get a filetype. Solution: Use yaml for .clangd and json for .stylelintrc files. (Mark Skelton, closes vim/vim#11916) https://github.com/vim/vim/commit/9c51798a1f3b79ace5ae0551a8bb122025ac94ed Co-authored-by: Mark Skelton <mdskelton99@gmail.com>
* Merge pull request #17537 from bfredl/neoluabfredl2023-01-31
|\ | | | | refactor(tests): run unittests using main nvim binary - delete separate nvim-test build
| * feat(lua): low-level interpreter mode (nvim -ll)bfredl2023-01-31
| |
* | Merge pull request #22005 from clason/sanitize-langChristian Clason2023-01-31
|\ \ | |/ |/| fix(treesitter): validate language name
| * fix(treesitter): validate language nameChristian Clason2023-01-28
| | | | | | | | | | | | | | | | | | Problem: Some injections (like markdown) allow specifying arbitrary language names for code blocks, which may be lead to errors when looking for a corresponding parser in runtime path. Solution: Validate that the language name only contains alphanumeric characters and `_` (e.g., for `c_sharp`) and error otherwise.
* | vim-patch:9.0.1263: KDL files are not recognized (#22058)Christian Clason2023-01-31
| | | | | | | | | | | | | | | | Problem: KDL files are not recognized. Solution: Add a pattern for KDL files. (Amaan Qureshi, closes vim/vim#11898) https://github.com/vim/vim/commit/907349a74331fc1bc48cf43c1e7d54cb9e0e4fc9 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* | refactor!: remove has("debug") (#22060)dundargoc2023-01-30
| | | | | | | | | | This value can not be relied on as it doesn't work for multi-configuration generators. I don't think this undocumented option is used much, if at all, so I think we should remove it.
* | vim-patch:9.0.1261: Elsa files are not recognized (#22047)Amaan Qureshi2023-01-29
| | | | | | | | | | | | Problem: Elsa files are not recognized. Solution: Add the name of Elsa files. (Amaan Qureshi) https://github.com/vim/vim/commit/2a99fe6c41efcd5d1eb47823e7e73cf391e230ba
* | vim-patch:9.0.1256: NetworkManager connection files are not recognized (#22038)Christian Clason2023-01-29
|/ | | | | | | | Problem: NetworkManager connection files are not recognized. Solution: Add a pattern for NetworkManager connection files. (closes vim/vim#11893) https://github.com/vim/vim/commit/04e4f1d98556e67d7337224b67b71c828410ee0f Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
* fix(man.lua): open in current window if it's already a man page (#21987)0xAdk2023-01-25
| | | This matters when there are multiple man page windows open.
* docs(vim.fs): normalize Windows example was incorrect (#21966)C.D. MacEachern2023-01-25
|
* doc(lsp): format arguments to start_client() (#21980)Lewis Russell2023-01-24
| | | docs(lsp): format arguments to start_client()
* fix(lsp): check method is supported when range formatting (#21970)Sean Dewar2023-01-24
| | | | | | `vim.lsp.buf.format()` silently did nothing if no servers supported `textDocument/rangeFormatting` when formatting with a range. Issue found by `@hwrd:matrix.org` in the Matrix chat.
* build: make generated source files reproducible #21586Arnout Engelen2023-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Build is not reproducible, because generated source files (.c/.h/) are not deterministic, mostly because Lua pairs() is unordered by design (for security). https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671 https://www.lua.org/manual/5.1/manual.html#pdf-next > The order in which the indices are enumerated is not specified [...] > >> The hardening of the VM deliberately randomizes string hashes. This in >> turn randomizes the iteration order of tables with string keys. Solution: - Update the code generation scripts to be deterministic. - That is only a partial solution: the exported function (funcs_metadata.generated.h) and ui event (ui_events_metadata.generated.h) metadata have some mpack'ed tables, which are not serialized deterministically. - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0) that preserves table order. - Longer-term we should change the mpack'ed data structure so it no longer uses tables keyed by strings. Closes #20124 Co-Authored-By: dundargoc <gocdundar@gmail.com> Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
* vim-patch:9.0.1230: Apache Thrift files are not recognized (#21955)Amaan Qureshi2023-01-23
| | | | | | Problem: Apache thrift files are not recognized. Solution: Add a pattern for thrift files. (Amaan Qureshi, closes vim/vim#11859) https://github.com/vim/vim/commit/f3da4c8427b1b12d7aaffa307ec085ca97ea9ad9
* fix(lsp): assert workspace/applyEdit receives params (#21945)Mathias Fußenegger2023-01-22
| | | | | | | | | | | | | According to the specification `workspace/applyEdit` must be called with `ApplyWorkspaceEditParams`. So far the client just returned, which could lead to a misleading error on the server side because `workspace/applyEdit` must respond with a `ApplyWorkspaceEditResult`. This adds an assertion to clarify that the server is violating the specification. See https://github.com/neovim/neovim/issues/21925
* vim-patch:9.0.1229: Cap'n Proto files are not recognized (#21950)Amaan Qureshi2023-01-22
| | | | | | | Problem: Cap'n Proto files are not recognized. Solution: Add a pattern and the "capnp" filetype. (Amaan Qureshi, closes vim/vim#11862) https://github.com/vim/vim/commit/040e795e8da05ff38cc896528d4dcad100f0b584
* feat(lsp): add triggerKind option for vim.lsp.buf.code_action (#21905)kishii2023-01-21
|
* fix(lsp): fix `removed` param value in add_workspace_folder (#21915)Raphael2023-01-20
|
* fix(treesitter): really restore syntaxLewis Russell2023-01-17
| | | | | - also unset b:ts_highlight on stop() Fixes: #21836
* feat(health): detect tmux RGB support via `client_termfeatures`Sean Dewar2023-01-16
| | | | | | | | | | | | | | | | Problem: On tmux v3.2+, the `terminal-features` option may be used to enable RGB capabilities over `terminal-overrides`. However, `show-messages` cannot be used to detect if RGB capabilities are enabled using `terminal-features`. Solution: Try to use `display-message -p #{client_termfeatures}` instead. The returned features include "RGB" if either "RGB" is set in `terminal-features`, or if "Tc" or "RGB" is set in `terminal-overrides` (as before). Nothing is returned by tmux versions older than v3.2, so fallback to checking `show-messages` in that case. Also, un-Vimscriptify the previous logic a bit, and change the error message to point to using the `terminal-features` option instead for newer tmux versions.
* fix(health): fix `tmux_esc_time` comparisonSean Dewar2023-01-16
| | | | | | | Regression from the health.vim to .lua changes. Unlike Vim script, Lua does not implicitly convert strings to numbers, so this comparison threw an error.
* docs: treesitter.add_directive, add_predicate #21206Ching Pei Yang2023-01-16
|
* health: migrate to Lua #21661TJ DeVries2023-01-16
| | | | * refactor: remove all vimscript from nvim/health * fixup: previous method broke if you had a folder named 'x-lua'
* docs(lua): use luaref tag instead of www.lua.org #21813Naru2023-01-15
|