aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mixJosh Rahm2023-02-02
|\
| * 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>
| * 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>
| * | 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(semantic_tokens.lua): Fix nil tokens/data in semantic_tokens.luaJosh Rahm2023-01-26
| | | | | | | | | | | | | | Some (poorly-implemented) LSPs can return an empty JSON object in LSP responses, which could cause tokens to be nil, which would eventually cause an error and a bad UI experience. This fix makes sure that the tokens variable is always set to a non-nil value.
* | Merge branch 'userreg' into 20230125_mixJosh Rahm2023-01-25
|\ \
| * | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2023-01-25
| |\|
| * | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2022-10-11
| |\ \
| * | | feat(userreg): add runtime files for userregJosh Rahm2022-08-21
| | | |
* | | | Merge remote-tracking branch 'upstream/master' into usermarksusermarksJosh Rahm2023-01-25
|\ \ \ \ | | |_|/ | |/| |
| * | | 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
| * | | 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
| | | |
| * | | refactor: format with stylua (#21821)dundargoc2023-01-15
| | | |
| * | | vim-patch:9.0.1191: some Bazel files are not recognized (#21784)Christian Clason2023-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some Bazel files are not recognized. Solution: Add an extra Bazel pattern. (Keith Smily, closes vim/vim#11807) https://github.com/vim/vim/commit/3213952966896ffb1d8fa186bcf8c43359fca0f0 Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
| * | | feat(diagnostic): vim.diagnostic.is_disabled() #21527Raphael2023-01-12
| | | |
| * | | docs(lsp): fix type annotation on convert_input_to_markdown_lines (#21772)Chris Kipp2023-01-12
| | | | | | | | | | | | | | | | | | | | This small changes just ensures that if you're using `convert_input_to_markdown_lines` without `contents` you don't get a warning (when using something like neodev) that there is an expected second param, since it can be nil.
| * | | vim-patch:9.0.1182: go checksum files are not recognized (#21758)Christian Clason2023-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: go checksum files are not recognized. Solution: Add the name of go checksum files. (Amaan Qureshi, closes vim/vim#11803) https://github.com/vim/vim/commit/043d7b2c84cda275354aa023b5769660ea70a168 Co-authored-by: Amaan Q <amaanq12@gmail.com>
| * | | fix(lsp): revert semantic token gravity change from #21574 (#21763)jdrouhard2023-01-12
| | | |
| * | | docs(lsp): update buf_notify and rpc.notify params types (#21753)Chris Kipp2023-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small, but I was getting warnings about my usage of `vim.lsp.buf_notify(bufnr, method, {example = example})` since the docs say that `params` must be a string, however this can really be anything when it's passed to `rpc.notify` since we just end up calling `vim.json.encode(payload)` on it. This fixes the docs in those two places and regenerates them.
| * | | vim-patch:9.0.1176: smithy files are not recognized (#21751)Christian Clason2023-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: smithy files are not recognized. Solution: Add a pattern for Smithy files. (Chris Kipp, closes vim/vim#11804) https://github.com/vim/vim/commit/f68cddabffcbc5b8fbfe9003182cb4b55ff8d72c Co-authored-by: Chris Kipp <ckipp@pm.me>
| * | | vim-patch:9.0.1174: smali files are not recognized (#21734)Amaan Qureshi2023-01-10
| | | | | | | | | | | | | | | | Problem: Smali files are not recognized. Solution: Add a pattern for Smali files. (Amaan Qureshi, closes vim/vim#11801)
| * | | feat(float): open float relative to mouse #21531Sebastian Lyng Johansen2023-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No easy way to position a LSP hover window relative to mouse. Solution: Introduce another option to the `relative` key in `nvim_open_win()`. With this PR it should be possible to override the handler and do something similar to this https://github.com/neovim/neovim/pull/19481#issuecomment-1193248674 to have hover information displayed from the mouse. Test case: ```lua local util = require('vim.lsp.util') local function make_position_param(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) local row, col local mouse = vim.fn.getmousepos() row = mouse.line col = mouse.column offset_encoding = offset_encoding or util._get_offset_encoding(buf) row = row - 1 local line = vim.api.nvim_buf_get_lines(buf, row, row + 1, true)[1] if not line then return { line = 0, character = 0 } end if #line < col then return { line = 0, character = 0 } end col = util._str_utfindex_enc(line, col, offset_encoding) return { line = row, character = col } end local make_params = function(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) offset_encoding = offset_encoding or util._get_offset_encoding(buf) return { textDocument = util.make_text_document_params(buf), position = make_position_param(window, offset_encoding), } end local hover_timer = nil vim.o.mousemoveevent = true vim.keymap.set({ '', 'i' }, '<MouseMove>', function() if hover_timer then hover_timer:close() end hover_timer = vim.defer_fn(function() hover_timer = nil local params = make_params() vim.lsp.buf_request( 0, 'textDocument/hover', params, vim.lsp.with(vim.lsp.handlers.hover, { silent = true, focusable = false, relative = 'mouse', }) ) end, 500) return '<MouseMove>' end, { expr = true }) ```
| * | | feat(lsp): show active clients in :checkhealth vim.lsp (#21670)Mathias Fußenegger2023-01-08
| | | | | | | | | | | | | | | | | | | | For users using vim.lsp.start it can be useful to get an overview of active client that is less verbose than a full `:lua =vim.lsp.get_active_clients()`
| * | | fix(lsp): partially revert semantic token gravity change from #21574 (#21680)jdrouhard2023-01-08
| | | |
| * | | fix(lsp): correct callHierarchy capability to fix lsp.buf.incoming_calls() ↵2023-01-06
| | | | | | | | | | | | | | | | | | | | (#21665) Co-authored-by: maozhongzhou <maozhongzhou@wps.cn>
| * | | docs(lua): adjust some type annotationsnotomo2023-01-04
| | | |
| * | | Merge pull request #21633 from gpanders/editorconfigGregory Anders2023-01-03
| |\ \ \ | | | | | | | | | | Builtin EditorConfig support
| | * | | feat(editorconfig): add editorconfig syntax fileGregory Anders2023-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intentionally _not_ copied from Vim because our syntax file makes use of Lua to dynamically generate a list of valid EditorConfig properties. This requires the builtin editorconfig module, which Vim does not have.
| * | | | fix(fs): duplicate path separator #21509Eric Haynes2023-01-03
| |/ / / | | | | | | | | Fixes #21497
| * | | fix(diagnostic): revert notification on missing diagnostics (#21632)Gregory Anders2023-01-03
| | | | | | | | | | | | | | | | This reverts a change introduced in 4ace9e7e417fe26c8b73ff1d6042e6e4f3df9ebf.
| * | | fix(lsp): change vim.lsp.get_active_clients.filter name annotation to string ↵Christian Segundo2023-01-03
| | | | | | | | | | | | | | | | (#21624)
| * | | refactor(diagnostic): DRY for loop #21521Raphael2023-01-03
| | | | | | | | | | | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * | | docs(lua): fix treesitter parsing errorsChristian Clason2023-01-01
| | | |