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
Lewis Russell
ffd8cd1a96
refactor(loader): add typing for package.loaders
2023-03-26 12:51:56 +01:00
Lewis Russell
fab8dab6b6
refactor(loader): remove BufWritePost autocmd
2023-03-26 12:47:06 +01:00
Lewis Russell
3c82ce0d62
refactor(loader): use vim.fs
2023-03-26 12:46:24 +01:00
Folke Lemaitre
2257ade3dc
feat(lua): add vim.loader
...
feat: new faster lua loader using byte-compilation
2023-03-26 11:42:15 +01:00
zeertzjq
4863ca6b89
test: use exec_capture() in more places ( #22787 )
...
Problem:
Using `meths.exec2("code", { output = true })` is too verbose.
Solution:
Use exec_capture() in more places.
2023-03-26 10:49:32 +08:00
Evgeni Chasnovski
fe9cbcb3a5
feat(api): nvim_exec2(), deprecate nvim_exec() #19032
...
Problem:
The signature of nvim_exec() is not extensible per ":help api-contract".
Solution:
Introduce nvim_exec2() and deprecate nvim_exec().
2023-03-25 09:58:48 -07:00
Roberto Pommella Alegro
257d894d75
feat(lsp): render markdown in docs hover #22766
...
Problem:
LSP docs hover (textDocument/hover) doesn't handle HTML escape seqs in markdown.
Solution:
Convert common HTML escape seqs to a nicer form, to display in the float.
closees #22757
Signed-off-by: Kasama <robertoaall@gmail.com >
2023-03-25 12:46:07 -04:00
Micah Halter
36ee10057a
fix(lsp): add missing silent check in lsp hover handler ( #22763 )
...
Fixup to #21531 .
2023-03-25 21:01:39 +08:00
Jakub Łuczyński
42876ddc7a
docs: more details about vim.region ( #21116 )
2023-03-25 16:28:59 +08:00
Lewis Russell
ac7397f4a0
fix(treesitter): add missing deprecate
2023-03-24 16:31:30 +00:00
Lewis Russell
cbbf8bd666
feat(treesitter)!: deprecate top level indexes to modules ( #22761 )
...
The following top level Treesitter functions have been moved:
- vim.treesitter.inspect_language() -> vim.treesitter.language.inspect()
- vim.treesitter.get_query_files() -> vim.treesitter.query.get_files()
- vim.treesitter.set_query() -> vim.treesitter.query.set()
- vim.treesitter.query.set_query() -> vim.treesitter.query.set()
- vim.treesitter.get_query() -> vim.treesitter.query.get()
- vim.treesitter.query.get_query() -> vim.treesitter.query.get()
- vim.treesitter.parse_query() -> vim.treesitter.query.parse()
- vim.treesitter.query.parse_query() -> vim.treesitter.query.parse()
- vim.treesitter.add_predicate() -> vim.treesitter.query.add_predicate()
- vim.treesitter.add_directive() -> vim.treesitter.query.add_directive()
- vim.treesitter.list_predicates() -> vim.treesitter.query.list_predicates()
- vim.treesitter.list_directives() -> vim.treesitter.query.list_directives()
- vim.treesitter.query.get_range() -> vim.treesitter.get_range()
- vim.treesitter.query.get_node_text() -> vim.treesitter.get_node_text()
2023-03-24 14:43:14 +00:00
Christian Clason
ee5008f878
vim-patch:9.0.1425: "wat" and "wast" files are one filetype ( #22774 )
...
Problem: "wat" and "wast" files are one filetype.
Solution: Add a separate filetype for "wat" files. (Amaan Qureshi,
closes vim/vim#12165 )
3ea62381c5
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com >
2023-03-24 14:06:04 +01:00