Lewis Russell
801ef85f93
feat: use vim.treesitter.language.get_lang/add/register()
2023-02-24 10:09:43 +00:00
Amaan Qureshi
853b1ab39a
style: fill in missing code docs wherever applicable
2023-02-24 01:08:23 -08:00
Lewis Russell
adeb6e02d3
fix: better support for custom parsers
...
If the user changes the parser_config by modifing the table returned by
get_parser_configs(), then internally mark the config so when we install
we 1) don't use the revision pointed to by the lockfile, and 2) always
download the parser via git.
2023-01-30 12:49:57 +01:00
Stephan Seitz
29304e16bb
fix: show errors when reload after installation fails
2022-12-31 13:59:18 +01:00
Stephan Seitz
0598450eb8
feat: also reload parsers after uninstallation
2022-12-31 13:59:18 +01:00
Stephan Seitz
7c9ddb72d1
feat: allow hot-reloading parser after installation
2022-12-26 15:36:16 +01:00
Stephan Seitz
f0a1c3df24
fix: require_language is needed after installation to update Vim's language table
...
Fixes #4026
2022-12-26 15:36:16 +01:00
Attila Tajti
07ff07ae4c
install: fix is_installed checks with shellslash
...
Convert paths to use backslashes on Windows.
2022-12-14 17:27:16 +01:00
Steven Arcangeli
8b241181ae
fix: is_installed correctly detects installed parsers
2022-11-28 00:33:04 +01:00
Stephan Seitz
754335b649
fix(install): don't auto-install ignored parsers
...
Fixes #3631
2022-11-28 00:19:09 +01:00
Folke Lemaitre
37767540e5
fix(installer): don't update that are not installed (exclude global parsers)
2022-11-24 21:41:58 +01:00
kylo252
acb65eedc5
fix(installer): ignore globally installed parsers
...
Problem: `is_installed` is picking up parsers shipped by neovim v0.8
with unknown version and compatability
Solution: only consider a parser installed if it's available in the
parsers_install_dir
2022-11-24 09:25:58 +01:00
Lewis Russell
0948bf2274
feat(emmy): add emmylua annotations
2022-10-31 12:00:45 +01:00
Stephan Seitz
1da61c993a
fix: explain what's wrong when installing a non-existing parser
...
Fixes #3450
2022-10-15 04:05:20 -07:00
Dusk Banks
c6a5a41283
fix(uninstall): support ensure_installed = 'all'
2022-10-10 23:09:40 +02:00
Stephan Seitz
d011532d73
fix: warn when user uninstalls parser than is in their ensure_installed
...
Fixes #2777
2022-08-26 13:35:17 -07:00
Stephan Seitz
11a8812a47
fix: add hint when there parser is still installed after TSUninstall
2022-08-26 13:35:17 -07:00
smjonas
013c744b06
fix: avoid installing parsers multiple times when using auto_install
2022-07-08 22:02:36 +02:00
Jonas Strittmatter
365f0eb75f
feat: add option to auto-install missing parsers ( #3130 )
2022-07-08 07:36:54 +00:00
Stephan Seitz
d810c38634
Chore: remove prefix from parser "location" property
...
This was very confusing when using the location property as it
always had to start with "tree-sitter-<lang>" for no real reason.
2022-06-25 12:01:22 +02:00
Duncan McDougall
901ffe1a36
Add support for custom parser install locations #2959 ( #3031 )
2022-06-20 22:50:07 +02:00
Christian Clason
bc25a6a5c4
chore!: remove ensure_installed='maintained'
...
Removes all support (and tests) for the parser category "maintained", as
this is no longer a useful category.
BREAKING CHANGE: replace `ensure_installed='maintained'` by an explicit
list of parsers, or use `'all'` (not recommended).
2022-04-30 11:42:46 +02:00
Stephan Seitz
ccb55be88f
fix(solidity): follow install_info.branch on parser update
2022-03-12 22:59:47 +01:00
Stephan Seitz
a37c97545f
Allow compilation via makefile
2022-01-23 16:27:25 +01:00
Christian Clason
bb319daf5f
feat: specify abi version for generate on newer ts cli
...
Check tree-sitter CLI version and if > 0.20.3 and generating a parser
from grammar, use `--abi=vim.treesitter.language_version`.
Besides being able to opt-in to newer ABI benefits, this is a necessary
workaround for an upstream bug with 0.20.3, where `parser.h` is not
generated if the (optional) `--abi` flag is omitted.
2022-01-22 22:56:50 +01:00
Stephan Seitz
f88e16ce0d
feat: enable parsers after installation immediately without reload
2021-12-15 18:50:54 +01:00
Sirisak Lueangsaksri
f6dcbe66b0
refactor: nitpicking
2021-11-08 15:04:38 +01:00
Sirisak Lueangsaksri
aaf157a6a9
feat: sync install for ensure_installed
2021-11-08 15:04:38 +01:00
Santos Gallegos
55860a76d9
Use wrapper around vim.notify with common options
...
Ref https://github.com/nvim-treesitter/nvim-treesitter/pull/1927#issuecomment-947064843
2021-10-22 23:46:16 +02:00
maxxnino
e3e43c479e
Add zig as compiler for parser
2021-10-21 22:10:55 +02:00
Santos Gallegos
04db2e8295
Use vim.notify instead of print in some places ( #1927 )
2021-10-19 12:01:20 -05:00
Stephan Seitz
2a073f760c
feat(install): add options prefer_git and command_extra_args
...
Fixes #1888
2021-10-01 22:21:16 +02:00
Santos Gallegos
70b43fbe21
CI: fix update lockfile job
...
Ref https://github.com/nvim-treesitter/nvim-treesitter/pull/1661#issuecomment-894722369
2021-08-08 14:50:36 +02:00
Munif Tanjim
6ed86a8516
feat: allow 'revision' override in parser config ( #1661 )
2021-08-07 18:23:11 -05:00
Santos Gallegos
be8f656087
Use stylua for autoformat code ( #1480 )
2021-07-04 21:12:17 +00:00
Shane Hird
5f60666d97
Fixed linting issues
2021-07-04 14:59:13 +02:00
Shane Hird
7dccbbad6c
Reduce diffs from master
2021-07-04 14:59:13 +02:00
Shane Hird
a8d64922fa
Re-introduce prompting for installation
2021-07-04 14:59:13 +02:00
Shane Hird
303121e0ec
Improved passing bang to functions
2021-07-04 14:59:13 +02:00
Shane Hird
76ea2b8871
TSUpdate does not install if up to date
2021-07-04 14:59:13 +02:00
Shane Hird
b46580fb66
Use bang for TSInstall commands
2021-07-04 14:59:13 +02:00
Stephan Seitz
871d6d9f92
fix: return when no node found during installation
...
Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/1324#issuecomment-853418596
2021-06-03 14:24:25 +02:00
Stephan Seitz
66f75c58d9
chore: show errors output during async installation
2021-06-01 21:38:17 +02:00
Daniel Kempkens
ba45e0d3ed
CI: Improved parser installation logic
2021-05-18 19:10:06 +02:00
Stephan Seitz
b9470e30b9
Remove requires_generate_from_grammar for ledger
2021-04-01 21:10:47 +02:00
Stephan Seitz
c16a6c972b
Check for node-js on :TSInstallFromGrammar
...
Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/1121#issuecomment-811755767
2021-04-01 21:10:47 +02:00
Stephan Seitz
7b1d557c80
Use fullpath to tree-sitter executable to avoid using one from NPM
2021-03-30 22:27:50 +02:00
Stephan Seitz
88ac3d2365
Address #1067 : check whether lockfile exists
2021-03-24 22:32:21 +01:00
Steven Sojka
7984975a2f
feat(install): allow ignore list when installing parsers ( #1098 )
2021-03-24 09:12:03 -05:00
kiyan
2f81d4ad27
hotfix npm check
2021-03-16 18:58:36 +01:00