Jon Huhn
6cc76011ca
fix(watchfiles): skip Created events when poll starts ( #23139 )
2023-04-17 18:50:05 +02:00
Isak Samsten
07b60efd80
feat(diagnostic): specify diagnostic virtual text prefix as a function
...
- vim.diagnostic.config() now accepts a function for the virtual_text.prefix
option, which allows for rendering e.g., diagnostic severities differently.
2023-04-17 12:53:34 +01:00
JingMatrix
7f94a032e1
fix(checkhealth): shell_error and cpanm module
...
shell_error is a function, the code missed parentheses
The actual module for perl module version is App::cpanminus::script, not
App::cpanminus::fatscript.
2023-04-16 12:39:48 +02:00
dundargoc
b0978fca6b
fix(checkhealth): fix crash due to incorrect argument type
2023-04-16 12:26:13 +02:00
Raphael
2f779b94e7
fix(lua): inspect_pos respect bufnr when get syntax info ( #23098 )
2023-04-16 17:50:32 +08:00
Christian Clason
d9e9dc3a06
vim-patch:9.0.1455: C++ 20 modules are not recognized ( #23124 )
...
Problem: C++ 20 modules are not recognized.
Solution: Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
closes vim/vim#12261 )
732d69e191
Co-authored-by: Ben Jackson <puremourning@gmail.com>
2023-04-16 10:59:04 +02:00
dundargoc
c08b030761
refactor: deprecate checkhealth functions
...
The following functions are deprecated and will be removed in
Nvim v0.11:
- health#report_start()
- health#report_info()
- health#report_ok()
- health#report_warn()
- health#report_error()
- vim.health.report_start()
- vim.health.report_info()
- vim.health.report_ok()
- vim.health.report_warn()
- vim.health.report_error()
Users should instead use these:
- vim.health.start()
- vim.health.info()
- vim.health.ok()
- vim.health.warn()
- vim.health.error()
2023-04-15 23:40:48 +02:00
zeertzjq
8c6f97bef8
fix(health): properly use the value of $PYENV_VERSION ( #23109 )
2023-04-16 00:16:50 +08:00
NAKAI Tsuyoshi
7caf0eafd8
feat(lua)!: add stricter vim.tbl_islist() and rename old one to vim.tbl_isarray() ( #16440 )
...
feat(lua)!: add stricter vim.tbl_islist(), rename vim.tbl_isarray()
Problem: `vim.tbl_islist` allows gaps in tables with integer keys
("arrays").
Solution: Rename `vim.tbl_islist` to `vim.tbl_isarray`, add new
`vim.tbl.islist` that checks for consecutive integer keys that start
from 1.
2023-04-14 12:01:08 +02:00
Christian Clason
4d04feb662
feat(lua): vim.tbl_contains supports general tables and predicates ( #23040 )
...
* feat(lua): vim.tbl_contains supports general tables and predicates
Problem: `vim.tbl_contains` only works for list-like tables (integer
keys without gaps) and primitive values (in particular, not for nested
tables).
Solution: Rename `vim.tbl_contains` to `vim.list_contains` and add new
`vim.tbl_contains` that works for general tables and optionally allows
`value` to be a predicate function that is checked for every key.
2023-04-14 10:39:57 +02:00
Gregory Anders
bfb28b62da
refactor: remove modelines from Lua files
...
Now that we have builtin EditorConfig support and a formatting check in
CI, these are not necessary.
2023-04-13 23:29:13 +02:00
Lewis Russell
66c66d8db8
fix(loader): reset hashes when running the loader
2023-04-13 17:34:47 +01:00
Mathias Fußenegger
37011bc45e
fix(diagnostic): rename buffer → bufnr in type annotation ( #23042 )
...
See `:h diagnostic-structure`, the property name is `bufnr`, not
`buffer`.
2023-04-12 15:16:15 +02:00
NAKAI Tsuyoshi
9e86f473e0
feat(lua): vim.region accepts getpos() arg ( #22635 )
2023-04-11 16:28:46 +02:00
Scott Ming
ccc0980f86
fix(treesitter): Use the correct replacement args for #gsub! directive ( #23015 )
...
fix(treesitter): use the correct replacement args for #gsub! directive
2023-04-11 10:26:03 +02:00
zeertzjq
7ffe450173
fix(health): check for _host_prog variables properly ( #23014 )
2023-04-11 10:20:25 +08:00
zeertzjq
c8d1d8b254
fix(man.lua): don't continue on command error ( #23009 )
...
Fix #21169
2023-04-11 09:35:01 +08:00
Gregory Anders
03a021f378
fix(health): combine python and virtualenv healthchecks ( #23004 )
...
fix(health): combine python and virtualenv health checks
2023-04-10 15:46:22 -06:00
Gregory Anders
cde4892b49
fix(health): fix typo in function name
2023-04-10 22:37:25 +02:00
dundargoc
bd98ef6ac6
refactor: rewrite perl healthcheck in lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-10 15:59:50 +02:00
dundargoc
b5c0e7137c
refactor: rewrite node healthcheck in lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-10 15:26:22 +02:00
dundargoc
7801ffc38a
refactor: rewrite ruby healthcheck in lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-10 14:06:10 +02:00
dundargoc
5ed7ede1f5
refactor: rewrite virtualenv healthcheck in lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-10 11:28:42 +02:00
dundargoc
71225228fc
refactor: rewrite python provider healthcheck in Lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-09 22:28:00 +02:00
dundargoc
41b7586cbb
refactor: rewrite clipboard provider healthchecks in Lua
...
This is required to remove the vimscript checkhealth functions.
2023-04-09 20:46:53 +02:00
Gregory Anders
d675bd01b1
feat(lua): allow vim.F.if_nil to take multiple arguments ( #22903 )
...
The first argument which is non-nil is returned. This is useful when
using nested default values (e.g. in the EditorConfig plugin).
Before:
local enable = vim.F.if_nil(vim.b.editorconfig, vim.F.if_nil(vim.g.editorconfig, true))
After:
local enable = vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true)
2023-04-07 08:22:47 -06:00
Lewis Russell
e29bc03c04
fix(treesitter): do not track ranges of the root tree ( #22912 )
...
Fixes #22911
2023-04-06 15:16:44 +01:00
Lewis Russell
34ac75b329
refactor: rename local API alias from a to api
...
Problem:
Codebase inconsistently binds vim.api onto a or api.
Solution:
Use api everywhere. a as an identifier is too short to have at the
module level.
2023-04-05 17:19:53 +01:00
Michal Liszcz
999cb36c2b
refactor(lsp): do not parse verbose output when overwriting options ( #22810 )
2023-04-05 14:02:08 +02:00
dundargoc
e826d09c18
fix(windows): consistent normalization in fs.find
...
vim.fs.find(".luacheckrc")
```
c:\\projects\\neovim/.luacheckrc # before
c:/projects/neovim/.luacheckrc # after
```
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2023-04-04 23:37:46 +02:00
dundargoc
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
Lewis Russell
b1de4820b7
refactor(treesitter): move inspect_tree impl
2023-04-04 20:47:15 +01:00
dundargoc
a5c572bd44
docs: fix typos
...
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Raphael <glephunter@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: himanoa <matsunoappy@gmail.com>
2023-04-04 19:07:33 +02:00
Lewis Russell
b75acd2f94
fix(treesitter): disable folding in inspect_tree() ( #22885 )
2023-04-04 14:07:27 +02:00
Lewis Russell
090ade4af6
refactor(treesitter): delegate region calculation to treesitter ( #22576 )
2023-04-04 13:58:16 +02:00
danilax999
469e6bfc56
fix(treesitter): use capture metadata range if exists
...
use `treesitter.get_range` instead of inline expression
2023-04-04 12:26:21 +01:00
Christian Clason
e30cc8be19
vim-patch:9.0.1438: .fs files are falsely recognized as forth files ( #22871 )
...
Problem: .fs files are falsely recognized as forth files.
Solution: Check 100 lines for something that looks like forth. (Johan
Kotlinski, closes vim/vim#12219 , closes vim/vim#11988 )
065088d554
Co-authored-by: Johan Kotlinski <kotlinski@gmail.com>
2023-04-03 16:27:49 +02:00
Luuk van Baal
a930245557
refactor(lua): get all marks instead of iterating over namespaces
...
Inspector now also includes highlights set in anonymous namespaces.
Close #22732
2023-04-02 19:14:23 +02:00
Gregory Anders
643c0ed571
feat: allow function passed to defaulttable to take an argument ( #22839 )
...
Pass the value of the key being accessed to the create function, to
allow users to dynamically generate default values.
2023-04-01 08:02:58 -06:00
Sizhe Zhao
6a4ebf894f
fix(health): stop using deprecated ts.language.inspect_language() ( #22850 )
2023-04-01 15:47:20 +02:00
Christian Clason
d7f7450017
refactor(treesitter)!: rename help parser to vimdoc
2023-04-01 15:07:16 +02:00
Lewis Russell
83bfd94d1d
refactor(loader): cache hash information
...
Whenever we run fs_stat() on a path, save this information in the loader
so it can be re-used.
- Loader.loadfile: Remove arguments `hash` as it is no longer needed.
- Loader.loader: Use _G.loadstring instead of Loader.load
This allows plugins to wrap loadstring to inspection and profiling
- factor out read file logic
2023-03-31 13:05:22 +01:00
Akin
ed10e4ef60
fix(diagnostic): use correct field name for tags ( #22835 )
...
LSP tags are added to the diagnostic as "tags" but referred to as "_tags"
in the diagnostic underline handler
2023-03-31 11:23:19 +01:00
Lewis Russell
4cff3aceea
fix(loader): disable profiling by default
2023-03-31 09:43:13 +01:00
Lewis Russell
226a6c3eae
feat(diagnostic): add support for tags
...
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
2023-03-30 14:49:58 +01:00
Lewis Russell
8fa7d833cf
Merge pull request #22791 from lewis6991/refactor/loadermisc
...
refactor(loader): changes
2023-03-30 13:57:59 +01:00
Lewis Russell
61e54f2636
feat: add vim.treesitter.language.get_filetypes()
( #22643 )
2023-03-30 10:26:28 +01:00
Christian Clason
196f69909d
vim-patch:9.0.1430: Livebook files are not recognized ( #22808 )
...
Problem: Livebook files are not recognized.
Solution: Add a pattern for Livebook files. (Mathias Jean Johansen,
closes vim/vim#12203 )
6400203517
Co-authored-by: Mathias Jean Johansen <mathias@mjj.io>
2023-03-29 10:23:52 +02:00
Lewis Russell
fd70a9dca1
refactor(loader): simplify tracking logic
2023-03-26 14:11:43 +01:00
Lewis Russell
25fa051fa1
feat(vim.fs): improve normalize
...
- Add options argument with an option to expand env vars
- Resolve '//' -> '/'
- Use in vim.loader
2023-03-26 13:30:11 +01:00