Commit Graph

18 Commits

Author SHA1 Message Date
3b6084ddf4 fix: type fixes
Type fixes caught by emmylua
2025-06-06 15:36:48 +01:00
ea44f74d84 refactor(types): more fixes 2024-03-06 10:45:22 +00:00
35f453f65d fix: type warnings in shared.lua 2024-02-15 11:32:50 +00:00
2e982f1aad refactor: create function for deferred loading
The benefit of this is that users only pay for what they use. If e.g.
only `vim.lsp.buf_get_clients()` is called then they don't need to load
all modules under `vim.lsp` which could lead to significant startuptime
saving.

Also `vim.lsp.module` is a bit nicer to user compared to
`require("vim.lsp.module")`.

This isn't used for some nested modules such as `filetype` as it breaks
tests with error messages such as "attempt to index field 'detect'".
It's not entirely certain the reason for this, but it is likely it is
due to filetype being precompiled which would imply deferred loading
isn't needed for performance reasons.
2024-02-03 16:53:41 +01:00
d51b615747 refactor: fix luals warnings 2023-12-30 17:40:53 +01:00
92204b06e7 refactor(lsp): move glob parsing to util (#26519)
refactor(lsp): move glob parsing to vim.glob

Moving the logic for using vim.lpeg to create a match pattern from a
glob into `vim.glob`. There are several places in the LSP spec that
use globs, and it's very useful to have glob matching as a
generally-available utility.
2023-12-22 11:40:01 +01:00
4bf47222c9 feat: add vim.text module (#26069) 2023-11-16 11:35:54 -06:00
45bcf83869 refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00
1e73891d69 refactor(iter): move helper functions under vim.iter
vim.iter is now both a function and a module (similar to vim.version).
2023-04-25 08:23:16 -06:00
743860de40 test: replace lfs with luv and vim.fs
test: replace lfs with luv

luv already pretty much does everything lfs does, so this duplication
of dependencies isn't needed.
2023-04-04 21:59:06 +02:00
e31e49a8e3 refactor(vim.version): cleanup
- version.cmp(): assert valid version
- add test for loading vim.version (the other tests use shared.lua in
  the test runner)
- reduce test scopes, reword test descriptions
2023-03-06 14:51:56 +01:00
0e7196438d feat(lua): add semver api 2023-03-06 13:45:59 +01:00
d6d6ab3f8e feat(lua): low-level interpreter mode (nvim -ll) 2023-01-31 13:53:22 +01:00
ef91146efc feat: vim.inspect_pos, vim.show_pos, :Inspect 2022-12-17 13:05:31 +01:00
8c2226fc30 fix(lua): properly configure luacheck and remove local vim = ... lines (#20551) 2022-10-09 12:40:56 +02:00
aefdc6783c chore: format runtime with stylua 2022-05-09 16:31:55 +02:00
f39a12d629 refactor(lua): make vim submodule lazy loading declarative
This will allow us to also use the same logic for lua threads and
processes, later.
2022-03-07 09:59:22 +01:00
186a559818 refactor(lua): move only runtime lua file in src/ to runtime/lua
reorganize so that initialization is done in lua
2022-03-04 19:07:42 +01:00